2022-02-08 00:42:49 -08:00
|
|
|
using Content.Server.Body.Systems;
|
2024-03-28 01:48:37 +01:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
namespace Content.Server.Body.Components;
|
|
|
|
|
|
2022-02-08 00:42:49 -08:00
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(ThermalRegulatorSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ThermalRegulatorComponent : Component
|
2021-11-28 19:25:42 -07:00
|
|
|
{
|
2024-03-28 01:48:37 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The next time that the body will regulate its heat.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
|
|
|
public TimeSpan NextUpdate;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The interval at which thermal regulation is processed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1);
|
|
|
|
|
|
2021-11-28 19:25:42 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Heat generated due to metabolism. It's generated via metabolism
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float MetabolismHeat;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Heat output via radiation.
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float RadiatedHeat;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum heat regulated via sweat
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float SweatHeatRegulation;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum heat regulated via shivering
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float ShiveringHeatRegulation;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Amount of heat regulation that represents thermal regulation processes not
|
|
|
|
|
/// explicitly coded.
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float ImplicitHeatRegulation;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Normal body temperature
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float NormalBodyTemperature;
|
2021-11-28 19:25:42 -07:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deviation from normal temperature for body to start thermal regulation
|
|
|
|
|
/// </summary>
|
2024-03-28 01:48:37 +01:00
|
|
|
[DataField]
|
|
|
|
|
public float ThermalRegulationTemperatureThreshold;
|
2021-11-28 19:25:42 -07:00
|
|
|
}
|