Whitespace Standardization [MDB IGNORE] (#15748)

* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d844.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d.

* Attempt to normalize example.yml (and another file I guess)

* Try again
This commit is contained in:
Drathek
2024-02-20 02:28:51 -08:00
committed by GitHub
parent 3b61f677b3
commit 7c8bb85de3
1175 changed files with 818171 additions and 818145 deletions
@@ -1,203 +1,203 @@
/obj/machinery/keycard_auth
name = "Keycard Authentication Device"
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate."
icon = 'icons/obj/monitors.dmi'
icon_state = "auth_off"
layer = ABOVE_WINDOW_LAYER
circuit = /obj/item/weapon/circuitboard/keycard_auth
var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made.
var/event = ""
var/screen = 1
var/confirmed = 0 //This variable is set by the device that confirms the request.
var/confirm_delay = 20 //(2 seconds)
var/busy = 0 //Busy when waiting for authentication or an event request has been sent from this device.
var/obj/machinery/keycard_auth/event_source
var/mob/event_triggered_by
var/mob/event_confirmed_by
//1 = select event
//2 = authenticate
anchored = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
/obj/machinery/keycard_auth/attack_ai(mob/user as mob)
to_chat (user, "<span class='warning'>A firewall prevents you from interfacing with this device!</span>")
return
/obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(stat & (NOPOWER|BROKEN))
to_chat(user, "This device is not powered.")
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/ID = W
if(access_keycard_auth in ID.access)
if(active == 1)
//This is not the device that made the initial request. It is the device confirming the request.
if(event_source)
event_source.confirmed = 1
event_source.event_confirmed_by = usr
else if(screen == 2)
event_triggered_by = usr
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
if(W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "You begin removing the faceplate from the [src]")
playsound(src, W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed))
to_chat(user, "You remove the faceplate from the [src]")
var/obj/structure/frame/A = new /obj/structure/frame(loc)
var/obj/item/weapon/circuitboard/M = new circuit(A)
A.frame_type = M.board_type
A.need_circuit = 0
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = TRUE
for (var/obj/C in src)
C.forceMove(loc)
A.state = 3
A.update_icon()
M.deconstruct(src)
qdel(src)
return
/obj/machinery/keycard_auth/power_change()
..()
if(stat &NOPOWER)
icon_state = "auth_off"
/obj/machinery/keycard_auth/attack_hand(mob/user as mob)
if(user.stat || stat & (NOPOWER|BROKEN))
to_chat(user, "This device is not powered.")
return
if(!user.IsAdvancedToolUser())
return 0
if(busy)
to_chat(user, "This device is busy.")
return
user.set_machine(src)
var/dat = "<h1>Keycard Authentication Device</h1>"
dat += "This device is used to trigger some high security events. It requires the simultaneous swipe of two high-level ID cards."
dat += "<br><hr><br>"
if(screen == 1)
dat += "Select an event to trigger:<ul>"
dat += "<li><A href='?src=\ref[src];triggerevent=Red alert'>Red alert</A></li>"
if(!config.ert_admin_call_only)
dat += "<li><A href='?src=\ref[src];triggerevent=Emergency Response Team'>Emergency Response Team</A></li>"
dat += "<li><A href='?src=\ref[src];triggerevent=Grant Emergency Maintenance Access'>Grant Emergency Maintenance Access</A></li>"
dat += "<li><A href='?src=\ref[src];triggerevent=Revoke Emergency Maintenance Access'>Revoke Emergency Maintenance Access</A></li>"
dat += "</ul>"
user << browse(dat, "window=keycard_auth;size=500x250")
if(screen == 2)
dat += "Please swipe your card to authorize the following event: <b>[event]</b>"
dat += "<p><A href='?src=\ref[src];reset=1'>Back</A>"
user << browse(dat, "window=keycard_auth;size=500x250")
return
/obj/machinery/keycard_auth/Topic(href, href_list)
..()
if(busy)
to_chat(usr, "This device is busy.")
return
if(usr.stat || stat & (BROKEN|NOPOWER))
to_chat(usr, "This device is without power.")
return
if(href_list["triggerevent"])
event = href_list["triggerevent"]
screen = 2
if(href_list["reset"])
reset()
updateUsrDialog()
add_fingerprint(usr)
return
/obj/machinery/keycard_auth/proc/reset()
active = 0
event = ""
screen = 1
confirmed = 0
event_source = null
icon_state = "auth_off"
event_triggered_by = null
event_confirmed_by = null
/obj/machinery/keycard_auth/proc/broadcast_request()
icon_state = "auth_on"
for(var/obj/machinery/keycard_auth/KA in machines)
if(KA == src) continue
KA.reset()
spawn()
KA.receive_request(src)
sleep(confirm_delay)
if(confirmed)
confirmed = 0
trigger_event(event)
log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]")
message_admins("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]", 1)
reset()
/obj/machinery/keycard_auth/proc/receive_request(var/obj/machinery/keycard_auth/source)
if(stat & (BROKEN|NOPOWER))
return
event_source = source
busy = 1
active = 1
icon_state = "auth_on"
sleep(confirm_delay)
event_source = null
icon_state = "auth_off"
active = 0
busy = 0
/obj/machinery/keycard_auth/proc/trigger_event()
switch(event)
if("Red alert")
set_security_level(SEC_LEVEL_RED)
feedback_inc("alert_keycard_auth_red",1)
if("Grant Emergency Maintenance Access")
make_maint_all_access()
feedback_inc("alert_keycard_auth_maintGrant",1)
if("Revoke Emergency Maintenance Access")
revoke_maint_all_access()
feedback_inc("alert_keycard_auth_maintRevoke",1)
if("Emergency Response Team")
if(is_ert_blocked())
to_chat(usr, span_red("All emergency response teams are dispatched and can not be called at this time."))
return
trigger_armed_response_team(1)
feedback_inc("alert_keycard_auth_ert",1)
/obj/machinery/keycard_auth/proc/is_ert_blocked()
if(config.ert_admin_call_only) return 1
return ticker.mode && ticker.mode.ert_disabled
var/global/maint_all_access = 0
/proc/make_maint_all_access()
maint_all_access = 1
to_world(span_red("<font size=4>Attention!</font>"))
to_world(span_red("The maintenance access requirement has been revoked on all airlocks."))
/proc/revoke_maint_all_access()
maint_all_access = 0
to_world(span_red("<font size=4>Attention!</font>"))
to_world(span_red("The maintenance access requirement has been readded on all maintenance airlocks."))
/obj/machinery/door/airlock/allowed(mob/M)
if(maint_all_access && src.check_access_list(list(access_maint_tunnels)))
return 1
return ..(M)
/obj/machinery/keycard_auth
name = "Keycard Authentication Device"
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate."
icon = 'icons/obj/monitors.dmi'
icon_state = "auth_off"
layer = ABOVE_WINDOW_LAYER
circuit = /obj/item/weapon/circuitboard/keycard_auth
var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made.
var/event = ""
var/screen = 1
var/confirmed = 0 //This variable is set by the device that confirms the request.
var/confirm_delay = 20 //(2 seconds)
var/busy = 0 //Busy when waiting for authentication or an event request has been sent from this device.
var/obj/machinery/keycard_auth/event_source
var/mob/event_triggered_by
var/mob/event_confirmed_by
//1 = select event
//2 = authenticate
anchored = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
/obj/machinery/keycard_auth/attack_ai(mob/user as mob)
to_chat (user, "<span class='warning'>A firewall prevents you from interfacing with this device!</span>")
return
/obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(stat & (NOPOWER|BROKEN))
to_chat(user, "This device is not powered.")
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/ID = W
if(access_keycard_auth in ID.access)
if(active == 1)
//This is not the device that made the initial request. It is the device confirming the request.
if(event_source)
event_source.confirmed = 1
event_source.event_confirmed_by = usr
else if(screen == 2)
event_triggered_by = usr
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
if(W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "You begin removing the faceplate from the [src]")
playsound(src, W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed))
to_chat(user, "You remove the faceplate from the [src]")
var/obj/structure/frame/A = new /obj/structure/frame(loc)
var/obj/item/weapon/circuitboard/M = new circuit(A)
A.frame_type = M.board_type
A.need_circuit = 0
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = TRUE
for (var/obj/C in src)
C.forceMove(loc)
A.state = 3
A.update_icon()
M.deconstruct(src)
qdel(src)
return
/obj/machinery/keycard_auth/power_change()
..()
if(stat &NOPOWER)
icon_state = "auth_off"
/obj/machinery/keycard_auth/attack_hand(mob/user as mob)
if(user.stat || stat & (NOPOWER|BROKEN))
to_chat(user, "This device is not powered.")
return
if(!user.IsAdvancedToolUser())
return 0
if(busy)
to_chat(user, "This device is busy.")
return
user.set_machine(src)
var/dat = "<h1>Keycard Authentication Device</h1>"
dat += "This device is used to trigger some high security events. It requires the simultaneous swipe of two high-level ID cards."
dat += "<br><hr><br>"
if(screen == 1)
dat += "Select an event to trigger:<ul>"
dat += "<li><A href='?src=\ref[src];triggerevent=Red alert'>Red alert</A></li>"
if(!config.ert_admin_call_only)
dat += "<li><A href='?src=\ref[src];triggerevent=Emergency Response Team'>Emergency Response Team</A></li>"
dat += "<li><A href='?src=\ref[src];triggerevent=Grant Emergency Maintenance Access'>Grant Emergency Maintenance Access</A></li>"
dat += "<li><A href='?src=\ref[src];triggerevent=Revoke Emergency Maintenance Access'>Revoke Emergency Maintenance Access</A></li>"
dat += "</ul>"
user << browse(dat, "window=keycard_auth;size=500x250")
if(screen == 2)
dat += "Please swipe your card to authorize the following event: <b>[event]</b>"
dat += "<p><A href='?src=\ref[src];reset=1'>Back</A>"
user << browse(dat, "window=keycard_auth;size=500x250")
return
/obj/machinery/keycard_auth/Topic(href, href_list)
..()
if(busy)
to_chat(usr, "This device is busy.")
return
if(usr.stat || stat & (BROKEN|NOPOWER))
to_chat(usr, "This device is without power.")
return
if(href_list["triggerevent"])
event = href_list["triggerevent"]
screen = 2
if(href_list["reset"])
reset()
updateUsrDialog()
add_fingerprint(usr)
return
/obj/machinery/keycard_auth/proc/reset()
active = 0
event = ""
screen = 1
confirmed = 0
event_source = null
icon_state = "auth_off"
event_triggered_by = null
event_confirmed_by = null
/obj/machinery/keycard_auth/proc/broadcast_request()
icon_state = "auth_on"
for(var/obj/machinery/keycard_auth/KA in machines)
if(KA == src) continue
KA.reset()
spawn()
KA.receive_request(src)
sleep(confirm_delay)
if(confirmed)
confirmed = 0
trigger_event(event)
log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]")
message_admins("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]", 1)
reset()
/obj/machinery/keycard_auth/proc/receive_request(var/obj/machinery/keycard_auth/source)
if(stat & (BROKEN|NOPOWER))
return
event_source = source
busy = 1
active = 1
icon_state = "auth_on"
sleep(confirm_delay)
event_source = null
icon_state = "auth_off"
active = 0
busy = 0
/obj/machinery/keycard_auth/proc/trigger_event()
switch(event)
if("Red alert")
set_security_level(SEC_LEVEL_RED)
feedback_inc("alert_keycard_auth_red",1)
if("Grant Emergency Maintenance Access")
make_maint_all_access()
feedback_inc("alert_keycard_auth_maintGrant",1)
if("Revoke Emergency Maintenance Access")
revoke_maint_all_access()
feedback_inc("alert_keycard_auth_maintRevoke",1)
if("Emergency Response Team")
if(is_ert_blocked())
to_chat(usr, span_red("All emergency response teams are dispatched and can not be called at this time."))
return
trigger_armed_response_team(1)
feedback_inc("alert_keycard_auth_ert",1)
/obj/machinery/keycard_auth/proc/is_ert_blocked()
if(config.ert_admin_call_only) return 1
return ticker.mode && ticker.mode.ert_disabled
var/global/maint_all_access = 0
/proc/make_maint_all_access()
maint_all_access = 1
to_world(span_red("<font size=4>Attention!</font>"))
to_world(span_red("The maintenance access requirement has been revoked on all airlocks."))
/proc/revoke_maint_all_access()
maint_all_access = 0
to_world(span_red("<font size=4>Attention!</font>"))
to_world(span_red("The maintenance access requirement has been readded on all maintenance airlocks."))
/obj/machinery/door/airlock/allowed(mob/M)
if(maint_all_access && src.check_access_list(list(access_maint_tunnels)))
return 1
return ..(M)
+159 -159
View File
@@ -1,160 +1,160 @@
/var/security_level = 0
//0 = code green
//1 = code yellow
//2 = code violet
//3 = code orange
//4 = code blue
//5 = code red
//6 = code delta
//config.alert_desc_blue_downto
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg'))
/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1)
/proc/set_security_level(var/level)
switch(level)
if("green")
level = SEC_LEVEL_GREEN
if("yellow")
level = SEC_LEVEL_YELLOW
if("violet")
level = SEC_LEVEL_VIOLET
if("orange")
level = SEC_LEVEL_ORANGE
if("blue")
level = SEC_LEVEL_BLUE
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 != security_level)
switch(level)
if(SEC_LEVEL_GREEN)
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Alert level lowered to code green.")
security_level = SEC_LEVEL_GREEN
if(SEC_LEVEL_YELLOW)
if(security_level < SEC_LEVEL_YELLOW)
security_announcement_up.Announce("[config.alert_desc_yellow_upto]", "Attention! Alert level elevated to yellow")
else
security_announcement_down.Announce("[config.alert_desc_yellow_downto]", "Attention! Alert level lowered to yellow")
security_level = SEC_LEVEL_YELLOW
if(SEC_LEVEL_VIOLET)
if(security_level < SEC_LEVEL_VIOLET)
security_announcement_up.Announce("[config.alert_desc_violet_upto]", "Attention! Alert level elevated to violet")
else
security_announcement_down.Announce("[config.alert_desc_violet_downto]", "Attention! Alert level lowered to violet")
security_level = SEC_LEVEL_VIOLET
if(SEC_LEVEL_ORANGE)
if(security_level < SEC_LEVEL_ORANGE)
security_announcement_up.Announce("[config.alert_desc_orange_upto]", "Attention! Alert level elevated to orange")
else
security_announcement_down.Announce("[config.alert_desc_orange_downto]", "Attention! Alert level lowered to orange")
security_level = SEC_LEVEL_ORANGE
if(SEC_LEVEL_BLUE)
if(security_level < SEC_LEVEL_BLUE)
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Alert level elevated to blue")
else
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Alert level lowered to blue")
security_level = SEC_LEVEL_BLUE
if(SEC_LEVEL_RED)
if(security_level < SEC_LEVEL_RED)
security_announcement_up.Announce("[config.alert_desc_red_upto]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
else
security_announcement_down.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
security_level = SEC_LEVEL_RED
if(SEC_LEVEL_DELTA)
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
security_level = SEC_LEVEL_DELTA
var/newlevel = get_security_level()
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z in using_map.contact_levels)
FA.set_security_level(newlevel)
for(var/obj/machinery/status_display/FA in machines)
if(FA.z in using_map.contact_levels)
FA.on_alert_changed(newlevel)
//VOREStation Add
for(var/obj/machinery/holoposter/HP as anything in GLOB.holoposters)
HP.update_icon()
//VOREStation Add End
if(level >= SEC_LEVEL_RED)
atc.reroute_traffic(yes = 1) // Tell them fuck off we're busy.
else
atc.reroute_traffic(yes = 0)
spawn()
SSnightshift.check_nightshift()
admin_chat_message(message = "Security level is now: [uppertext(get_security_level())]", color = "#CC2222") //VOREStation Add
/proc/get_security_level()
switch(security_level)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_YELLOW)
return "yellow"
if(SEC_LEVEL_VIOLET)
return "violet"
if(SEC_LEVEL_ORANGE)
return "orange"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/num2seclevel(var/num)
switch(num)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_YELLOW)
return "yellow"
if(SEC_LEVEL_VIOLET)
return "violet"
if(SEC_LEVEL_ORANGE)
return "orange"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/seclevel2num(var/seclevel)
switch( lowertext(seclevel) )
if("green")
return SEC_LEVEL_GREEN
if("yellow")
return SEC_LEVEL_YELLOW
if("violet")
return SEC_LEVEL_VIOLET
if("orange")
return SEC_LEVEL_ORANGE
if("blue")
return SEC_LEVEL_BLUE
if("red")
return SEC_LEVEL_RED
if("delta")
return SEC_LEVEL_DELTA
/*DEBUG
/mob/verb/set_thing0()
set_security_level(0)
/mob/verb/set_thing1()
set_security_level(1)
/mob/verb/set_thing2()
set_security_level(2)
/mob/verb/set_thing3()
set_security_level(3)
/mob/verb/set_thing4()
set_security_level(4)
/mob/verb/set_thing5()
set_security_level(5)
/mob/verb/set_thing6()
set_security_level(6)
/var/security_level = 0
//0 = code green
//1 = code yellow
//2 = code violet
//3 = code orange
//4 = code blue
//5 = code red
//6 = code delta
//config.alert_desc_blue_downto
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/effects/alert_levels/alert_raise.ogg'))
/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1)
/proc/set_security_level(var/level)
switch(level)
if("green")
level = SEC_LEVEL_GREEN
if("yellow")
level = SEC_LEVEL_YELLOW
if("violet")
level = SEC_LEVEL_VIOLET
if("orange")
level = SEC_LEVEL_ORANGE
if("blue")
level = SEC_LEVEL_BLUE
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 != security_level)
switch(level)
if(SEC_LEVEL_GREEN)
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Alert level lowered to code green.")
security_level = SEC_LEVEL_GREEN
if(SEC_LEVEL_YELLOW)
if(security_level < SEC_LEVEL_YELLOW)
security_announcement_up.Announce("[config.alert_desc_yellow_upto]", "Attention! Alert level elevated to yellow")
else
security_announcement_down.Announce("[config.alert_desc_yellow_downto]", "Attention! Alert level lowered to yellow")
security_level = SEC_LEVEL_YELLOW
if(SEC_LEVEL_VIOLET)
if(security_level < SEC_LEVEL_VIOLET)
security_announcement_up.Announce("[config.alert_desc_violet_upto]", "Attention! Alert level elevated to violet")
else
security_announcement_down.Announce("[config.alert_desc_violet_downto]", "Attention! Alert level lowered to violet")
security_level = SEC_LEVEL_VIOLET
if(SEC_LEVEL_ORANGE)
if(security_level < SEC_LEVEL_ORANGE)
security_announcement_up.Announce("[config.alert_desc_orange_upto]", "Attention! Alert level elevated to orange")
else
security_announcement_down.Announce("[config.alert_desc_orange_downto]", "Attention! Alert level lowered to orange")
security_level = SEC_LEVEL_ORANGE
if(SEC_LEVEL_BLUE)
if(security_level < SEC_LEVEL_BLUE)
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Alert level elevated to blue")
else
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Alert level lowered to blue")
security_level = SEC_LEVEL_BLUE
if(SEC_LEVEL_RED)
if(security_level < SEC_LEVEL_RED)
security_announcement_up.Announce("[config.alert_desc_red_upto]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
else
security_announcement_down.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
security_level = SEC_LEVEL_RED
if(SEC_LEVEL_DELTA)
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
security_level = SEC_LEVEL_DELTA
var/newlevel = get_security_level()
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z in using_map.contact_levels)
FA.set_security_level(newlevel)
for(var/obj/machinery/status_display/FA in machines)
if(FA.z in using_map.contact_levels)
FA.on_alert_changed(newlevel)
//VOREStation Add
for(var/obj/machinery/holoposter/HP as anything in GLOB.holoposters)
HP.update_icon()
//VOREStation Add End
if(level >= SEC_LEVEL_RED)
atc.reroute_traffic(yes = 1) // Tell them fuck off we're busy.
else
atc.reroute_traffic(yes = 0)
spawn()
SSnightshift.check_nightshift()
admin_chat_message(message = "Security level is now: [uppertext(get_security_level())]", color = "#CC2222") //VOREStation Add
/proc/get_security_level()
switch(security_level)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_YELLOW)
return "yellow"
if(SEC_LEVEL_VIOLET)
return "violet"
if(SEC_LEVEL_ORANGE)
return "orange"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/num2seclevel(var/num)
switch(num)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_YELLOW)
return "yellow"
if(SEC_LEVEL_VIOLET)
return "violet"
if(SEC_LEVEL_ORANGE)
return "orange"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/seclevel2num(var/seclevel)
switch( lowertext(seclevel) )
if("green")
return SEC_LEVEL_GREEN
if("yellow")
return SEC_LEVEL_YELLOW
if("violet")
return SEC_LEVEL_VIOLET
if("orange")
return SEC_LEVEL_ORANGE
if("blue")
return SEC_LEVEL_BLUE
if("red")
return SEC_LEVEL_RED
if("delta")
return SEC_LEVEL_DELTA
/*DEBUG
/mob/verb/set_thing0()
set_security_level(0)
/mob/verb/set_thing1()
set_security_level(1)
/mob/verb/set_thing2()
set_security_level(2)
/mob/verb/set_thing3()
set_security_level(3)
/mob/verb/set_thing4()
set_security_level(4)
/mob/verb/set_thing5()
set_security_level(5)
/mob/verb/set_thing6()
set_security_level(6)
*/