Skip to main content

CookingPoint

A class in Root.Township, Alta.Cooking.

A HeatPoint on cookable food that shows a cooking or burning particle effect based on its temperature and the item's cooking settings.

Constructors​

MemberWhat it is
CookingPoint()Creates a CookingPoint with default values.

Fields​

9 private and internal fields
MemberWhat it is
private PooledObjectDefinition androidBurningEffectBurning effect for the Android build. Not read by this class in the server build.
private PooledObjectDefinition androidCookingEffectCooking effect for the Android build. Not read by this class in the server build.
private PooledObjectDefinition burningEffectPooled effect shown when a burnable item is above its burning temperature.
private ICookableSettings cookablePrivate: the item's cooking settings, from Awake.
private PooledObjectDefinition cookingEffectPooled effect shown while the item is above its weak cooking temperature.
private bool isEffectBurningPrivate: whether the shown effect is the burning one.
private EmissionControl particlesBacking field for Particles.
private float strongEmissionMultiplierCooking effect emission at optimal cooking temperature.
private float weakEmissionMultiplierCooking effect emission at weak cooking temperature.

Properties​

MemberWhat it is
override bool IsCountedforMelting { get; }Always false, so food heat points are ignored when a smelter works out melting.
EmissionControl Particles { get; }The EmissionControl of the current cooking or burning effect, or null when none is shown.

Methods​

MemberWhat it is
protected override void Awake()Caches the ICookableSettings on the same object.
protected override void ShowEffects()Picks burning, cooking or no effect from the current temperature against the item's cooking thresholds.
3 private and internal methods
MemberWhat it is
private void RemoveEffectAndResetParticles()Private: removes the active effect and clears particles.
private void Alta.Networking.IEntityReplaceHandler.ReplacedWith(NetworkEntity newEntity, ReplaceAvoidFlags replaceAvoidFlags)Copies the temperature to the replacing entity's CookingPoint, unless the replace avoids charge.
private void SetEffect(bool isBurning)Private: shows the burning or cooking effect, swapping if needed. Cooking smoke scales with how close the food is to optimal temperature.

Used in​

Members of other types that take, return or hold a CookingPoint: