forked from Aurorastation/Aurora.3
/
security.dm
479 lines (427 loc) · 15.9 KB
/
security.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
/obj/structure/closet/secure_closet/captains
name = "captain's locker"
req_access = list(access_captain)
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
fill()
//Appearance
if(prob(50))
new /obj/item/weapon/storage/backpack/captain(src)
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/caphat/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/clothing/gloves/captain(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/head/caphat/formal(src)
new /obj/item/clothing/under/captainformal(src)
//Tools
new /obj/item/device/radio/headset/heads/captain(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/telebaton(src)
/obj/structure/closet/secure_closet/captains2
name = "captain's attire"
req_access = list(access_captain)
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
fill()
new /obj/item/weapon/storage/backpack/captain(src)
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/caphat(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/gloves/captain(src)
new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/head/helmet/formalcaptain(src)
new /obj/item/clothing/under/captainformal(src)
/obj/structure/closet/secure_closet/hop
name = "head of personnel's locker"
req_access = list(access_hop)
icon_state = "hopsecure1"
icon_closed = "hopsecure"
icon_locked = "hopsecure1"
icon_opened = "hopsecureopen"
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
fill()
..()
//Supply
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids( src )
//Appearance
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/clothing/head/helmet(src)
//Tools
new /obj/item/weapon/cartridge/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/weapon/gun/projectile/sec/flash(src)
new /obj/item/device/flash(src)
/obj/structure/closet/secure_closet/hop2
name = "head of personnel's attire"
req_access = list(access_hop)
icon_state = "hopsecure1"
icon_closed = "hopsecure"
icon_locked = "hopsecure1"
icon_opened = "hopsecureopen"
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
fill()
..()
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/under/dress/dress_hop(src)
new /obj/item/clothing/under/dress/dress_hr(src)
new /obj/item/clothing/under/lawyer/female(src)
new /obj/item/clothing/under/lawyer/black(src)
new /obj/item/clothing/under/lawyer/red(src)
new /obj/item/clothing/under/lawyer/oldman(src)
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/leather(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/head/caphat/hop(src)
/obj/structure/closet/secure_closet/hos
name = "head of security's locker"
req_access = list(access_hos)
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
fill()
..()
//Supply
new /obj/item/weapon/storage/box/flashbangs(src)
//Appearance
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/under/rank/head_of_security/corp(src)
new /obj/item/clothing/suit/storage/toggle/armor/hos/jensen(src)
new /obj/item/clothing/suit/armor/hos(src)
new /obj/item/clothing/suit/storage/vest/hos(src)
new /obj/item/clothing/head/helmet/HoS/dermal(src)
new /obj/item/clothing/head/helmet/HoS(src)
new /obj/item/clothing/head/beret/sec/hos(src)
new /obj/item/clothing/accessory/badge/hos(src)
//Tools
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/ammo_magazine/tranq(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/clothing/glasses/sunglasses/sechud/head(src)
new /obj/item/weapon/shield/riot/tact(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/flash(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/breath_analyzer(src)
//Belts
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/storage/belt/security(src)
/obj/structure/closet/secure_closet/hos2
name = "head of security's attire"
req_access = list(access_hos)
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
fill()
//Appearance
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/under/rank/head_of_security/corp(src)
new /obj/item/clothing/suit/storage/vest/hos(src)
new /obj/item/clothing/head/beret/sec/hos(src)
new /obj/item/clothing/head/helmet/HoS(src)
//Tools
new /obj/item/clothing/glasses/sunglasses/sechud/aviator(src)
new /obj/item/device/radio/headset/heads/hos(src)
//Belts
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/device/breath_analyzer(src)
/obj/structure/closet/secure_closet/warden
name = "warden's locker"
req_access = list(access_armory)
icon_state = "wardensecure1"
icon_closed = "wardensecure"
icon_locked = "wardensecure1"
icon_opened = "wardensecureopen"
icon_broken = "wardensecurebroken"
icon_off = "wardensecureoff"
fill()
//Supply
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/teargas(src)
//Appearance
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/storage/vest/warden(src)
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/under/rank/warden/corp(src)
new /obj/item/clothing/suit/armor/vest/warden(src)
new /obj/item/clothing/suit/armor/vest/warden/commissar(src)
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/clothing/head/helmet/warden(src)
new /obj/item/clothing/head/helmet/warden/commissar(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/clothing/accessory/badge/warden(src)
//Tools
new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud/aviator(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/pistol(src)
//Belts
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/accessory/storage/black_vest(src)
/obj/structure/closet/secure_closet/security_cadet
name = "security cadet's locker"
req_access = list(access_security)
icon_state = "seccadet1"
icon_closed = "seccadet"
icon_locked = "seccadet1"
icon_opened = "seccadetopen"
icon_broken = "seccadetbroken"
icon_off = "seccadetoff"
fill()
//Appearance
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/under/rank/security2(src)
//Tools
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
//Belts
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/weapon/storage/belt/security(src)
/obj/structure/closet/secure_closet/security
name = "security officer's locker"
req_access = list(access_brig)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
fill()
//Appearance
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/soft/sec/corp(src)
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/clothing/suit/storage/vest/officer(src)
new /obj/item/clothing/head/helmet(src)
//Tools
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud/aviator(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/random/handgun(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
new /obj/item/weapon/handcuffs(src)
//Belts
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/weapon/storage/belt/security(src)
/obj/structure/closet/secure_closet/security/cargo
fill()
..()
new /obj/item/clothing/accessory/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
/obj/structure/closet/secure_closet/security/engine
fill()
..()
new /obj/item/clothing/accessory/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
/obj/structure/closet/secure_closet/security/science
fill()
..()
new /obj/item/clothing/accessory/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
/obj/structure/closet/secure_closet/security/med
fill()
..()
new /obj/item/clothing/accessory/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
/obj/structure/closet/secure_closet/detective
name = "detective's locker"
req_access = list(access_detective)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
fill()
//Appearance
new /obj/item/clothing/suit/storage/toggle/det_jacket(src)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/under/det/black(src)
new /obj/item/clothing/under/det/slob(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/shoes/brown(src)
//Tools
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/suit/storage/vest/detective(src)
new /obj/item/ammo_magazine/c38(src)
new /obj/item/ammo_magazine/c38(src)
new /obj/item/weapon/gun/projectile/revolver/detective(src)
new /obj/item/taperoll/police(src)
//Belts
new /obj/item/clothing/accessory/holster/armpit(src)
/obj/structure/closet/secure_closet/detective/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
else if(isrobot(user))
return
else if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_from_inventory(W,loc)
else if(!opened)
if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
spark(src, 5)
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
else
togglelock(user)//Attempt to lock locker if closed
/obj/structure/closet/secure_closet/csi
name = "forensic technician's locker"
req_access = list(access_forensics_lockers)
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
fill()
//Appearance
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/suit/storage/forensics/blue(src)
new /obj/item/clothing/suit/storage/forensics/red(src)
new /obj/item/clothing/suit/storage/vest/csi(src)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/under/det/black(src)
new /obj/item/clothing/under/det/slob(src)
new /obj/item/clothing/under/det/forensics(src)
new /obj/item/clothing/shoes/brown(src)
//Tools
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/flash(src)
new /obj/item/taperoll/police(src)
/obj/structure/closet/secure_closet/injection
name = "lethal injections locker"
req_access = list(access_captain)
fill()
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
// These are special snowflakes that need to be in a global list.
/obj/structure/closet/secure_closet/brig
name = "brig locker"
req_access = list(access_brig)
anchored = 1
var/id = null
Initialize()
. = ..()
brig_closets += src
Destroy()
brig_closets -= src
return ..()
fill()
new /obj/item/clothing/under/color/orange( src )
new /obj/item/clothing/shoes/orange( src )
/obj/structure/closet/secure_closet/courtroom
name = "courtroom locker"
req_access = list(access_lawyer)
fill()
..()
//Appearance
new /obj/item/clothing/head/powdered_wig (src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/suit/judgerobe (src)
//Tools
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/pen (src)
new /obj/item/weapon/storage/briefcase(src)
/obj/structure/closet/secure_closet/wall
name = "wall locker"
req_access = list(access_security)
icon_state = "wall-locker1"
density = 1
icon_closed = "wall-locker"
icon_locked = "wall-locker1"
icon_opened = "wall-lockeropen"
icon_broken = "wall-lockerbroken"
icon_off = "wall-lockeroff"
//too small to put a man in
large = 0
/obj/structure/closet/secure_closet/wall/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened