mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
22 lines
497 B
Plaintext
22 lines
497 B
Plaintext
/area/ai_monitored
|
|
name = "AI Monitored Area"
|
|
var/obj/machinery/camera/motioncamera = null
|
|
|
|
|
|
/area/ai_monitored/Initialize(mapload)
|
|
. = ..()
|
|
// locate and store the motioncamera
|
|
for (var/obj/machinery/camera/M in src)
|
|
if(M.isMotion())
|
|
motioncamera = M
|
|
M.area_motion = src
|
|
|
|
/area/ai_monitored/Entered(atom/movable/O)
|
|
..()
|
|
if (ismob(O) && motioncamera)
|
|
motioncamera.newTarget(O)
|
|
|
|
/area/ai_monitored/Exited(atom/movable/O)
|
|
if (ismob(O) && motioncamera)
|
|
motioncamera.lostTarget(O)
|