Files
GS13NG/code/modules/security_levels/security_levels.dm
r4d6 12a01d1656 update (#9)
* Minor underwear fixes and tweaks.

* Allows ghost mentors to orbit around the target instead of changing their view to the mob's.

* Ports some hud and update_icon code updates.

* contamination nerf

* Fix

* Stops humanoids whose skin_tone variable is set to "albino" from showing up as pale when examined should their species not use skintones anyway.

* Hello darkness my old friend.

* Ports "Refactors can_see_reagents"

* F

* MKUltra made double opt-in

* ROBUST OPTING MECHANICS

* Adds a hacky framework for digitigrade polyclothes

also adds a digitigrade state for polychromic shorts

* also adds aphrodisiacs, slaps, all hypno as prefs

* errors

* Modernizes Polychromic Uniform Code

No more modular_citadel, but the neck polychrome crap needs more work in another PR

* oh god please don't mess up

* git y u do dis

;-;

* Revert "Makes HE pipes realistically radiate away heat"

* more coat stuff yes yes

* woops

* Wew

* Steos are bad

* new wings and fluff

* Forgot a sprite

* another one

* I swear I had this in here orginally.

* Fixes mistake in less commit.

* reattaches missing antenna

* Effectively removes the long unrequired roboticist encryption key.

* updates ratvar coat

* magazine metal cost tweaks, speedloader in AIB

* the very shitty idea: "muh speedloader"

* Updating dynamic config, some balancing

* Automatic changelog generation for PR #10282 [ci skip]

* unfucks short hair 80s so the left facing sprite doesnt make you look like a crackhead

* Automatic changelog generation for PR #10266 [ci skip]

* ah, the wonders of atomization

* [s] fixes a little door assembly glass dupe exploit

* Update BoxStation.dmm

* Update pai_defense.dm

* fixes bad sprite states

* Automatic changelog generation for PR #10242 [ci skip]

* Automatic changelog generation for PR #10237 [ci skip]

* Added a ghost role with its own spawner for the purposes of chillling in the ninja holding facility.

* holy shit i hope this compiles

* e

* yee

* Automatic changelog generation for PR #10128 [ci skip]

* Nope, it didn't compile, Harold.

* Automatic changelog generation for PR #10283 [ci skip]

* Automatic changelog generation for PR #10281 [ci skip]

* Automatic changelog generation for PR #10250 [ci skip]

* Applied suggestions and minor tweaks.

* f

* yeah fair enough

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update engine_goggles.dm

* changes

* Automatic changelog generation for PR #10264 [ci skip]

* Automatic changelog generation for PR #10298 [ci skip]

* Good idea, tbh.

* Small touch-up.

* Nerfs armor and antistun

* Automatic changelog generation for PR #10296 [ci skip]

* let the adminbus commence

* sprites

* clothing add

* fix

* vending

* loadout

* FIXEdD

* Automatic changelog generation for PR #10265 [ci skip]

* Automatic changelog generation for PR #10289 [ci skip]

* Automatic changelog generation for PR #10268 [ci skip]

* Update CentCom.dmm

* ehh fine but why would you use this proc for that

* Update language_holder.dm

* Automatic changelog generation for PR #10315 [ci skip]

* cocooooonuuuuuuts

* excludes certain ghost roles from being affected by health events

* fixes the thing

* probably fixes pandoras attacking their owners

* Update stamina.dm

* Update sprint.dm

* Update food_reagents.dm

* Automatic changelog generation for PR #10322 [ci skip]

* does the fix?

* What about this?

* Wait no its actually the other way around.

* weh

* Automatic changelog generation for PR #10297 [ci skip]

* Automatic changelog generation for PR #10299 [ci skip]

* more weh.

* even more weh.

* all of the weh.

* ah

* Automatic changelog generation for PR #10217 [ci skip]

* maybe fixes?

* Don't use named arguments on new, please.

* Made a line use the dang macro

* Made sure ghost cafe visitors don't get midround antags

* Automatic changelog generation for PR #10328 [ci skip]

* Physiology so species changes dont fuck it up

* Whoops

* Aarggghh small fucking differences

* Makes ass slap attempts fail more loudly on opted-out mobs

* Automatic changelog generation for PR #10318 [ci skip]

* Automatic changelog generation for PR #10091 [ci skip]

* Update borghydro.dm

* Update grass_carpet.dm

* Ports reflector blobs

Ports reflectors from /TG/

* mouth

* Fixes UI for poly collars

AltClick for collars was seemingly forgotten so I've added it back

* auto ooc

* roundend too

* hnnnnnng code improvements

* marshmallow

* telescopic IVs

* tiny fix

* Automatic changelog generation for PR #10324 [ci skip]

* Automatic changelog generation for PR #10323 [ci skip]

* Update code/modules/hydroponics/grown/grass_carpet.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* got it

* Update engine_goggles.dm

* [s] Fixes ghost anti-ghostrole timers a little.

* chestbursters deleting brains fix.

* Wait a minute...

* ...which var are you?

* Update belt.dm

* tiny fixes

* makes it a trait

* few fixes

* wow divide by 0 very cool

* Automatic changelog generation for PR #10095 [ci skip]

* Automatic changelog generation for PR #10312 [ci skip]

* Automatic changelog generation for PR #10243 [ci skip]

* Automatic changelog generation for PR #10336 [ci skip]

* Automatic changelog generation for PR #10335 [ci skip]

* Automatic changelog generation for PR #10334 [ci skip]

* Automatic changelog generation for PR #10239 [ci skip]

* Automatic changelog generation for PR #10168 [ci skip]

* Automatic changelog generation for PR #10331 [ci skip]

* Automatic changelog generation for PR #10320 [ci skip]

* Maybe he means this?

* CE Locker Exodus: The Removaling

Removes junk from the CE locker.
Adds empty engineering lockers.
I don't know how to do this as a child and not have populate contents fill the child.

* ok

* Automatic changelog generation for PR #10348 [ci skip]

* Automatic changelog generation for PR #10333 [ci skip]

* changelog.html

* desc

* hnnnng

* weh

* did this actually change anything

* Automatic changelog generation for PR #10337 [ci skip]

* yee.

* yee2.

* Automatic changelog generation for PR #10339 [ci skip]

* Ghommies fixes

* Automatic changelog generation for PR #10306 [ci skip]

* amazing.

* Automatic changelog generation for PR #10357 [ci skip]

* Automatic changelog generation for PR #10301 [ci skip]

* Update chem_master.dm

* Automatic changelog generation for PR #10123 [ci skip]

* Automatic changelog generation for PR #10165 [ci skip]

* Automatic changelog generation for PR #10338 [ci skip]

* Automatic changelog generation for PR #10344 [ci skip]

* Oh god oh fuck

* Update code/modules/hydroponics/seeds.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/hydroponics/seeds.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/hydroponics/gene_modder.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update telescopic_iv.dm

* Automatic changelog generation for PR #10364 [ci skip]

* afwafwadjiwao

* Automatic changelog generation for PR #10365 [ci skip]

* Automatic changelog generation for PR #10319 [ci skip]

* Automatic changelog generation for PR #10345 [ci skip]

* Automatic changelog generation for PR #10362 [ci skip]

* Automatic changelog generation for PR #10309 [ci skip]

* Makes lockers into subtypes

Adds new lockers cleanly at the bottom instead and as subtypes.

* dab

* dab 2x

* Automatic changelog generation for PR #10349 [ci skip]

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Putnam3145 <putnam3145@gmail.com>
Co-authored-by: Michiyamenotehifunana <31995558+Michiyamenotehifunana@users.noreply.github.com>
Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com>
Co-authored-by: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com>
Co-authored-by: shellspeed1 <46614774+shellspeed1@users.noreply.github.com>
Co-authored-by: Hatterhat <31829017+Hatterhat@users.noreply.github.com>
Co-authored-by: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Co-authored-by: CitadelStationBot <citadelstationcommunity@gmail.com>
Co-authored-by: Detective-Google <48196179+Detective-Google@users.noreply.github.com>
Co-authored-by: LetterJay <9606363+LetterJay@users.noreply.github.com>
Co-authored-by: Lin <linzolle@gmail.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: kappa-sama <44128284+kappa-sama@users.noreply.github.com>
Co-authored-by: Arturlang <arturpaavooskari.lang@gmail.com>
Co-authored-by: loginsandylogout <nintendofan356@gmail.com>
Co-authored-by: BlackMajor <henrydyer6@hotmail.com>
Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com>
Co-authored-by: nik707 <38332985+nik707@users.noreply.github.com>
2019-12-31 13:12:23 -05:00

157 lines
6.0 KiB
Plaintext

GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
//SEC_LEVEL_GREEN = code green
//SEC_LEVEL_BLUE = code blue
//SEC_LEVEL_AMBER = code amber
//SEC_LEVEL_RED = code red
//SEC_LEVEL_DELTA = code delta
//config.alert_desc_blue_downto
/proc/set_security_level(level)
switch(level)
if("green")
level = SEC_LEVEL_GREEN
if("blue")
level = SEC_LEVEL_BLUE
if("amber")
level = SEC_LEVEL_AMBER
if("red")
level = SEC_LEVEL_RED
if("delta")
level = SEC_LEVEL_DELTA
//Will not be announced if you try to set to the same level as it already is
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level)
switch(level)
if(SEC_LEVEL_GREEN)
minor_announce(CONFIG_GET(string/alert_green), "Attention! Security level lowered to green:")
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level >= SEC_LEVEL_RED)
SSshuttle.emergency.modTimer(4)
else if(GLOB.security_level == SEC_LEVEL_AMBER)
SSshuttle.emergency.modTimer(2.5)
else
SSshuttle.emergency.modTimer(1.66)
GLOB.security_level = SEC_LEVEL_GREEN
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_level(FA.z))
FA.update_icon()
if(SEC_LEVEL_BLUE)
if(GLOB.security_level < SEC_LEVEL_BLUE)
minor_announce(CONFIG_GET(string/alert_blue_upto), "Attention! Security level elevated to blue:",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
SSshuttle.emergency.modTimer(0.6)
else
minor_announce(CONFIG_GET(string/alert_blue_downto), "Attention! Security level lowered to blue:")
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level >= SEC_LEVEL_RED)
SSshuttle.emergency.modTimer(2.4)
else
SSshuttle.emergency.modTimer(1.5)
GLOB.security_level = SEC_LEVEL_BLUE
sound_to_playing_players('sound/misc/voybluealert.ogg', volume = 50) // Citadel change - Makes alerts play a sound
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_level(FA.z))
FA.update_icon()
if(SEC_LEVEL_AMBER)
if(GLOB.security_level < SEC_LEVEL_AMBER)
minor_announce(CONFIG_GET(string/alert_amber_upto), "Attention! Security level elevated to amber:",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level == SEC_LEVEL_GREEN)
SSshuttle.emergency.modTimer(0.4)
else
SSshuttle.emergency.modTimer(0.66)
else
minor_announce(CONFIG_GET(string/alert_amber_downto), "Attention! Security level lowered to amber:")
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
SSshuttle.emergency.modTimer(1.6)
GLOB.security_level = SEC_LEVEL_AMBER
sound_to_playing_players('sound/effects/alert.ogg', volume = 50) // Citadel change - Makes alerts play a sound
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_level(FA.z))
FA.update_icon()
if(SEC_LEVEL_RED)
if(GLOB.security_level < SEC_LEVEL_RED)
minor_announce(CONFIG_GET(string/alert_red_upto), "Attention! Code red!",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level == SEC_LEVEL_GREEN)
SSshuttle.emergency.modTimer(0.25)
else if(GLOB.security_level == SEC_LEVEL_BLUE)
SSshuttle.emergency.modTimer(0.416)
else
SSshuttle.emergency.modTimer(0.625)
else
minor_announce(CONFIG_GET(string/alert_red_downto), "Attention! Code red!")
GLOB.security_level = SEC_LEVEL_RED
sound_to_playing_players('sound/misc/voyalert.ogg', volume = 50) // Citadel change - Makes alerts play a sound
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_level(FA.z))
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
if(SEC_LEVEL_DELTA)
minor_announce(CONFIG_GET(string/alert_delta), "Attention! Delta security level reached!",1)
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
if(GLOB.security_level < SEC_LEVEL_BLUE)
SSshuttle.emergency.modTimer(0.25)
else if(GLOB.security_level == SEC_LEVEL_BLUE)
SSshuttle.emergency.modTimer(0.416)
else
SSshuttle.emergency.modTimer(0.625)
GLOB.security_level = SEC_LEVEL_DELTA
sound_to_playing_players('sound/misc/deltakalaxon.ogg') // Citadel change - Makes alerts play a sound
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_level(FA.z))
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
if(level >= SEC_LEVEL_RED)
for(var/obj/machinery/door/D in GLOB.machines)
if(D.red_alert_access)
D.visible_message("<span class='notice'>[D] whirrs as it automatically lifts access requirements!</span>")
playsound(D, 'sound/machines/boltsup.ogg', 50, TRUE)
SSblackbox.record_feedback("tally", "security_level_changes", 1, get_security_level())
SSnightshift.check_nightshift()
else
return
/proc/get_security_level()
switch(GLOB.security_level)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_AMBER)
return "amber"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/num2seclevel(num)
switch(num)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_AMBER)
return "amber"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/seclevel2num(seclevel)
switch( lowertext(seclevel) )
if("green")
return SEC_LEVEL_GREEN
if("blue")
return SEC_LEVEL_BLUE
if("amber")
return SEC_LEVEL_AMBER
if("red")
return SEC_LEVEL_RED
if("delta")
return SEC_LEVEL_DELTA