LungComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Content.Server.Body.Systems;
  2. using Content.Shared.Alert;
  3. using Content.Shared.Atmos;
  4. using Content.Shared.Chemistry.Components;
  5. using Robust.Shared.Prototypes;
  6. namespace Content.Server.Body.Components;
  7. [RegisterComponent, Access(typeof(LungSystem))]
  8. public sealed partial class LungComponent : Component
  9. {
  10. [DataField]
  11. [Access(typeof(LungSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
  12. public GasMixture Air = new()
  13. {
  14. Volume = 6,
  15. Temperature = Atmospherics.NormalBodyTemperature
  16. };
  17. /// <summary>
  18. /// The name/key of the solution on this entity which these lungs act on.
  19. /// </summary>
  20. [DataField]
  21. public string SolutionName = LungSystem.LungSolutionName;
  22. /// <summary>
  23. /// The solution on this entity that these lungs act on.
  24. /// </summary>
  25. [ViewVariables]
  26. public Entity<SolutionComponent>? Solution = null;
  27. /// <summary>
  28. /// The type of gas this lung needs. Used only for the breathing alerts, not actual metabolism.
  29. /// </summary>
  30. [DataField]
  31. public ProtoId<AlertPrototype> Alert = "LowOxygen";
  32. }