1
0

EntityHeaterComponent.cs 995 B

12345678910111213141516171819202122232425262728293031
  1. using Content.Server.Temperature.Systems;
  2. using Content.Shared.Temperature;
  3. using Robust.Shared.Audio;
  4. namespace Content.Server.Temperature.Components;
  5. /// <summary>
  6. /// Adds thermal energy to entities with <see cref="TemperatureComponent"/> placed on it.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(EntityHeaterSystem))]
  9. public sealed partial class EntityHeaterComponent : Component
  10. {
  11. /// <summary>
  12. /// Power used when heating at the high setting.
  13. /// Low and medium are 33% and 66% respectively.
  14. /// </summary>
  15. [DataField, ViewVariables(VVAccess.ReadWrite)]
  16. public float Power = 2400f;
  17. /// <summary>
  18. /// Current setting of the heater. If it is off or unpowered it won't heat anything.
  19. /// </summary>
  20. [DataField]
  21. public EntityHeaterSetting Setting = EntityHeaterSetting.Off;
  22. /// <summary>
  23. /// An optional sound that plays when the setting is changed.
  24. /// </summary>
  25. [DataField]
  26. public SoundPathSpecifier? SettingSound;
  27. }