mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Reduce Lists Memory usage, update CI (#10929)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user