diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 0e23b99a9cc2..6387fb037cd7 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -264,6 +264,10 @@ SUBSYSTEM_DEF(ticker) INVOKE_ASYNC(C, TYPE_PROC_REF(/obj/structure/closet, select_gamemode_equipment), mode.type) for(var/obj/structure/machinery/vending/V in machines) INVOKE_ASYNC(V, TYPE_PROC_REF(/obj/structure/machinery/vending, select_gamemode_equipment), mode.type) + for(var/obj/structure/machinery/power/apc/apc in machines) + if(!is_mainship_level(apc.z)) + continue + addtimer(CALLBACK(apc, TYPE_PROC_REF(/obj/structure/machinery/power/apc, late_activation)), rand(4 SECONDS, 15 SECONDS)) SEND_GLOBAL_SIGNAL(COMSIG_GLOB_POST_SETUP) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index e7a160095705..97a32ba864c1 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -156,11 +156,18 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( update_icon() addtimer(CALLBACK(src, PROC_REF(update)), 5) + if(is_mainship_level(z) && !(SSticker.current_state == GAME_STATE_PLAYING || SSticker.current_state == GAME_STATE_FINISHED)) + operating = 0 + start_processing() if(!start_charge && is_ground_level(z) && prob(10)) set_broken() +/obj/structure/machinery/power/apc/proc/late_activation() + operating = 1 + update() + /obj/structure/machinery/power/apc/set_pixel_location() tdir = dir //To fix Vars bug setDir(SOUTH)