April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/datum/events/keycard_events = new()
|
||||
GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
|
||||
|
||||
/obj/machinery/keycard_auth
|
||||
name = "Keycard Authentication Device"
|
||||
@@ -10,7 +10,7 @@ var/datum/events/keycard_events = new()
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
power_channel = ENVIRON
|
||||
req_access = list(access_keycard_auth)
|
||||
req_access = list(GLOB.access_keycard_auth)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/datum/callback/ev
|
||||
var/event = ""
|
||||
@@ -20,15 +20,15 @@ var/datum/events/keycard_events = new()
|
||||
|
||||
/obj/machinery/keycard_auth/New()
|
||||
. = ..()
|
||||
ev = keycard_events.addEvent("triggerEvent", CALLBACK(src, .proc/triggerEvent))
|
||||
ev = GLOB.keycard_events.addEvent("triggerEvent", CALLBACK(src, .proc/triggerEvent))
|
||||
|
||||
/obj/machinery/keycard_auth/Destroy()
|
||||
keycard_events.clearEvent("triggerEvent", ev)
|
||||
GLOB.keycard_events.clearEvent("triggerEvent", ev)
|
||||
qdel(ev)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "keycard_auth", name, 375, 125, master_ui, state)
|
||||
@@ -39,7 +39,7 @@ var/datum/events/keycard_events = new()
|
||||
data["waiting"] = waiting
|
||||
data["auth_required"] = event_source ? event_source.event : 0
|
||||
data["red_alert"] = (seclevel2num(get_security_level()) >= SEC_LEVEL_RED) ? 1 : 0
|
||||
data["emergency_maint"] = emergency_access
|
||||
data["emergency_maint"] = GLOB.emergency_access
|
||||
return data
|
||||
|
||||
/obj/machinery/keycard_auth/ui_status(mob/user)
|
||||
@@ -72,7 +72,7 @@ var/datum/events/keycard_events = new()
|
||||
triggerer = usr
|
||||
event = event_type
|
||||
waiting = 1
|
||||
keycard_events.fireEvent("triggerEvent", src)
|
||||
GLOB.keycard_events.fireEvent("triggerEvent", src)
|
||||
addtimer(CALLBACK(src, .proc/eventSent), 20)
|
||||
|
||||
/obj/machinery/keycard_auth/proc/eventSent()
|
||||
@@ -101,14 +101,14 @@ var/datum/events/keycard_events = new()
|
||||
feedback_inc("alert_keycard_auth_maint",1)
|
||||
|
||||
|
||||
/var/emergency_access = 0
|
||||
GLOBAL_VAR_INIT(emergency_access, FALSE)
|
||||
/proc/make_maint_all_access()
|
||||
for(var/area/maintenance/A in world)
|
||||
for(var/obj/machinery/door/airlock/D in A)
|
||||
D.emergency = 1
|
||||
D.update_icon(0)
|
||||
minor_announce("Access restrictions on maintenance and external airlocks have been lifted.", "Attention! Station-wide emergency declared!",1)
|
||||
emergency_access = 1
|
||||
GLOB.emergency_access = TRUE
|
||||
|
||||
/proc/revoke_maint_all_access()
|
||||
for(var/area/maintenance/A in world)
|
||||
@@ -116,4 +116,4 @@ var/datum/events/keycard_events = new()
|
||||
D.emergency = 0
|
||||
D.update_icon(0)
|
||||
minor_announce("Access restrictions in maintenance areas have been restored.", "Attention! Station-wide emergency rescinded:")
|
||||
emergency_access = 0
|
||||
GLOB.emergency_access = FALSE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/var/security_level = 0
|
||||
GLOBAL_VAR_INIT(security_level, 0)
|
||||
//0 = code green
|
||||
//1 = code blue
|
||||
//2 = code red
|
||||
@@ -18,21 +18,21 @@
|
||||
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)
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != GLOB.security_level)
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
minor_announce(config.alert_desc_green, "Attention! Security level lowered to green:")
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
||||
if(security_level >= SEC_LEVEL_RED)
|
||||
if(GLOB.security_level >= SEC_LEVEL_RED)
|
||||
SSshuttle.emergency.modTimer(4)
|
||||
else
|
||||
SSshuttle.emergency.modTimer(2)
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
GLOB.security_level = SEC_LEVEL_GREEN
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z == ZLEVEL_STATION)
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
if(GLOB.security_level < SEC_LEVEL_BLUE)
|
||||
minor_announce(config.alert_desc_blue_upto, "Attention! Security level elevated to blue:",1)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
||||
SSshuttle.emergency.modTimer(0.5)
|
||||
@@ -40,56 +40,56 @@
|
||||
minor_announce(config.alert_desc_blue_downto, "Attention! Security level lowered to blue:")
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
||||
SSshuttle.emergency.modTimer(2)
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
for(var/mob/M in player_list)
|
||||
GLOB.security_level = SEC_LEVEL_BLUE
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << sound('sound/misc/voybluealert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z == ZLEVEL_STATION)
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
if(GLOB.security_level < SEC_LEVEL_RED)
|
||||
minor_announce(config.alert_desc_red_upto, "Attention! Code red!",1)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
||||
if(security_level == SEC_LEVEL_GREEN)
|
||||
if(GLOB.security_level == SEC_LEVEL_GREEN)
|
||||
SSshuttle.emergency.modTimer(0.25)
|
||||
else
|
||||
SSshuttle.emergency.modTimer(0.5)
|
||||
else
|
||||
minor_announce(config.alert_desc_red_downto, "Attention! Code red!")
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << sound('sound/misc/voyalert.ogg')
|
||||
security_level = SEC_LEVEL_RED
|
||||
GLOB.security_level = SEC_LEVEL_RED
|
||||
|
||||
/* - At the time of commit, setting status displays didn't work properly
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")*/
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z == ZLEVEL_STATION)
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in machines)
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
if(SEC_LEVEL_DELTA)
|
||||
minor_announce(config.alert_desc_delta, "Attention! Delta security level reached!",1)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
||||
if(security_level == SEC_LEVEL_GREEN)
|
||||
if(GLOB.security_level == SEC_LEVEL_GREEN)
|
||||
SSshuttle.emergency.modTimer(0.25)
|
||||
else if(security_level == SEC_LEVEL_BLUE)
|
||||
else if(GLOB.security_level == SEC_LEVEL_BLUE)
|
||||
SSshuttle.emergency.modTimer(0.5)
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
for(var/mob/M in player_list)
|
||||
GLOB.security_level = SEC_LEVEL_DELTA
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << sound('sound/misc/deltakalaxon.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z == ZLEVEL_STATION)
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in machines)
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
else
|
||||
return
|
||||
|
||||
/proc/get_security_level()
|
||||
switch(security_level)
|
||||
switch(GLOB.security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
return "green"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
|
||||
Reference in New Issue
Block a user