mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Ports SSnetworks killings * Update names.dm * Removes my debug message and fixes instances it caught
59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
/datum/computer_file/program/alarm_monitor
|
|
filename = "alarmmonitor"
|
|
filedesc = "Alarm Monitor"
|
|
category = PROGRAM_CATEGORY_ENGINEERING
|
|
ui_header = "alarm_green.gif"
|
|
program_icon_state = "alert-green"
|
|
extended_desc = "This program provides visual interface for station's alarm system."
|
|
requires_ntnet = 1
|
|
network_destination = "alarm monitoring network"
|
|
size = 5
|
|
tgui_id = "NtosStationAlertConsole"
|
|
program_icon = "bell"
|
|
|
|
var/has_alert = 0
|
|
|
|
/datum/computer_file/program/alarm_monitor/process_tick()
|
|
..()
|
|
|
|
if(has_alert)
|
|
program_icon_state = "alert-red"
|
|
ui_header = "alarm_red.gif"
|
|
update_computer_icon()
|
|
else
|
|
if(!has_alert)
|
|
program_icon_state = "alert-green"
|
|
ui_header = "alarm_green.gif"
|
|
update_computer_icon()
|
|
return 1
|
|
|
|
/datum/computer_file/program/alarm_monitor/ui_data(mob/user)
|
|
var/list/data = get_header_data()
|
|
|
|
data["alarms"] = list()
|
|
for(var/class in GLOB.alarms)
|
|
data["alarms"][class] = list()
|
|
for(var/area in GLOB.alarms[class])
|
|
data["alarms"][class] += area
|
|
|
|
return data
|
|
|
|
/datum/computer_file/program/alarm_monitor/proc/update_alarm_display()
|
|
has_alert = FALSE
|
|
for(var/cat in GLOB.alarms)
|
|
var/list/L = GLOB.alarms[cat]
|
|
if(L.len)
|
|
has_alert = TRUE
|
|
|
|
/datum/computer_file/program/alarm_monitor/New()
|
|
..()
|
|
GLOB.alarmdisplay += src
|
|
|
|
/datum/computer_file/program/alarm_monitor/run_program(mob/user)
|
|
. = ..(user)
|
|
GLOB.alarmdisplay += src
|
|
|
|
/datum/computer_file/program/alarm_monitor/kill_program(forced = FALSE)
|
|
GLOB.alarmdisplay -= src
|
|
..()
|