using Content.Server.StationEvents.Events;
using Content.Shared.Atmos;
using Robust.Shared.Map;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(GasLeakRule))]
public sealed partial class GasLeakRuleComponent : Component
{
///
/// Gas types that can be selected for the leak event.
///
[DataField]
public Gas[] LeakableGases =
{
Gas.Ammonia,
Gas.Plasma,
Gas.Tritium,
Gas.Frezon,
Gas.WaterVapor,
};
///
/// Time remaining until the next gas addition to the leak tile.
///
[DataField]
public float TimeUntilLeak;
///
/// Fixed interval in seconds between gas additions to the leak tile.
///
[DataField]
public float LeakCooldown = 1.0f;
///
/// The station where the leak is located.
///
[DataField]
public EntityUid TargetStation;
///
/// The specific grid where the leak is located.
///
[DataField]
public EntityUid TargetGrid;
///
/// The tile coordinates where the leak is located.
///
[DataField]
public Vector2i TargetTile;
///
/// The world coordinates of the leak location.
///
[DataField]
public EntityCoordinates TargetCoords;
///
/// Whether a suitable tile for leaking has been found.
///
[DataField]
public bool FoundTile;
///
/// The specific gas type currently leaking.
///
[DataField]
public Gas LeakGas;
///
/// Current leak rate in moles per second.
///
[DataField]
public float MolesPerSecond;
///
/// Minimum leak rate in moles per second.
///
[DataField]
public int MinimumMolesPerSecond = 80;
///
/// Maximum leak rate in moles per second. Limited to give people time to flee.
///
[DataField]
public int MaximumMolesPerSecond = 200;
///
/// Minimum total amount of gas to leak over the entire event duration.
///
[DataField]
public int MinimumGas = 1000;
///
/// Maximum total amount of gas to leak over the entire event duration.
///
[DataField]
public int MaximumGas = 4000;
///
/// Chance to create an ignition spark when the event ends.
///
[DataField]
public float SparkChance = 0.05f;
}