This commit is contained in:
SandPoot
2024-05-22 00:22:05 -03:00
parent 7f953a03af
commit 98b017831c
14 changed files with 217 additions and 180 deletions
+3 -3
View File
@@ -114,8 +114,8 @@
src.allowed_z_levels = allowed_z_levels
src.allowed_areas = allowed_areas
for(var/alarm_type in alarms_to_listen_for)
RegisterSignal(SSdcs, COMSIG_ALARM_FIRE(alarm_type), .proc/add_alarm)
RegisterSignal(SSdcs, COMSIG_ALARM_CLEAR(alarm_type), .proc/clear_alarm)
RegisterSignal(SSdcs, COMSIG_ALARM_FIRE(alarm_type), PROC_REF(add_alarm))
RegisterSignal(SSdcs, COMSIG_ALARM_CLEAR(alarm_type), PROC_REF(clear_alarm))
return ..()
@@ -147,7 +147,7 @@
var/list/cameras = source_area.cameras
if(optional_camera)
cameras = list(optional_camera) // This will cause harddels, so we need to clear manually
RegisterSignal(optional_camera, COMSIG_PARENT_QDELETING, .proc/clear_camera_ref, override = TRUE) //It's just fine to override, cause we clear all refs in the proc
RegisterSignal(optional_camera, COMSIG_PARENT_QDELETING, PROC_REF(clear_camera_ref), override = TRUE) //It's just fine to override, cause we clear all refs in the proc
//This does mean that only the first alarm of that camera type in the area will send a ping, but jesus what else can ya do
alarms_of_our_type[source_area.name] = list(source_area, cameras, list(handler))