[MIRROR] Reduce Lists Memory usage, update CI (#10929)

This commit is contained in:
Cameron Lennox
2025-05-19 15:00:24 -04:00
committed by GitHub
parent f4895e74e9
commit 209934afa8
18 changed files with 122 additions and 201 deletions

View File

@@ -38,15 +38,13 @@
var/affected_by_emp_until = 0
var/client_huds = list()
var/list/camera_computers_using_this = list()
var/client_huds = null
/obj/machinery/camera/Initialize(mapload)
wires = new(src)
assembly = new(src)
assembly.state = 4
client_huds |= GLOB.global_hud.whitense
LAZYOR(client_huds, GLOB.global_hud.whitense)
/* // Use this to look for cameras that have the same c_tag.
for(var/obj/machinery/camera/C in cameranet.cameras)

View File

@@ -1,5 +1,5 @@
/obj/machinery/camera
var/list/motionTargets = list()
var/list/motionTargets = null
var/detectTime = 0
var/area/ai_monitored/area_motion = null
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
@@ -29,13 +29,13 @@
if (detectTime == 0)
detectTime = world.time // start the clock
if (!(target in motionTargets))
motionTargets += target
LAZYADD(motionTargets, target)
return 1
/obj/machinery/camera/proc/lostTarget(var/mob/target)
if (target in motionTargets)
motionTargets -= target
if (motionTargets.len == 0)
LAZYREMOVE(motionTargets, target)
if (LAZYLEN(motionTargets) == 0)
cancelAlarm()
/obj/machinery/camera/proc/cancelAlarm()