Class TasteBuds
Inheritance
System.Object
TasteBuds
Assembly: Eco.Gameplay.dll
Syntax
public class TasteBuds : Object
Constructors
TasteBuds()
Declaration
Fields
FoodToTaste
Declaration
public ThreadSafeDictionary<Type, ItemTaste> FoodToTaste
Field Value
TastePreferenceDiscoveredEvent
Declaration
public static ThreadSafeAction<User, FoodItem, ItemTaste.TastePreference> TastePreferenceDiscoveredEvent
Field Value
Properties
Favorite
Declaration
public FoodItem Favorite { get; }
Property Value
FavoriteDiscovered
Declaration
public bool FavoriteDiscovered { get; }
Property Value
Type |
Description |
System.Boolean |
|
Worst
Declaration
public FoodItem Worst { get; }
Property Value
WorstDiscovered
Declaration
public bool WorstDiscovered { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
DoEat(User, FoodItem)
Build the string created when eating the item, send any notices if fav/worst food is discovered, and return a string description of it.
Declaration
public (LocString, LocString) DoEat(User user, FoodItem item)
Parameters
Returns
GetFoodTaste(FoodItem)
Return how a food item tastes (string enum value)
Declaration
public string GetFoodTaste(FoodItem food)
Parameters
Returns
Type |
Description |
System.String |
|
GetTastePrefStringDetailed(FoodItem)
Return how a food item tastes (detailed localized description)
Declaration
public string GetTastePrefStringDetailed(FoodItem food)
Parameters
Returns
Type |
Description |
System.String |
|
GetTastePrefStringShort(FoodItem)
Return how a food item tastes (short localized description)
Declaration
public string GetTastePrefStringShort(FoodItem food)
Parameters
Returns
Type |
Description |
System.String |
|
Initialize(Func<IEnumerable<Type>>)
Declaration
public void Initialize(Func<IEnumerable<Type>> getStomachContents)
Parameters
Type |
Name |
Description |
System.Func<System.Collections.Generic.IEnumerable<System.Type>> |
getStomachContents |
|
UpdateMult(Dictionary<Type, Single>)
Declaration
public (float, string) UpdateMult(Dictionary<Type, float> foodToCalories)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Single> |
foodToCalories |
|
Returns
Type |
Description |
System.ValueTuple<System.Single, System.String> |
|
Extension Methods