From 90ec68f095340f5c53e2bb77e2565452501b94df Mon Sep 17 00:00:00 2001 From: Poojawa Date: Sun, 16 Sep 2018 07:27:40 -0500 Subject: [PATCH] Fixes cryopod control setting --- modular_citadel/code/game/machinery/cryopod.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modular_citadel/code/game/machinery/cryopod.dm b/modular_citadel/code/game/machinery/cryopod.dm index d4d982d5e6..ec8738f9ea 100644 --- a/modular_citadel/code/game/machinery/cryopod.dm +++ b/modular_citadel/code/game/machinery/cryopod.dm @@ -172,14 +172,15 @@ ) /obj/machinery/cryopod/Initialize() + . = ..() update_icon() - find_control_computer() - return ..() + find_control_computer(TRUE) -/obj/machinery/cryopod/proc/find_control_computer(urgent = 0,area/A) - for(var/obj/machinery/computer/cryopod/C in A) +/obj/machinery/cryopod/proc/find_control_computer(urgent = FALSE) + for(var/obj/machinery/computer/cryopod/C in get_area(src)) control_computer = C - break + if(C) + return C // Don't send messages unless we *need* the computer, and less than five minutes have passed since last time we messaged if(!control_computer && urgent && last_no_computer_message + 5*60*10 < world.time) @@ -187,7 +188,7 @@ message_admins("Cryopod in [get_area(src)] could not find control computer!") last_no_computer_message = world.time - return control_computer != null + return null /obj/machinery/cryopod/close_machine(mob/user) if(!control_computer)