StewComponent
A class in Root.Township, Alta.Cooking.
On a stew entity in a cooking pot: its tint and effect multipliers, and its own Cookable that turns it into the next stage. See the cooking guide.
- Listed in Crafting and making
- Inherits or implements
NetworkEntityBehaviour - Documented in Cooking
Constructors
| Member | What it is |
|---|---|
StewComponent() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private float baseEffectsMultiplier | Backing field for BaseEffectsMultiplier, applied to the effects of the stew's ingredients. |
private float baseLiquidEffectsMultiplier | Backing field for BaseLiquidEffectsMultiplier, applied to the effects of the liquid base. |
private Cookable cookable | Backing field for Cookable. Null on the final stage. |
private float extraEffectsMultiplier | Backing field for ExtraEffectsMultiplier, applied to the recipe's extra effects. |
private bool isAwardingExperienceStage | Backing field for IsAwardingExperienceStage. |
private LiquidVisualData liquidVisualData | Backing field for LiquidVisualData. |
private PooledObjectDefinition stewCreatedEffect | Backing field for StewCreatedEffect. |
private Color tintColor | Backing field for TintColor. Defaults to white. |
Properties
| Member | What it is |
|---|---|
float BaseEffectsMultiplier { get; } | Multiplier on each ingredient's effects. |
float BaseLiquidEffectsMultiplier { get; } | Multiplier on the base liquid's effects. |
Cookable Cookable { get; } | The cookable that moves it to the next stage, or null at the last stage. |
HeatPoint CookingPoint { get; } | The heat point of its cookable. |
float ExtraEffectsMultiplier { get; } | Multiplier on the recipe's extra effects and effect modifiers. |
bool IsAwardingExperienceStage { get; } | Whether reaching this stage gives cooking experience, probably. |
bool IsFinalStage { get; } | True when there's no cookable, so it won't cook further. |
LiquidVisualData LiquidVisualData { get; } | How the stew looks as a liquid. |
PooledObjectDefinition StewCreatedEffect { get; } | Effect spawned when this stew is made. |
Color TintColor { get; } | Colour tint of the stew. |
Methods
| Member | What it is |
|---|---|
void HandleCookableStateChange(NetworkEntityHandler stewCookedHandler, NetworkEntityHandler stewBurntHandler) | Subscribes handlers for when it cooks or burns. |
NetworkEntity ReplaceWithRecipeStew(uint stewPrefabHash) | Replaces the stew with a recipe's stew prefab, playing the recipe-started effect. |
void ResetCookableProgress() | Resets the cookable's progress. |
void StopHandlingCookableStateChange(NetworkEntityHandler stewCookedHandler, NetworkEntityHandler stewBurntHandler) | Unsubscribes those handlers. |
Used in
Members of other types that take, return or hold a StewComponent: