AtmosExposedSystem.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Content.Shared.Atmos;
  2. using Robust.Shared.Map;
  3. namespace Content.Server.Atmos.EntitySystems
  4. {
  5. /* doesn't seem to be a use for this at the moment, so it's disabled
  6. public sealed class AtmosExposedSystem : EntitySystem
  7. {}
  8. */
  9. [ByRefEvent]
  10. public readonly struct AtmosExposedUpdateEvent
  11. {
  12. public readonly EntityCoordinates Coordinates;
  13. public readonly GasMixture GasMixture;
  14. public readonly TransformComponent Transform;
  15. public AtmosExposedUpdateEvent(EntityCoordinates coordinates, GasMixture mixture, TransformComponent transform)
  16. {
  17. Coordinates = coordinates;
  18. GasMixture = mixture;
  19. Transform = transform;
  20. }
  21. }
  22. /// <summary>
  23. /// Event that tries to query the mixture a certain entity is exposed to.
  24. /// This is mainly intended for use with entities inside of containers.
  25. /// This event is not raised for entities that are directly parented to the grid.
  26. /// </summary>
  27. [ByRefEvent]
  28. public struct AtmosExposedGetAirEvent
  29. {
  30. /// <summary>
  31. /// The entity we want to query this for.
  32. /// </summary>
  33. public readonly Entity<TransformComponent> Entity;
  34. /// <summary>
  35. /// The mixture that the entity is exposed to. Output parameter.
  36. /// </summary>
  37. public GasMixture? Gas = null;
  38. /// <summary>
  39. /// Whether to excite the mixture, if possible.
  40. /// </summary>
  41. public readonly bool Excite = false;
  42. /// <summary>
  43. /// Whether this event has been handled or not.
  44. /// Check this before changing anything.
  45. /// </summary>
  46. public bool Handled = false;
  47. public AtmosExposedGetAirEvent(Entity<TransformComponent> entity, bool excite = false)
  48. {
  49. Entity = entity;
  50. Excite = excite;
  51. }
  52. }
  53. }