[Vote 830] Disable cryo pods for 30 minutes (#12175)

* [Vote 830] Disable cryo pods for 30 minutes

* Fixes typos
This commit is contained in:
adamsong
2021-08-30 12:36:14 -05:00
committed by GitHub
parent b2a296140e
commit 509b725e56
3 changed files with 17 additions and 2 deletions

View File

@@ -143,6 +143,11 @@ SUBSYSTEM_DEF(ticker)
return ..()
/datum/controller/subsystem/ticker/fire()
if(world.time > 30 MINUTES && !GLOB.cryopods_enabled)
GLOB.cryopods_enabled = TRUE
for(var/obj/machinery/cryopod/pod as anything in GLOB.cryopods)
pod.PowerOn()
switch(current_state)
if(GAME_STATE_STARTUP)
if(Master.initializations_finished_with_no_players_logged_in)

View File

@@ -155,12 +155,14 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
updateUsrDialog()
return
GLOBAL_VAR_INIT(cryopods_enabled, FALSE)
//Cryopods themselves.
/obj/machinery/cryopod
name = "cryogenic freezer"
desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest."
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "cryopod-open"
icon_state = "cryopod-off"
density = TRUE
anchored = TRUE
state_open = TRUE
@@ -189,6 +191,10 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
update_icon()
find_control_computer()
/obj/machinery/cryopod/proc/PowerOn()
if(!occupant)
open_machine()
/obj/machinery/cryopod/proc/find_control_computer(urgent = 0)
for(var/M in GLOB.cryopod_computers)
var/obj/machinery/computer/cryopod/C = M
@@ -228,7 +234,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
/obj/machinery/cryopod/open_machine()
..()
icon_state = "cryopod-open"
icon_state = GLOB.cryopods_enabled ? "cryopod-open" : "cryopod-off"
density = TRUE
name = initial(name)
@@ -355,6 +361,10 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
return
if(!GLOB.cryopods_enabled)
to_chat(user, "<span class='boldnotice'>[src] is currently disabled. It will be enabled in [round(((30 MINUTES) - world.time) / (1 MINUTES))] minutes</span>")
return
if(occupant)
to_chat(user, "<span class='boldnotice'>The cryo pod is already occupied!</span>")
return

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB