CatStation/Content.Shared/Temperature/Components/TemperatureComponent.cs
Princess Cheeseballs 2e9c4c0103
IHeatContainers for TemperatureComponent (#42785)
* Hope I'm not forgetting anything...

* They call me the sender the way I'm sending it.

* remove commented out YAML

* last of the slop

* fix test fails

* first batch of test fails

* no more test fails

* make cryo pods work again.

* Make cryo work better-er

* I didn't like that a firesuit helmet was so effective on its own so I decided to be a dick about it.

* review.com

* oop

* actually real quick do this

* fix YAML issues

* IHeatContainer my beloved <3

* borger

* not networked :(

* jackets

* burgeewqjfrwjkhaskfjfsahjkfsahjkfsahjkfsajhkfsa

* utter yaml nonsense

* phishing

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-07-26 07:56:44 +00:00

39 lines
1.3 KiB
C#

using Content.Shared.Atmos;
using Content.Shared.Temperature.HeatContainer;
using Content.Shared.Temperature.Systems;
namespace Content.Shared.Temperature.Components;
/// <summary>
/// Handles changing temperature,
/// informing others of the current temperature.
/// </summary>
[RegisterComponent]
[Access(typeof(SharedTemperatureSystem))]
public sealed partial class TemperatureComponent : Component, IHeatContainer
{
/// <summary>
/// The specific heat capacity of this entity in J/(kg*K). Humans are about 3kJ/(kg*K)
/// </summary>
[DataField]
public float SpecificHeat = 3000f;
[DataField]
public float HeatCapacity { get; set; }
[DataField]
public float Temperature { get; set; } = Atmospherics.T20C;
/// <summary>
/// Thermal Conductivity in W/(K*m^2).
/// Human skin is about 0.3 W/(m*K)
/// Divide that by the thickness of skin of about 2mm giving us a final value of 150
/// Source: https://pmc.ncbi.nlm.nih.gov/articles/PMC8953946/
/// </summary>
/// <remarks>
/// This value should be multiplied by a surface area value based on the amount of area in contact.
/// For Atmospherics, this is typically 2m^2, the surface area of the average body.
/// </remarks>
[DataField]
public float ThermalConductivity = 150f;
}