Show / Hide Table of Contents

Class Cravings

Inheritance
System.Object
Cravings
Namespace: Eco.Gameplay.Players.Food
Assembly: Eco.Gameplay.dll
Syntax
public class Cravings : Object

Constructors

Cravings()

Declaration
public Cravings()

Fields

CravingsBoost

Declaration
public static float CravingsBoost
Field Value
Type Description
System.Single

MaxCravingSatisfied

Declaration
public static int MaxCravingSatisfied
Field Value
Type Description
System.Int32

MaxTimeToSatisfyCraving

Declaration
public static double MaxTimeToSatisfyCraving
Field Value
Type Description
System.Double

MinAgeBeforeCravings

Declaration
public static double MinAgeBeforeCravings
Field Value
Type Description
System.Double

MinCaloriesForCravings

Declaration
public static int MinCaloriesForCravings
Field Value
Type Description
System.Int32

MinNutrientsForCravings

Declaration
public static int MinNutrientsForCravings
Field Value
Type Description
System.Int32

TimeBetweenCravings

Declaration
public static double TimeBetweenCravings
Field Value
Type Description
System.Double

Methods

DoEat(User, FoodItem)

Declaration
public string DoEat(User user, FoodItem food)
Parameters
Type Name Description
User user
FoodItem food
Returns
Type Description
System.String

GetMult()

Declaration
public (float, string) GetMult()
Returns
Type Description
System.ValueTuple<System.Single, System.String>

Initialize(Func<IDictionary<Type, ItemTaste>>, Func<IEnumerable<Type>>, Action<Type>)

Declaration
public void Initialize(Func<IDictionary<Type, ItemTaste>> getTypeToTaste, Func<IEnumerable<Type>> getStomachContents, Action<Type> onCravingUpdate)
Parameters
Type Name Description
System.Func<System.Collections.Generic.IDictionary<System.Type, ItemTaste>> getTypeToTaste
System.Func<System.Collections.Generic.IEnumerable<System.Type>> getStomachContents
System.Action<System.Type> onCravingUpdate

IsCravingFood(FoodItem)

Declaration
public bool IsCravingFood(FoodItem foodItem)
Parameters
Type Name Description
FoodItem foodItem
Returns
Type Description
System.Boolean

Message()

The message describing the craving, shown in tooltip for the user.

Declaration
public string Message()
Returns
Type Description
System.String

UpdateCraving(User, Boolean, Type)

Declaration
public void UpdateCraving(User user, bool forceNew = false, Type newCraving = null)
Parameters
Type Name Description
User user
System.Boolean forceNew
System.Type newCraving

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾