Fixes cryopod control setting

This commit is contained in:
Poojawa
2018-09-16 07:27:40 -05:00
parent 1a2460ed28
commit 90ec68f095
@@ -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)