mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Added atmos control computer nanoUI, but it's acting a bit fucked due to a JSRender bug.
This commit is contained in:
@@ -52,9 +52,11 @@
|
|||||||
overridden = 1
|
overridden = 1
|
||||||
else if(!emagged)
|
else if(!emagged)
|
||||||
overridden = 0
|
overridden = 0
|
||||||
|
|
||||||
var/dat = "<a href='?src=\ref[src]&reset=1'>Main Menu</a><hr>"
|
var/dat = "<a href='?src=\ref[src]&reset=1'>Main Menu</a><hr>"
|
||||||
if(current)
|
if(current)
|
||||||
dat += specific()
|
//dat += specific()
|
||||||
|
return ui_interact(user)
|
||||||
else
|
else
|
||||||
for(var/obj/machinery/alarm/alarm in sortAtom(machines))
|
for(var/obj/machinery/alarm/alarm in sortAtom(machines))
|
||||||
if(!is_in_filter(alarm.alarm_area.type))
|
if(!is_in_filter(alarm.alarm_area.type))
|
||||||
@@ -70,6 +72,7 @@
|
|||||||
dat += "[alarm]</font></a><br/>"
|
dat += "[alarm]</font></a><br/>"
|
||||||
user << browse(dat, "window=atmoscontrol")
|
user << browse(dat, "window=atmoscontrol")
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||||
user.visible_message("\red \The [user] swipes \a [I] through \the [src], causing the screen to flash!",\
|
user.visible_message("\red \The [user] swipes \a [I] through \the [src], causing the screen to flash!",\
|
||||||
@@ -80,20 +83,50 @@
|
|||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/machinery/computer/atmoscontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||||
|
if(user.stat && !isobserver(user))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/data[0]
|
||||||
|
data["alarm"]=null
|
||||||
|
if(current)
|
||||||
|
data += current.get_nano_data(user,TRUE)
|
||||||
|
data["alarm"] = "\ref[current]"
|
||||||
|
|
||||||
|
var/list/alarms=list()
|
||||||
|
for(var/obj/machinery/alarm/alarm in sortAtom(machines))
|
||||||
|
if(!is_in_filter(alarm.alarm_area.type))
|
||||||
|
continue // NO ACCESS 4 U
|
||||||
|
|
||||||
|
var/list/alarm_data=list()
|
||||||
|
alarm_data["ID"]="\ref[alarm]"
|
||||||
|
alarm_data["danger"] = max(alarm.danger_level, alarm.alarm_area.atmosalm)
|
||||||
|
alarm_data["name"] = "[alarm]"
|
||||||
|
alarms+=list(alarm_data)
|
||||||
|
data["alarms"]=alarms
|
||||||
|
|
||||||
|
if (!ui) // no ui has been passed, so we'll search for one
|
||||||
|
ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||||
|
|
||||||
|
if (!ui)
|
||||||
|
// the ui does not exist, so we'll create a new one
|
||||||
|
ui = new(user, src, ui_key, "atmos_control.tmpl", name, 550, 410)
|
||||||
|
// When the UI is first opened this is the data it will use
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
// Auto update every Master Controller tick
|
||||||
|
if(current)
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
else
|
||||||
|
// The UI is already open so push the new data to it
|
||||||
|
ui.push_data(data)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/proc/is_in_filter(var/typepath)
|
/obj/machinery/computer/atmoscontrol/proc/is_in_filter(var/typepath)
|
||||||
if(!filter) return 1 // YEP. TOTALLY.
|
if(!filter) return 1 // YEP. TOTALLY.
|
||||||
return typepath in filter
|
return typepath in filter
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/proc/specific()
|
|
||||||
if(!current)
|
|
||||||
return ""
|
|
||||||
var/dat = "<h3>[current.name]</h3><hr>"
|
|
||||||
//dat += current.return_status()
|
|
||||||
if(current.remote_control || overridden)
|
|
||||||
dat += "<hr>[return_controls()]"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
//a bunch of this is copied from atmos alarms
|
//a bunch of this is copied from atmos alarms
|
||||||
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
|
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
@@ -233,7 +266,7 @@
|
|||||||
var/list/selected = current.TLV["temperature"]
|
var/list/selected = current.TLV["temperature"]
|
||||||
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
|
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
|
||||||
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
|
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
|
||||||
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
|
var/input_temperature = input("What temperature would you like the system to maintain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
|
||||||
if(input_temperature==null)
|
if(input_temperature==null)
|
||||||
return
|
return
|
||||||
if(input_temperature > max_temperature || input_temperature < min_temperature)
|
if(input_temperature > max_temperature || input_temperature < min_temperature)
|
||||||
|
|||||||
@@ -768,14 +768,12 @@
|
|||||||
data["danger"]=danger
|
data["danger"]=danger
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
/obj/machinery/alarm/proc/get_nano_data(mob/user, fromAtmosConsole=0)
|
||||||
|
|
||||||
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
|
||||||
if(user.stat && !isobserver(user))
|
|
||||||
return
|
|
||||||
var/data[0]
|
var/data[0]
|
||||||
data["air"]=ui_air_status()
|
data["air"]=ui_air_status()
|
||||||
data["sensors"]=TLV
|
data["sensors"]=TLV
|
||||||
data["locked"]=(!(istype(user, /mob/living/silicon)) && locked)
|
data["locked"]=fromAtmosConsole || (!(istype(user, /mob/living/silicon)) && locked)
|
||||||
data["rcon"]=rcon_setting
|
data["rcon"]=rcon_setting
|
||||||
data["target_temp"] = target_temperature - T0C
|
data["target_temp"] = target_temperature - T0C
|
||||||
data["atmos_alarm"] = alarm_area.atmosalm
|
data["atmos_alarm"] = alarm_area.atmosalm
|
||||||
@@ -819,6 +817,14 @@
|
|||||||
scrubber_data["name"]=long_name
|
scrubber_data["name"]=long_name
|
||||||
scrubbers+=list(scrubber_data)
|
scrubbers+=list(scrubber_data)
|
||||||
data["scrubbers"]=scrubbers
|
data["scrubbers"]=scrubbers
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||||
|
if(user.stat && !isobserver(user))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/data=src.get_nano_data(user,FALSE)
|
||||||
|
|
||||||
if (!ui) // no ui has been passed, so we'll search for one
|
if (!ui) // no ui has been passed, so we'll search for one
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -251,6 +251,7 @@
|
|||||||
'nano/templates/chem_dispenser.tmpl',
|
'nano/templates/chem_dispenser.tmpl',
|
||||||
'nano/templates/apc.tmpl',
|
'nano/templates/apc.tmpl',
|
||||||
'nano/templates/ame.tmpl',
|
'nano/templates/ame.tmpl',
|
||||||
|
'nano/templates/atmos_control.tmpl',
|
||||||
'nano/templates/cryo.tmpl',
|
'nano/templates/cryo.tmpl',
|
||||||
'nano/templates/air_alarm.tmpl',
|
'nano/templates/air_alarm.tmpl',
|
||||||
'nano/templates/telescience_console.tmpl',
|
'nano/templates/telescience_console.tmpl',
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ nanoui is used to open and update nano browser uis
|
|||||||
var/atom/movable/src_object
|
var/atom/movable/src_object
|
||||||
// the title of this ui
|
// the title of this ui
|
||||||
var/title
|
var/title
|
||||||
|
// /vg/ - Whether to write debug information to nano/debug.html
|
||||||
|
var/writeDebug=FALSE
|
||||||
// the key of this ui, this is to allow multiple (different) uis for each src_object
|
// the key of this ui, this is to allow multiple (different) uis for each src_object
|
||||||
var/ui_key
|
var/ui_key
|
||||||
// window_id is used as the window name/identifier for browse and onclose
|
// window_id is used as the window name/identifier for browse and onclose
|
||||||
@@ -349,9 +351,10 @@ nanoui is used to open and update nano browser uis
|
|||||||
window_size = "size=[width]x[height];"
|
window_size = "size=[width]x[height];"
|
||||||
update_status(0)
|
update_status(0)
|
||||||
var/html=get_html()
|
var/html=get_html()
|
||||||
var/f = file("nano/debug.html")
|
if(src.writeDebug)
|
||||||
fdel(f)
|
var/f = file("nano/debug.html")
|
||||||
f << html
|
fdel(f)
|
||||||
|
f << html
|
||||||
user << browse(html, "window=[window_id];[window_size][window_options]")
|
user << browse(html, "window=[window_id];[window_size][window_options]")
|
||||||
//winset(user, "mapwindow.map", "focus=true") // Return keyboard focus to map.
|
//winset(user, "mapwindow.map", "focus=true") // Return keyboard focus to map.
|
||||||
on_close_winset()
|
on_close_winset()
|
||||||
|
|||||||
285
nano/templates/atmos_control.tmpl
Normal file
285
nano/templates/atmos_control.tmpl
Normal file
@@ -0,0 +1,285 @@
|
|||||||
|
<!--
|
||||||
|
Title: Atmos Control UI
|
||||||
|
Used In File(s): /code/game/machinery/alarm.dm
|
||||||
|
-->
|
||||||
|
{{!--
|
||||||
|
#define AALARM_MODE_SCRUBBING 1
|
||||||
|
#define AALARM_MODE_REPLACEMENT 2 //like scrubbing, but faster.
|
||||||
|
#define AALARM_MODE_PANIC 3 //constantly sucks all air
|
||||||
|
#define AALARM_MODE_CYCLE 4 //sucks off all air, then refill and switches to scrubbing
|
||||||
|
#define AALARM_MODE_FILL 5 //emergency fill
|
||||||
|
#define AALARM_MODE_OFF 6 //Shuts it all down.
|
||||||
|
|
||||||
|
#define AALARM_SCREEN_MAIN 1
|
||||||
|
#define AALARM_SCREEN_VENT 2
|
||||||
|
#define AALARM_SCREEN_SCRUB 3
|
||||||
|
#define AALARM_SCREEN_MODE 4
|
||||||
|
#define AALARM_SCREEN_SENSORS 5
|
||||||
|
--}}
|
||||||
|
{{if !alarm}}
|
||||||
|
<h3>Atmospherics Control</h3>
|
||||||
|
<div class="statusDisplay">
|
||||||
|
{^{for alarms}}
|
||||||
|
<div class="line">
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}</div>",~dangerToClass(danger),name)}}
|
||||||
|
{^{:~link("Access","gear",{"alarm":ID},null,"floatRight")}}
|
||||||
|
</div>
|
||||||
|
{{/for}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
{^{:~link("Main Menu","gear",{"reset":1},null,null)}}
|
||||||
|
<h3>{^{:name}}</h3>
|
||||||
|
{^{if !air}}
|
||||||
|
<div class="notice">Unable to acquire air sample.</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="statusDisplay">
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Pressure:</div>
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1} kPa</div>",~dangerToClass(air.danger.pressure),~precisionRound(air.pressure,4))}}
|
||||||
|
<div class="statusValue" style="margin-left:5px;">
|
||||||
|
{^{if !locked}}
|
||||||
|
{^{if mode == 3}}
|
||||||
|
{^{:~link("DEACTIVATE PANIC SYPHON",null,{"alarm":alarm,"mode" : 1},null,'linkOn')}}
|
||||||
|
{{else}}
|
||||||
|
{^{:~link("ACTIVATE PANIC SYPHON",null,{"alarm":alarm,"mode" : 3},null,'red')}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Oxygen:</div>
|
||||||
|
{^{:~displayBar(air.contents.oxygen, 0, 100, ~dangerToClass(air.danger.oxygen))}}
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}%</div>",~dangerToClass(air.danger.oxygen),~precisionRound(air.contents.oxygen,2))}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Nitrogen:</div>
|
||||||
|
{^{:~displayBar(air.contents.nitrogen, 0, 100, ~dangerToClass(air.danger.nitrogen))}}
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}%</div>",~dangerToClass(air.danger.nitrogen),~precisionRound(air.contents.nitrogen,2))}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Carbon Dioxide:</div>
|
||||||
|
{^{:~displayBar(air.contents.co2, 0, 100, ~dangerToClass(air.danger.co2))}}
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}%</div>",~dangerToClass(air.danger.co2),~precisionRound(air.contents.co2,2))}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Toxins:</div>
|
||||||
|
{^{:~displayBar(air.contents.plasma, 0, 100, ~dangerToClass(air.danger.plasma))}}
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}%</div>",~dangerToClass(air.danger.plasma),~precisionRound(air.contents.plasma,2))}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">
|
||||||
|
Temperature:
|
||||||
|
</div>
|
||||||
|
{^{:~string("<div class='statusValue {0}'>{1}°K ({2}°C)</div>",~dangerToClass(air.danger.temperature),~precisionRound(air.temperature,2),~precisionRound(air.temperature_c,2))}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Local Status:</div>
|
||||||
|
{^{if air.danger.overall == 0}}
|
||||||
|
{^{if atmos_alarm}}
|
||||||
|
<div class="average">Caution: Atmos alert in area
|
||||||
|
{{else}}
|
||||||
|
<div class="good">Optimal
|
||||||
|
{{/if}}
|
||||||
|
{{else air.danger.overall == 1}}
|
||||||
|
<div class="average">Caution
|
||||||
|
{{else}}
|
||||||
|
<div class="notice">DANGER: Internals Required
|
||||||
|
{{/if}}
|
||||||
|
{^{if !locked}}
|
||||||
|
{^{if atmos_alarm}}
|
||||||
|
{^{:~link('Reset Alarm',null,{"alarm":alarm,'atmos_reset':1},null,'linkOn floatRight')}}
|
||||||
|
{{else}}
|
||||||
|
{^{:~link('Activate Alarm',null,{"alarm":alarm,'atmos_alarm':1},null,'red floatRight')}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<!--
|
||||||
|
#define RCON_NO 1
|
||||||
|
#define RCON_AUTO 2
|
||||||
|
#define RCON_YES 3
|
||||||
|
-->
|
||||||
|
<div class="statusLabel">Remote Control:</div>
|
||||||
|
{^{:~link('Off', null, {"alarm":alarm,'rcon' : 1}, (rcon != 1) ? null : 'disabled')}}
|
||||||
|
{^{:~link('Auto', null, {"alarm":alarm,'rcon' : 2}, (rcon != 2) ? null : 'disabled')}}
|
||||||
|
{^{:~link('On', null, {"alarm":alarm,'rcon' : 3}, (rcon != 3) ? null : 'disabled')}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Thermostat:</div>
|
||||||
|
{^{:~link(target_temp+" C", 'carat-2-n-s', {"alarm":alarm,'temperature': 1})}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{^{if locked}}
|
||||||
|
<div class="notice">Swipe card to unlock.</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="notice">Remember to lock with ID card after use.</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemLabel">Screen:</div>
|
||||||
|
<div class="itemContents">
|
||||||
|
{^{:~link('Main', 'gear',{"alarm":alarm,'screen':1},(screen==1)?'linkOn':'')}}
|
||||||
|
{^{:~link('Vents', 'gear',{"alarm":alarm,'screen':2},(screen==2)?'linkOn':'')}}
|
||||||
|
{^{:~link('Scrubbers', 'gear',{"alarm":alarm,'screen':3},(screen==3)?'linkOn':'')}}
|
||||||
|
{^{:~link('Mode', 'gear',{"alarm":alarm,'screen':4},(screen==4)?'linkOn':'')}}
|
||||||
|
{^{:~link('Thresholds','gear',{"alarm":alarm,'screen':5},(screen==5)?'linkOn':'')}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{!-- VENTS --}}
|
||||||
|
{^{if screen == 2}}
|
||||||
|
<h3>Vent Pump Settings</h3>
|
||||||
|
{^{for vents}}
|
||||||
|
<div class="statusDisplay">
|
||||||
|
<div class="line">
|
||||||
|
<b>{^{>name}}:</b> {^{:state}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Operating:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:~link(power ? 'On':'Off','power',{"alarm":alarm,'id_tag':id_tag,'command':'power','val':power?0:1},null,(power?'linkOn':'red'))}}
|
||||||
|
{^{if direction=="siphon"}}
|
||||||
|
{^{:~link('Siphoning','arrowthickstop-1-s',{"alarm":alarm,'id_tag':id_tag,'command':'set_dir','dir':'release'})}}
|
||||||
|
{{else}}
|
||||||
|
{^{:~link('Blowing','arrowthick-1-n',{"alarm":alarm,'id_tag':id_tag,'command':'set_dir','dir':'siphon'})}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Pressure checks:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:~link('External','power',{"alarm":alarm,'id_tag':id_tag,'command':'checks','val':~xor(checks,1)},null,(checks & 1 ?'linkOn':'red'))}}
|
||||||
|
{^{:~link('Internal','power',{"alarm":alarm,'id_tag':id_tag,'command':'checks','val':~xor(checks,2)},null,(checks & 2 ?'linkOn':'red'))}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">External pressure target:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:~precisionRound(external,4)}} kPa
|
||||||
|
</div>
|
||||||
|
{^{:~link('Set','gear',{"alarm":alarm,'id_tag':id_tag,'command':'set_external_pressure'})}}
|
||||||
|
{^{:~link('Reset','arrowrefresh-1-n',{"alarm":alarm,'id_tag':id_tag,'command':'set_external_pressure','val':101.325},null,'linkOn')}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<i>No vent pumps located in this area.</i>
|
||||||
|
{{/for}}
|
||||||
|
{{!-- SCRUBBERS --}}
|
||||||
|
{{else screen == 3}}
|
||||||
|
<h3>Scrubbers</h3>
|
||||||
|
{^{for scrubbers}}
|
||||||
|
<div class="statusDisplay">
|
||||||
|
<div class="line">
|
||||||
|
<b>{^{>name}}:</b> {^{:state}}
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Operating:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:~link(power ? 'On':'Off','power',{"alarm":alarm,'id_tag':id_tag,'command':'power','val':power?0:1},null,(power?'linkOn':'red'))}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Type:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{if scrubbing==0}}
|
||||||
|
{^{:~link('Siphoning','arrowthickstop-1-s',{"alarm":alarm,'id_tag':id_tag,'command':'scrubbing','val':1},null,'red')}}
|
||||||
|
{{else}}
|
||||||
|
{^{:~link('Scrubbing','transferthick-e-w',{"alarm":alarm,'id_tag':id_tag,'command':'scrubbing','val':0},null,'linkOn')}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{^{if scrubbing==1}}
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">Filtering:</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:~link('CO<sub>2</sub>',null,{"alarm":alarm,'id_tag':id_tag,'command':'co2_scrub','val':(filter_co2==0?1:0)},null,(filter_co2?'linkOn':''))}}
|
||||||
|
{^{:~link('Plasma', null,{"alarm":alarm,'id_tag':id_tag,'command':'tox_scrub','val':(filter_tox==0?1:0)},null,(filter_tox?'linkOn':''))}}
|
||||||
|
{^{:~link('N<sub>2</sub>O',null,{"alarm":alarm,'id_tag':id_tag,'command':'n2o_scrub','val':(filter_n2o==0?1:0)},null,(filter_n2o?'linkOn':''))}}
|
||||||
|
{^{:~link('O<sub>2</sub>', null,{"alarm":alarm,'id_tag':id_tag,'command':'o2_scrub', 'val':(filter_o2 ==0?1:0)},null,(filter_o2 ?'linkOn':''))}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<i>No scrubbers located in this area.</i>
|
||||||
|
{{/for}}
|
||||||
|
{{!-- MODES --}}
|
||||||
|
{{else screen == 4}}
|
||||||
|
<h3>System Mode</h3>
|
||||||
|
<div class="statusDisplay">
|
||||||
|
{^{for modes}}
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">{^{:~link(name,'gear',{"alarm":alarm,'mode':#index+1},null,(#index+1==~root.mode?'linkOn':''))}}</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:desc}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/for}}
|
||||||
|
</div>
|
||||||
|
<h3>System Preset</h3>
|
||||||
|
<div class="notice">After making a selection, the system will automatically cycle in order to remove contaminants.</div>
|
||||||
|
<div class="statusDisplay">
|
||||||
|
{^{for presets}}
|
||||||
|
<div class="line">
|
||||||
|
<div class="statusLabel">{^{:~link(name,'gear',{"alarm":alarm,'preset':#index+1},null,(#index+1==~root.preset?'linkOn':''))}}</div>
|
||||||
|
<div class="statusValue">
|
||||||
|
{^{:desc}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/for}}
|
||||||
|
</div>
|
||||||
|
{{!-- SENSORS --}}
|
||||||
|
{{else screen == 5}}
|
||||||
|
<h3>Sensor Thresholds</h3>
|
||||||
|
<div class="statusDisplay">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<th> </th>
|
||||||
|
<th class="bad">min2</th>
|
||||||
|
<th class="average">min1</th>
|
||||||
|
<th class="average">max1</th>
|
||||||
|
<th class="bad">max2</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>O<sub>2</sub></th>
|
||||||
|
{^{for sensors.oxygen}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'oxygen','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>N<sub>2</sub></th>
|
||||||
|
{^{for sensors.nitrogen}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'nitrogen','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>CO<sub>2</sub></th>
|
||||||
|
{^{for sensors.carbon_dioxide}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'carbon_dioxide','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Toxins</th>
|
||||||
|
{^{for sensors.plasma}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'plasma','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Pressure</th>
|
||||||
|
{^{for sensors.pressure}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'pressure','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Temperature (K)</th>
|
||||||
|
{^{for sensors.temperature}}
|
||||||
|
<td>{^{:~link(#data >= 0 ? ~precisionRound(#data,4) : "OFF",null,{"alarm":alarm,'command':'set_threshold','env':'temperature','var':#index+1})}}</td>
|
||||||
|
{{/for}}
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
Reference in New Issue
Block a user