/tg/ Station 13 - Modules - TypesVar Details - Proc Details

alarm_handler

Represents a single source of alarms, one alarm handler will only ever count for one alarm per listener

Vars

sent_alarmsA list of alarm type -> list of areas we currently have alarms in
source_atomOur source atom

Procs

clear_alarmClears an alarm from any interested listeners
clear_alarm_from_areaExists so we can request that the alarms from an area are cleared, even if our source atom is no longer in that area
send_alarmSends an alarm to any interested things, does some checks to prevent unneeded work Important to note is that source_atom is not held as a ref, we're used as a proxy to prevent hard deletes optional_camera should only be used when you have one camera you want to pass along to alarm listeners, most of the time you should have no use for it

Var Details

sent_alarms

A list of alarm type -> list of areas we currently have alarms in

source_atom

Our source atom

Proc Details

clear_alarm

Clears an alarm from any interested listeners

clear_alarm_from_area

Exists so we can request that the alarms from an area are cleared, even if our source atom is no longer in that area

send_alarm

Sends an alarm to any interested things, does some checks to prevent unneeded work Important to note is that source_atom is not held as a ref, we're used as a proxy to prevent hard deletes optional_camera should only be used when you have one camera you want to pass along to alarm listeners, most of the time you should have no use for it