-
Notifications
You must be signed in to change notification settings - Fork 592
Expand file tree
/
Copy pathGasLeakRuleComponent.cs
More file actions
121 lines (105 loc) · 2.97 KB
/
Copy pathGasLeakRuleComponent.cs
File metadata and controls
121 lines (105 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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
{
/// <summary>
/// Gas types that can be selected for the leak event.
/// </summary>
[DataField]
public Gas[] LeakableGases =
{
Gas.Ammonia,
Gas.Plasma,
Gas.Tritium,
Gas.Frezon,
Gas.WaterVapor, // the fog
// Funkystation Start: Funky atmos - /tg/ gases
Gas.BZ,
Gas.Nitrium,
Gas.Pluoxium,
Gas.HyperNoblium,
Gas.ProtoNitrate,
Gas.Halon,
Gas.Helium,
Gas.AntiNoblium,
// Funkystation End: Funky atmos - /tg/ gases
#region Starlight
// Starlight gases
Gas.Ulnitranium,
Gas.ZXA,
#endregion
};
/// <summary>
/// Time remaining until the next gas addition to the leak tile.
/// </summary>
[DataField]
public float TimeUntilLeak;
/// <summary>
/// Fixed interval in seconds between gas additions to the leak tile.
/// </summary>
[DataField]
public float LeakCooldown = 1.0f;
/// <summary>
/// The station where the leak is located.
/// </summary>
[DataField]
public EntityUid TargetStation;
/// <summary>
/// The specific grid where the leak is located.
/// </summary>
[DataField]
public EntityUid TargetGrid;
/// <summary>
/// The tile coordinates where the leak is located.
/// </summary>
[DataField]
public Vector2i TargetTile;
/// <summary>
/// The world coordinates of the leak location.
/// </summary>
[DataField]
public EntityCoordinates TargetCoords;
/// <summary>
/// Whether a suitable tile for leaking has been found.
/// </summary>
[DataField]
public bool FoundTile;
/// <summary>
/// The specific gas type currently leaking.
/// </summary>
[DataField]
public Gas LeakGas;
/// <summary>
/// Current leak rate in moles per second.
/// </summary>
[DataField]
public float MolesPerSecond;
/// <summary>
/// Minimum leak rate in moles per second.
/// </summary>
[DataField]
public int MinimumMolesPerSecond = 80;
/// <summary>
/// Maximum leak rate in moles per second. Limited to give people time to flee.
/// </summary>
[DataField]
public int MaximumMolesPerSecond = 200;
/// <summary>
/// Minimum total amount of gas to leak over the entire event duration.
/// </summary>
[DataField]
public int MinimumGas = 1000;
/// <summary>
/// Maximum total amount of gas to leak over the entire event duration.
/// </summary>
[DataField]
public int MaximumGas = 4000;
/// <summary>
/// Chance to create an ignition spark when the event ends.
/// </summary>
[DataField]
public float SparkChance = 0.05f;
}