Add radiators (#18728)

* Add radiators

* Limit heat transfer to fluid heat capacity

* Adjust datafield names

* Fix material arbitrage

* This code has been debugged, and so there are no more bugs. Debugging code is therefore unnecessary

* Adjust radiator layer subfloor visibility

* Cache CVars

* No default

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Like and unsubscribe

* Fix CVar caching

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Kevin Zheng
2023-08-06 01:21:05 -07:00
committed by GitHub
parent d13de403dd
commit db5dee6db3
10 changed files with 250 additions and 0 deletions

View File

@@ -78,6 +78,16 @@ namespace Content.Server.Atmos.EntitySystems
return mixture.Temperature * cachedHeatCapacity;
}
/// <summary>
/// Add 'dQ' Joules of energy into 'mixture'.
/// </summary>
public void AddHeat(GasMixture mixture, float dQ)
{
var c = GetHeatCapacity(mixture);
float dT = dQ / c;
mixture.Temperature += dT;
}
/// <summary>
/// Merges the <see cref="giver"/> gas mixture into the <see cref="receiver"/> gas mixture.
/// The <see cref="giver"/> gas mixture is not modified by this method.