Show / Hide Table of Contents

Class TasteBuds

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

Constructors

TasteBuds()

Declaration
public TasteBuds()

Fields

FoodToTaste

Declaration
public ThreadSafeDictionary<Type, ItemTaste> FoodToTaste
Field Value
Type Description
ThreadSafeDictionary<System.Type, ItemTaste>

TastePreferenceDiscoveredEvent

Declaration
public static ThreadSafeAction<User, FoodItem, ItemTaste.TastePreference> TastePreferenceDiscoveredEvent
Field Value
Type Description
ThreadSafeAction<User, FoodItem, ItemTaste.TastePreference>

Properties

Favorite

Declaration
public FoodItem Favorite { get; }
Property Value
Type Description
FoodItem

FavoriteDiscovered

Declaration
public bool FavoriteDiscovered { get; }
Property Value
Type Description
System.Boolean

Worst

Declaration
public FoodItem Worst { get; }
Property Value
Type Description
FoodItem

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
Type Name Description
User user
FoodItem item
Returns
Type Description
System.ValueTuple<LocString, LocString>

GetFoodTaste(FoodItem)

Return how a food item tastes (string enum value)

Declaration
public string GetFoodTaste(FoodItem food)
Parameters
Type Name Description
FoodItem food
Returns
Type Description
System.String

GetTastePrefStringDetailed(FoodItem)

Return how a food item tastes (detailed localized description)

Declaration
public string GetTastePrefStringDetailed(FoodItem food)
Parameters
Type Name Description
FoodItem food
Returns
Type Description
System.String

GetTastePrefStringShort(FoodItem)

Return how a food item tastes (short localized description)

Declaration
public string GetTastePrefStringShort(FoodItem food)
Parameters
Type Name Description
FoodItem food
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

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
☀
☾