-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathsecurity_level_datums.dm
157 lines (147 loc) · 4.84 KB
/
security_level_datums.dm
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/**
* Security levels
*
* These are used by the security level subsystem. Each one of these represents a security level that a player can set.
*
* Base type is abstract
*/
/datum/security_level
/// The name of this security level.
var/name = "not set"
/// The color of our announcement divider.
var/announcement_color = "default"
/// The numerical level of this security level, see defines for more information.
var/number_level = -1
/// The sound that we will play when this security level is set
var/sound
/// The looping sound that will be played while the security level is set
var/looping_sound
/// The looping sound interval
var/looping_sound_interval
/// The shuttle call time modification of this security level
var/shuttle_call_time_mod = 0
/// Our announcement when lowering to this level
var/lowering_to_announcement
/// Our announcement when elevating to this level
var/elevating_to_announcement
/// Our configuration key for lowering to text, if set, will override the default lowering to announcement.
var/lowering_to_configuration_key
/// Our configuration key for elevating to text, if set, will override the default elevating to announcement.
var/elevating_to_configuration_key
/// Custom title to use for announcement messages
var/custom_title
/// If the alert level should disable night mode
var/disable_night_mode = FALSE
/// If the emergency lights should be activiated
var/area_alarm = FALSE
/// If pods should be available for player launch
var/pod_access = FALSE
/// If red alert access doors should be unlocked
var/emergency_doors = FALSE
/// Are players allowed to cryo
var/allow_cryo = TRUE
/// Require providing a reason for a shuttle call at this alert level
var/require_call_reason = TRUE
/datum/security_level/New()
. = ..()
if(lowering_to_configuration_key) // I'm not sure about you, but isn't there an easier way to do this?
lowering_to_announcement = global.config.Get(lowering_to_configuration_key)
if(elevating_to_configuration_key)
elevating_to_announcement = global.config.Get(elevating_to_configuration_key)
/datum/security_level/proc/on_activate(previous_level)
/**
* GREEN
*
* No threats
*/
/datum/security_level/green
name = "green"
announcement_color = "green"
sound = 'sound/misc/notice2.ogg' // Friendly beep
number_level = SEC_LEVEL_GREEN
lowering_to_configuration_key = /datum/config_entry/string/alert_green
shuttle_call_time_mod = ALERT_COEFF_GREEN
require_call_reason = FALSE
/**
* BLUE
*
* Caution advised
*/
/datum/security_level/blue
name = "blue"
announcement_color = "blue"
sound = 'sound/misc/notice1.ogg' // Angry alarm
number_level = SEC_LEVEL_BLUE
lowering_to_configuration_key = /datum/config_entry/string/alert_blue_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_blue_upto
shuttle_call_time_mod = ALERT_COEFF_BLUE
/**
* RED
*
* Hostile threats
*/
/datum/security_level/red
name = "red"
announcement_color = "red"
sound = 'sound/misc/notice4.ogg' // More angry alarm
number_level = SEC_LEVEL_RED
lowering_to_configuration_key = /datum/config_entry/string/alert_red_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_red_upto
shuttle_call_time_mod = ALERT_COEFF_RED
disable_night_mode = TRUE
pod_access = TRUE
emergency_doors = TRUE
/**
* GAMMA
*
* Station is under severe threat, but not threat of immediate destruction
*/
/datum/security_level/gamma
name = "gamma"
announcement_color = "orange"
sound = 'sound/misc/gamma_alert.ogg'
number_level = SEC_LEVEL_GAMMA
elevating_to_configuration_key = /datum/config_entry/string/alert_gamma
lowering_to_configuration_key = /datum/config_entry/string/alert_gamma
shuttle_call_time_mod = ALERT_COEFF_DELTA
disable_night_mode = TRUE
pod_access = TRUE
emergency_doors = TRUE
allow_cryo = FALSE
/**
* EPSILON
*
* Death squad alert
*/
/datum/security_level/epsilon
name = "epsilon"
announcement_color = "grey"
sound = 'sound/misc/epsilon_alert.ogg'
number_level = SEC_LEVEL_EPSILON
elevating_to_configuration_key = /datum/config_entry/string/alert_epsilon
lowering_to_configuration_key = /datum/config_entry/string/alert_epsilon
custom_title = "Epsilon Protocol Activated"
shuttle_call_time_mod = ALERT_COEFF_EPSILON
disable_night_mode = TRUE
pod_access = TRUE
emergency_doors = TRUE
allow_cryo = FALSE
/datum/security_level/epsilon/on_activate(previous_level)
send_to_playing_players(span_notice("You get a bad feeling as you hear the Epsilon alert siren."))
/**
* DELTA
*
* Station destruction is imminent
*/
/datum/security_level/delta
name = "delta"
announcement_color = "purple"
sound = 'sound/misc/delta_alert.ogg'
number_level = SEC_LEVEL_DELTA
elevating_to_configuration_key = /datum/config_entry/string/alert_delta
shuttle_call_time_mod = ALERT_COEFF_DELTA
disable_night_mode = TRUE
area_alarm = TRUE
pod_access = TRUE
emergency_doors = TRUE
allow_cryo = FALSE