mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Add nanomap to the Atmos Control Computer
* In addition to showing a list of air alarms, the atmos computer now shows them as pins on the nanomap. * Since the atmos computer shows all z-levels, the nanomap will be mutli-z. Limited to station levels of course.
This commit is contained in:
@@ -35,12 +35,23 @@
|
||||
|
||||
// TODO: Move these to a cache, similar to cameras
|
||||
for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : machines))
|
||||
alarms[++alarms.len] = list("name" = sanitize(alarm.name), "ref"= "\ref[alarm]", "danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm))
|
||||
alarms[++alarms.len] = list(
|
||||
"name" = sanitize(alarm.name),
|
||||
"ref"= "\ref[alarm]",
|
||||
"danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm),
|
||||
"x" = alarm.x,
|
||||
"y" = alarm.y,
|
||||
"z" = alarm.z)
|
||||
data["alarms"] = alarms
|
||||
data["station_levels"] = using_map.station_levels
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625, state = state)
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "atmos_control_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "atmos_control_map_header.tmpl")
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
Reference in New Issue
Block a user