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.
- Listed in Crafting and making
- Inherits or implements
HeatPoint,IEntityReplaceHandler - Documented in Cooking
Constructors
| Member | What it is |
|---|---|
CookingPoint() | Creates a CookingPoint with default values. |
Fields
9 private and internal fields
| Member | What it is |
|---|---|
private PooledObjectDefinition androidBurningEffect | Burning effect for the Android build. Not read by this class in the server build. |
private PooledObjectDefinition androidCookingEffect | Cooking effect for the Android build. Not read by this class in the server build. |
private PooledObjectDefinition burningEffect | Pooled effect shown when a burnable item is above its burning temperature. |
private ICookableSettings cookable | Private: the item's cooking settings, from Awake. |
private PooledObjectDefinition cookingEffect | Pooled effect shown while the item is above its weak cooking temperature. |
private bool isEffectBurning | Private: whether the shown effect is the burning one. |
private EmissionControl particles | Backing field for Particles. |
private float strongEmissionMultiplier | Cooking effect emission at optimal cooking temperature. |
private float weakEmissionMultiplier | Cooking effect emission at weak cooking temperature. |
Properties
| Member | What 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
| Member | What 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
| Member | What 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: