HeatSource.component
README.md
HeatSource (component)
Gives one object, and everything under it, its own heat for thermal cameras and gameplay. Put it on any entity heatSignatures cannot guess from its name (a reactor, a hot pipe, a cold store), or on one it already guesses to set the numbers yourself. It needs no sibling components. Its fields are synced, so every player sees the same heat; switching working on from a script warms the thing for everyone.
local gen = entity.find("Generator")
gen.component.add("heatSignatures.HeatSource", { class = "engine", working = true })
-- later: switch it off; it cools over about twice its warm-up time
gen.component.get("HeatSource").working = false
| Field | Default | Meaning |
|---|---|---|
class | "" | person, animal, engine, vehicle, fire, lamp, electronics, metal, stone, water, ice, plant, warm or cold. Empty takes the class its name suggests, or warm. |
temperature | -999 | Temperature at rest, degrees C. -999 takes the class's. |
activeTemperature | -999 | How hot it runs while working or moving. -999 takes the class's. |
working | false | On, running, burning: it warms toward its active temperature. |
warmsWhenMoving | false | It warms while it moves (a car driving, a person running). |
warmUpSeconds | 0 | Seconds to warm up; cooling takes twice as long. 0 takes the class's. |
A HeatSource owns its entity: heatSignatures's name rules leave it alone.
Known limits
- The shape is a box or ellipsoid fitted to the entity's bounds when it is first seen.
- Changing
classrefits it; resizing the entity later does not.