forked from TauCetiStation/TauCetiClassic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smartlight_presets.dm
199 lines (148 loc) · 4.81 KB
/
smartlight_presets.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
var/global/list/smartlight_presets
/datum/smartlight_preset
var/name // for map configs mostly, also for APC with custom settings
var/default_mode
var/nightshift_mode
var/no_nightshift_mode = FALSE // for area APC
var/list/available_modes = list()
var/list/disabled_modes = list()
/datum/smartlight_preset/proc/get_user_available_modes()
. = list()
for(var/type in (available_modes - disabled_modes))
var/datum/light_mode/LM = global.light_modes_by_type[type]
.[LM.name] = LM
return .
/datum/smartlight_preset/proc/disable_mode(path)
if(path in available_modes)
disabled_modes += path
return TRUE
/datum/smartlight_preset/proc/enable_mode(path)
if(path in disabled_modes)
disabled_modes -= path
return TRUE
/datum/smartlight_preset/proc/add_mode(path, disabled = FALSE)
if(path in available_modes)
return FALSE
available_modes += path
if(disabled)
disabled_modes += path
return TRUE
// expand default station preset (base) with custom APC preset (src)
/datum/smartlight_preset/proc/expand_onto(datum/smartlight_preset/base)
name = "[base.name][name ? " [name]" : ""]"
default_mode = default_mode ? default_mode : base.default_mode
if(!no_nightshift_mode)
nightshift_mode = nightshift_mode ? nightshift_mode : base.nightshift_mode
available_modes = base.available_modes | available_modes
disabled_modes = base.disabled_modes | disabled_modes
/*
Global Map presets
*/
/datum/smartlight_preset/default
name = "default"
default_mode = /datum/light_mode/default
//nightshift_mode = /datum/light_mode/soft
nightshift_mode = /datum/light_mode/default
no_nightshift_mode = TRUE
available_modes = list(
/datum/light_mode/default,
/datum/light_mode/k3000,
/datum/light_mode/k4000,
/datum/light_mode/k5000,
/datum/light_mode/k6000,
/datum/light_mode/soft,
/datum/light_mode/hard,
)
/datum/smartlight_preset/horror_station // emag preset
name = "horror"
default_mode = /datum/light_mode/horror
no_nightshift_mode = TRUE
available_modes = list(
/datum/light_mode/horror,
)
/*
Local APC presets (will expand global one)
*/
/datum/smartlight_preset/bar
name = "bar"
default_mode = /datum/light_mode/default
no_nightshift_mode = TRUE
available_modes = list(
/datum/light_mode/blue_night,
/datum/light_mode/soft_blue,
/datum/light_mode/neon,
/datum/light_mode/neon_dark,
)
// todo: maybe need to be replaced with custom_smartlight_preset for APC in areas
/*var/global/hard_lighting_arealist = typecacheof(typesof(/area/station/medical) + typesof(/area/station/rnd) + typesof(/area/asteroid/research_outpost))
/datum/smartlight_preset/hardlight_nightshift
name = "operating nightshift"
nightshift_mode = /datum/light_mode/hard
available_modes = list(/datum/light_mode/hard)*/
/datum/smartlight_preset/rnd
name = "RnD"
default_mode = /datum/light_mode/rnd
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/rnd)
/datum/smartlight_preset/medbay
name = "MedBay"
default_mode = /datum/light_mode/medbay
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/medbay)
/datum/smartlight_preset/brig
name = "Brig"
default_mode = /datum/light_mode/brig
no_nightshift_mode = TRUE
available_modes = list(
/datum/light_mode/brig,
/datum/light_mode/brig/dark,
)
/datum/smartlight_preset/brig/dark
name = "Dark Brig"
default_mode = /datum/light_mode/brig/dark
no_nightshift_mode = TRUE
available_modes = list(
/datum/light_mode/brig,
/datum/light_mode/brig/dark,
)
/datum/smartlight_preset/engineering
name = "Engineering"
default_mode = /datum/light_mode/engineering
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/engineering)
/datum/smartlight_preset/cargo
name = "Cargo"
default_mode = /datum/light_mode/cargo
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/cargo)
/datum/smartlight_preset/k3000
name = "default 3000k"
default_mode = /datum/light_mode/k3000
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/k3000)
/datum/smartlight_preset/k4000
name = "default 4000k"
default_mode = /datum/light_mode/k4000
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/k4000)
/datum/smartlight_preset/k5000
name = "default 5000k"
default_mode = /datum/light_mode/k5000
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/k5000)
/datum/smartlight_preset/k6000
name = "default 6000k"
no_nightshift_mode = TRUE
default_mode = /datum/light_mode/k6000
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/k6000)
/datum/smartlight_preset/soft
name = "soft"
default_mode = /datum/light_mode/soft
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/soft)
/datum/smartlight_preset/hard
name = "hard"
default_mode = /datum/light_mode/hard
no_nightshift_mode = TRUE
available_modes = list(/datum/light_mode/hard)