Skip to main content

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.

Constructors​

MemberWhat it is
StewComponent()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

8 private and internal fields
MemberWhat it is
private float baseEffectsMultiplierBacking field for BaseEffectsMultiplier, applied to the effects of the stew's ingredients.
private float baseLiquidEffectsMultiplierBacking field for BaseLiquidEffectsMultiplier, applied to the effects of the liquid base.
private Cookable cookableBacking field for Cookable. Null on the final stage.
private float extraEffectsMultiplierBacking field for ExtraEffectsMultiplier, applied to the recipe's extra effects.
private bool isAwardingExperienceStageBacking field for IsAwardingExperienceStage.
private LiquidVisualData liquidVisualDataBacking field for LiquidVisualData.
private PooledObjectDefinition stewCreatedEffectBacking field for StewCreatedEffect.
private Color tintColorBacking field for TintColor. Defaults to white.

Properties​

MemberWhat 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​

MemberWhat 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: