Merge pull request #38108 from AutomaticFrenzy/patch/escape-safe

Fix the escape pod safes always being unlocked
This commit is contained in:
Jordan Brown
2018-05-28 10:39:01 -04:00
committed by yogstation13-bot
parent a3dca3e153
commit d7e708b67a
2 changed files with 20 additions and 6 deletions

View File

@@ -536,13 +536,24 @@
new /obj/item/storage/toolbox/emergency(src)
/obj/item/storage/pod/attackby(obj/item/W, mob/user, params)
return
if (can_interact(user))
return ..()
/obj/item/storage/pod/attack_hand(mob/user)
if (can_interact(user))
SendSignal(COMSIG_TRY_STORAGE_SHOW, user)
return TRUE
/obj/item/storage/pod/MouseDrop(over_object, src_location, over_location)
if(can_interact(usr))
return ..()
/obj/item/storage/pod/can_interact(mob/user)
if(!..())
return FALSE
if(GLOB.security_level == SEC_LEVEL_RED || GLOB.security_level == SEC_LEVEL_DELTA || unlocked)
. = ..()
else
to_chat(usr, "The storage unit will only unlock during a Red or Delta security alert.")
return TRUE
to_chat(user, "The storage unit will only unlock during a Red or Delta security alert.")
/obj/docking_port/mobile/emergency/backup
name = "backup shuttle"

View File

@@ -270,8 +270,11 @@ All ShuttleMove procs go here
/obj/item/storage/pod/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
. = ..()
unlocked = TRUE
// If the pod was launched, the storage will always open.
// If the pod was launched, the storage will always open. The CentCom check
// ignores the movement of the shuttle from the staging area on CentCom to
// the station as it is loaded in.
if (oldT && !is_centcom_level(oldT.z))
unlocked = TRUE
/************************************Mob move procs************************************/