[MIRROR] Refactor of modular PC UIs (#874)
* Refactor of modular PC UIs * .rej fix
This commit is contained in:
committed by
Poojawa
parent
663fd8e671
commit
2eea01f671
@@ -1,15 +1,16 @@
|
||||
|
||||
|
||||
|
||||
/datum/computer_file/program/alarm_monitor
|
||||
filename = "alarmmonitor"
|
||||
filedesc = "Alarm Monitoring"
|
||||
filedesc = "Alarm Monitor"
|
||||
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 = "ntos_station_alert"
|
||||
ui_x = 315
|
||||
ui_y = 500
|
||||
|
||||
var/has_alert = 0
|
||||
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
|
||||
var/alarm_z = list(ZLEVEL_STATION,ZLEVEL_LAVALAND)
|
||||
@@ -28,15 +29,6 @@
|
||||
update_computer_icon()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "station_alert_prog", "Alarm Monitoring", 300, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
|
||||
@@ -49,7 +41,6 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
|
||||
if(!(source.z in alarm_z))
|
||||
return
|
||||
|
||||
@@ -77,8 +68,6 @@
|
||||
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/proc/cancelAlarm(class, area/A, obj/origin)
|
||||
|
||||
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
for (var/I in L)
|
||||
|
||||
Reference in New Issue
Block a user