Merge pull request #15758 from LetterN/patch-12

fix pod not unlocking on code delta
This commit is contained in:
silicons
2022-08-20 12:27:11 -07:00
committed by GitHub
6 changed files with 139 additions and 98 deletions
+19
View File
@@ -538,6 +538,10 @@
density = FALSE
clockwork = TRUE //it'd look weird
/obj/machinery/computer/shuttle/pod/Initialize(mapload)
. = ..()
RegisterSignal(SSsecurity_level, COMSIG_SECURITY_LEVEL_CHANGED, .proc/check_lock)
/obj/machinery/computer/shuttle/pod/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
@@ -555,6 +559,21 @@
if(possible_destinations == initial(possible_destinations) || override)
possible_destinations = "pod_lavaland[idnum]"
/**
* Signal handler for checking if we should lock or unlock escape pods accordingly to a newly set security level
*
* Arguments:
* * source The datum source of the signal
* * new_level The new security level that is in effect
*/
/obj/machinery/computer/shuttle/pod/proc/check_lock(datum/source, new_level)
SIGNAL_HANDLER
if(obj_flags & EMAGGED)
return
admin_controlled = !(new_level < SEC_LEVEL_RED)
/obj/docking_port/stationary/random
name = "escape pod"
id = "pod"