/
security_level_datums.dm
92 lines (86 loc) · 2.92 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
/**
* 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
/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)
/**
* 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
/**
* 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/notice3.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
/**
* DELTA
*
* Station destruction is imminent
*/
/datum/security_level/delta
name = "delta"
announcement_color = "purple"
sound = 'sound/misc/airraid.ogg' // Air alarm to signify importance
number_level = SEC_LEVEL_DELTA
elevating_to_configuration_key = /datum/config_entry/string/alert_delta
shuttle_call_time_mod = ALERT_COEFF_DELTA