1
0

TemperatureProtectionComponent.cs 796 B

1234567891011121314151617181920212223242526
  1. using Content.Server.Temperature.Systems;
  2. namespace Content.Server.Temperature.Components;
  3. [RegisterComponent]
  4. [Access(typeof(TemperatureSystem))]
  5. public sealed partial class TemperatureProtectionComponent : Component
  6. {
  7. /// <summary>
  8. /// Multiplier for the transferred heat when heating up
  9. /// </summary>
  10. [DataField]
  11. public float HeatingCoefficient = 1.0f;
  12. /// <summary>
  13. /// Multiplier for the transferred heat when cooling down
  14. /// </summary>
  15. [DataField]
  16. public float CoolingCoefficient = 1.0f;
  17. }
  18. /// <summary>
  19. /// Event raised on an entity with <see cref="TemperatureProtectionComponent"/> to determine the actual value of the coefficient.
  20. /// </summary>
  21. [ByRefEvent]
  22. public record struct GetTemperatureProtectionEvent(float Coefficient);