Uses a list instead of world search

This commit is contained in:
AffectedArc07
2019-02-24 10:31:52 +00:00
parent 8bef0cd2e2
commit 13c26d716c
3 changed files with 10 additions and 1 deletions

View File

@@ -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())

View File

@@ -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

View File

@@ -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")