GasLeakRuleComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Server.StationEvents.Events;
  2. using Content.Shared.Atmos;
  3. using Robust.Shared.Map;
  4. namespace Content.Server.StationEvents.Components;
  5. [RegisterComponent, Access(typeof(GasLeakRule))]
  6. public sealed partial class GasLeakRuleComponent : Component
  7. {
  8. public readonly Gas[] LeakableGases =
  9. {
  10. Gas.Ammonia,
  11. Gas.Plasma,
  12. Gas.Tritium,
  13. Gas.Frezon,
  14. Gas.WaterVapor, // the fog
  15. };
  16. /// <summary>
  17. /// Running cooldown of how much time until another leak.
  18. /// </summary>
  19. public float TimeUntilLeak;
  20. /// <summary>
  21. /// How long between more gas being added to the tile.
  22. /// </summary>
  23. public float LeakCooldown = 1.0f;
  24. // Event variables
  25. public EntityUid TargetStation;
  26. public EntityUid TargetGrid;
  27. public Vector2i TargetTile;
  28. public EntityCoordinates TargetCoords;
  29. public bool FoundTile;
  30. public Gas LeakGas;
  31. public float MolesPerSecond;
  32. public readonly int MinimumMolesPerSecond = 80;
  33. /// <summary>
  34. /// Don't want to make it too fast to give people time to flee.
  35. /// </summary>
  36. public int MaximumMolesPerSecond = 200;
  37. public int MinimumGas = 1000;
  38. public int MaximumGas = 4000;
  39. public float SparkChance = 0.05f;
  40. }