diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 78148aee00e..c7217221585 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -13,6 +13,7 @@ GLOBAL_LIST_INIT(singularities, list()) //list of all singularities GLOBAL_LIST_INIT(janitorial_equipment, list()) //list of janitorial equipment GLOBAL_LIST_INIT(crafting_recipes, list()) //list of all crafting recipes GLOBAL_LIST_INIT(prisoncomputer_list, list()) +GLOBAL_LIST_INIT(celltimers_list, list()) // list of all cell timers GLOBAL_LIST_INIT(cell_logs, list()) GLOBAL_LIST_INIT(navigation_computers, list()) diff --git a/code/game/machinery/computer/brigcells.dm b/code/game/machinery/computer/brigcells.dm index acd44d3e240..94dcf5a28cc 100644 --- a/code/game/machinery/computer/brigcells.dm +++ b/code/game/machinery/computer/brigcells.dm @@ -35,7 +35,7 @@ var/list/timers = list() /*"Detainee [logname] has been incarcerated for [seconds_to_time(timetoset / 10)] for the charges of, '[logcharges]'. \ Arresting Officer: [usr.name].[R ? "" : " Detainee record not found, manual record update required."]"*/ - for(var/obj/machinery/door_timer/T in world) + for(var/obj/machinery/door_timer/T in GLOB.celltimers_list) var/timer = list() timer["cell_id"] = T.name timer["occupant"] = T.occupant diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index fe67dfdc7f7..eb536953b45 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -36,6 +36,14 @@ var/time = 0 var/officer = "None" +/obj/machinery/door_timer/New() + GLOB.celltimers_list += src + return ..() + +/obj/machinery/door_timer/Destroy() + GLOB.celltimers_list -= src + return ..() + /obj/machinery/door_timer/proc/print_report() var/logname = input(usr, "Name of the guilty?","[id] log name") var/logcharges = stripped_multiline_input(usr, "What have they been charged with?","[id] log charges")