Class Cravings
Inheritance
System.Object
Cravings
Assembly: Eco.Gameplay.dll
Syntax
public class Cravings : Object
Constructors
Cravings()
Declaration
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
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
Returns
Type |
Description |
System.Boolean |
|
Message()
The message describing the craving, shown in tooltip for the user.
Declaration
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