AmbientTemperatureChecker
A class in Root.Township, the global namespace.
Tracks the ambient temperature for an entity from the location chunk it's in (23 unless the chunk's environment overrides it). Used by heat sources, heat points and recyclers.
Constructors
Fields
| Member | What it is |
|---|
static readonly float standardAmbientTemperature | Default ambient temperature (23). |
1 private and internal field
| Member | What it is |
|---|
private NetworkEntity entity | The entity being watched. |
Properties
| Member | What it is |
|---|
float AmbientTemperature { get; private set; } | Current ambient temperature for the entity. |
Events
| Member | What it is |
|---|
event Action OnChanged | Raised when the ambient temperature changes after the entity moves chunk. |
Methods
| Member | What it is |
|---|
bool IsAmbient(float temperature) | True if the given temperature is within 0.1 of ambient. |
void UpdateEntity(NetworkEntity newEntity) | Switches which entity is watched for chunk changes. |
1 private and internal method
| Member | What it is |
|---|
private void UpdateChunk(Chunk chunk) | Reads the new chunk's ambient temperature and raises OnChanged if it changed. Hooked to the entity's AddedToChunk. |
Used in
Members of other types that take, return or hold a AmbientTemperatureChecker: