diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 068f7efdb3..63a0549acc 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -173,7 +173,7 @@ use_power = !use_power if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing - panic = text2num(signal.data["panic_siphon"] != null) + panic = text2num(signal.data["panic_siphon"]) if(panic) use_power = 1 scrubbing = 0 @@ -189,8 +189,12 @@ if(signal.data["scrubbing"] != null) scrubbing = text2num(signal.data["scrubbing"]) + if(scrubbing) + panic = 0 if(signal.data["toggle_scrubbing"]) scrubbing = !scrubbing + if(scrubbing) + panic = 0 var/list/toggle = list() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 2ffdcc6e2f..2cdfd0ee3d 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -195,7 +195,6 @@ if(RCON_YES) remote_control = 1 - updateDialog() return /obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment) @@ -468,7 +467,7 @@ frequency.post_signal(src, alert_signal) /obj/machinery/alarm/attack_ai(mob/user) - return interact(user) + ui_interact(user) /obj/machinery/alarm/attack_hand(mob/user) . = ..() @@ -477,315 +476,164 @@ return interact(user) /obj/machinery/alarm/interact(mob/user) - user.set_machine(src) + ui_interact(user) + wires.Interact(user) - if(buildstage!=2) - return +/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, remote = 0) + var/data[0] + var/is_locked = locked && !user.isAI() - if((get_dist(src, user) > 1 )) - if (!istype(user, /mob/living/silicon)) - user.machine = null - user << browse(null, "window=air_alarm") - user << browse(null, "window=AAlarmwires") - return + data["locked"] = is_locked + data["rcon"] = rcon_setting + data["screen"] = screen + populate_status(data) - else if (istype(user, /mob/living/silicon) && aidisabled) - user << "AI control for this Air Alarm interface has been disabled." - user << browse(null, "window=air_alarm") - return + if(!is_locked) + populate_controls(data) - if(wiresexposed && (!istype(user, /mob/living/silicon/ai))) - wires.Interact(user) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if(!ui) + ui = new(user, src, ui_key, "air_alarm.tmpl", src.name, 625, 625) + ui.set_initial_data(data) + ui.open() + ui.set_auto_update(1) - if(!shorted) - user << browse(return_text(user),"window=air_alarm") - onclose(user, "air_alarm") - - return - -/obj/machinery/alarm/proc/return_text(mob/user) - if(!(istype(user, /mob/living/silicon)) && locked) - return "\The [src][return_status()]
[rcon_text()]
(Swipe ID card to unlock interface)" - else - return "\The [src][return_status()]
[rcon_text()]
[return_controls()]" - -/obj/machinery/alarm/proc/return_status() +/obj/machinery/alarm/proc/populate_status(var/data) var/turf/location = get_turf(src) var/datum/gas_mixture/environment = location.return_air() var/total = environment.total_moles - var/output = "Air Status:
" - if(total == 0) - output += "Warning: Cannot obtain air sample for analysis." - return output + var/list/environment_data = new + data["has_environment"] = total + if(total) + var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume - output += {" - -"} + var/list/current_settings = TLV["pressure"] + var/pressure = environment.return_pressure() + var/pressure_danger = get_danger_level(pressure, current_settings) + environment_data[++environment_data.len] = list("name" = "Pressure", "value" = pressure, "unit" = "kPa", "danger_level" = pressure_danger) + data["total_danger"] = pressure_danger - var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume + current_settings = TLV["oxygen"] + var/oxygen_danger = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings) + environment_data[++environment_data.len] = list("name" = "Oxygen", "value" = environment.gas["oxygen"] / total * 100, "unit" = "%", "danger_level" = oxygen_danger) + data["total_danger"] = max(oxygen_danger, data["total_danger"]) - var/list/current_settings = TLV["pressure"] - var/environment_pressure = environment.return_pressure() - var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings) + current_settings = TLV["carbon dioxide"] + var/carbon_dioxide_danger = get_danger_level(environment.gas["carbon dioxide"]*partial_pressure, current_settings) + environment_data[++environment_data.len] = list("name" = "Carbon dioxide", "value" = environment.gas["carbon dioxide"] / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger) + data["total_danger"] = max(carbon_dioxide_danger, data["total_danger"]) - current_settings = TLV["oxygen"] - var/oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings) - var/oxygen_percent = round(environment.gas["oxygen"] / total * 100, 2) + current_settings = TLV["phoron"] + var/phoron_danger = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings) + environment_data[++environment_data.len] = list("name" = "Toxins", "value" = environment.gas["phoron"] / total * 100, "unit" = "%", "danger_level" = phoron_danger) + data["total_danger"] = max(phoron_danger, data["total_danger"]) - current_settings = TLV["carbon dioxide"] - var/co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, current_settings) - var/co2_percent = round(environment.gas["carbon_dioxide"] / total * 100, 2) + current_settings = TLV["temperature"] + var/temperature_danger = get_danger_level(environment.temperature, current_settings) + environment_data[++environment_data.len] = list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_danger) + data["total_danger"] = max(temperature_danger, data["total_danger"]) - current_settings = TLV["phoron"] - var/phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings) - var/phoron_percent = round(environment.gas["phoron"] / total * 100, 2) - - //current_settings = TLV["other"] - //var/other_moles = 0.0 - //for(var/datum/gas/G in environment.trace_gases) - // other_moles+=G.moles - //var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings) - - current_settings = TLV["temperature"] - var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings) - - output += {" -Pressure: [environment_pressure]kPa
-Oxygen: [oxygen_percent]%
-Carbon dioxide: [co2_percent]%
-Toxins: [phoron_percent]%
-"} - //if (other_dangerlevel==2) - // output += "Notice: High Concentration of Unknown Particles Detected
" - //else if (other_dangerlevel==1) - // output += "Notice: Low Concentration of Unknown Particles Detected
" - - output += "Temperature: [environment.temperature]K ([round(environment.temperature - T0C, 0.1)]C)
" - - //'Local Status' should report the LOCAL status, damnit. - output += "Local Status: " - switch(max(pressure_dangerlevel,oxygen_dangerlevel,co2_dangerlevel,phoron_dangerlevel,other_dangerlevel,temperature_dangerlevel)) - if(2) - output += "DANGER: Internals Required
" - if(1) - output += "Caution
" - if(0) - output += "Optimal
" - - output += "Area Status: " - if(alarm_area.atmosalm) - output += "Atmos alert in area" - else if (alarm_area.fire) - output += "Fire alarm in area" - else - output += "No alerts" - - return output - -/obj/machinery/alarm/proc/rcon_text() - var/dat = "" - - //Hackish, I know. I didn't feel like bothering to rework all of this. - dat += "
Remote Control:
" - if(rcon_setting == RCON_NO) - dat += "Off" - else - dat += "Off" - dat += " | " - if(rcon_setting == RCON_AUTO) - dat += "Auto" - else - dat += "Auto" - dat += " | " - if(rcon_setting == RCON_YES) - dat += "On" - else - dat += "On
Thermostat:
[target_temperature - T0C]C
" - - return dat - -/obj/machinery/alarm/proc/return_controls(var/source = src) - var/output = ""//"[alarm_zone] Air [name]
" + data["environment"] = environment_data + data["atmos_alarm"] = alarm_area.atmosalm + data["fire_alarm"] = alarm_area.fire != null + data["target_temperature"] = "[target_temperature - T0C]C" +/obj/machinery/alarm/proc/populate_controls(var/list/data) switch(screen) - if (AALARM_SCREEN_MAIN) - if(alarm_area.atmosalm) - output += "Reset - Area Atmospheric Alarm
" - else - output += "Activate - Area Atmospheric Alarm
" + if(AALARM_SCREEN_MAIN) + data["mode"] = mode + if(AALARM_SCREEN_VENT) + var/vents[0] + for(var/id_tag in alarm_area.air_vent_names) + var/long_name = alarm_area.air_vent_names[id_tag] + var/list/info = alarm_area.air_vent_info[id_tag] + if(!info) + continue + vents[++vents.len] = list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "checks" = info["checks"], + "direction" = info["direction"], + "external" = info["external"] + ) + data["vents"] = vents + if(AALARM_SCREEN_SCRUB) + var/scrubbers[0] + for(var/id_tag in alarm_area.air_scrub_names) + var/long_name = alarm_area.air_scrub_names[id_tag] + var/list/info = alarm_area.air_scrub_info[id_tag] + if(!info) + continue + scrubbers[++scrubbers.len] = list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "scrubbing" = info["scrubbing"], + "panic" = info["panic"], + "filters" = list() + ) + scrubbers[scrubbers.len]["filters"] += list(list("name" = "Oxygen", "command" = "o2_scrub", "val" = info["filter_o2"])) + scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrogen", "command" = "n2_scrub", "val" = info["filter_n2"])) + scrubbers[scrubbers.len]["filters"] += list(list("name" = "Carbon Dioxide", "command" = "co2_scrub","val" = info["filter_co2"])) + scrubbers[scrubbers.len]["filters"] += list(list("name" = "Toxin" , "command" = "tox_scrub","val" = info["filter_phoron"])) + scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrous Oxide", "command" = "n2o_scrub","val" = info["filter_n2o"])) + data["scrubbers"] = scrubbers + if(AALARM_SCREEN_MODE) + var/modes[0] + modes[++modes.len] = list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0) + modes[++modes.len] = list("name" = "Replace Air - Siphons out air while replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 0) + modes[++modes.len] = list("name" = "Panic - Siphons air out of the room", "mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1) + modes[++modes.len] = list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_CYCLE, "selected" = mode == AALARM_MODE_CYCLE, "danger" = 1) + modes[++modes.len] = list("name" = "Fill - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FILL, "selected" = mode == AALARM_MODE_FILL, "danger" = 0) + modes[++modes.len] = list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0) + data["modes"] = modes + data["mode"] = mode + if(AALARM_SCREEN_SENSORS) + var/list/selected + var/thresholds[0] - output += {" -Scrubbers Control
-Vents Control
-Set environmentals mode
-Sensor Settings
-
-"} - if (mode==AALARM_MODE_PANIC) - output += "PANIC SYPHON ACTIVE
Turn syphoning off" - else - output += "ACTIVATE PANIC SYPHON IN AREA" - - - if (AALARM_SCREEN_VENT) - var/sensor_data = "" - if(alarm_area.air_vent_names.len) - for(var/id_tag in alarm_area.air_vent_names) - var/long_name = alarm_area.air_vent_names[id_tag] - var/list/data = alarm_area.air_vent_info[id_tag] - if(!data) - continue; - var/state = "" - - sensor_data += {" -[long_name][state]
-Operating: -[data["power"]?"on":"off"] -
-Pressure checks: -external -internal -
-External pressure bound: -- -- -- -- -[data["external"]] -+ -+ -+ -+ - (reset) -
-"} - if (data["direction"] == "siphon") - sensor_data += {" -Direction: -siphoning -
-"} - sensor_data += {"
"} - else - sensor_data = "No vents connected.
" - output = {"Main menu
[sensor_data]"} - if (AALARM_SCREEN_SCRUB) - var/sensor_data = "" - if(alarm_area.air_scrub_names.len) - for(var/id_tag in alarm_area.air_scrub_names) - var/long_name = alarm_area.air_scrub_names[id_tag] - var/list/data = alarm_area.air_scrub_info[id_tag] - if(!data) - continue; - var/state = "" - - sensor_data += {" -[long_name][state]
-Operating: -[data["power"]?"on":"off"]
-Type: -[data["scrubbing"]?"scrubbing":"syphoning"]
-"} - - if(data["scrubbing"]) - sensor_data += {" -Filtering: -Oxygen -[data["filter_o2"]?"on":"off"]; -Nitrogen -[data["filter_n2"]?"on":"off"]; -Carbon Dioxide -[data["filter_co2"]?"on":"off"]; -Toxins -[data["filter_phoron"]?"on":"off"]; -Nitrous Oxide -[data["filter_n2o"]?"on":"off"] -
-"} - sensor_data += {" -Panic syphon: [data["panic"]?"PANIC SYPHON ACTIVATED":""] -Dea":"red'>A")]ctivate
-
-"} - else - sensor_data = "No scrubbers connected.
" - output = {"Main menu
[sensor_data]"} - - if (AALARM_SCREEN_MODE) - output += "Main menu
Air machinery mode for the area:" - - if (AALARM_SCREEN_SENSORS) - output += {" -Main menu
-Alarm thresholds:
-Partial pressure for gases - - - -"} - var/list/gases = list( + var/list/gas_names = list( "oxygen" = "O2", "carbon dioxide" = "CO2", "phoron" = "Toxin", - "other" = "Other",) - - var/list/selected - for (var/g in gases) - output += "" + "other" = "Other") + for (var/g in gas_names) + thresholds[++thresholds.len] = list("name" = gas_names[g], "settings" = list()) selected = TLV[g] for(var/i = 1, i <= 4, i++) - output += "" - output += "" + thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = i, "selected" = selected[i])) selected = TLV["pressure"] - output += " " + thresholds[++thresholds.len] = list("name" = "Pressure", "settings" = list()) for(var/i = 1, i <= 4, i++) - output += "" - output += "" + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = i, "selected" = selected[i])) selected = TLV["temperature"] - output += "" + thresholds[++thresholds.len] = list("name" = "Temperature", "settings" = list()) for(var/i = 1, i <= 4, i++) - output += "" - output += "
min2min1max1max2
[gases[g]][selected[i] >= 0 ? selected[i] :"OFF"]
Pressure[selected[i] >= 0 ? selected[i] :"OFF"]
Temperature[selected[i] >= 0 ? selected[i] :"OFF"]
" + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = i, "selected" = selected[i])) - return output + + data["thresholds"] = thresholds + +/obj/machinery/alarm/CanUseTopic(var/mob/user) + if(buildstage != 2) + return STATUS_CLOSE + + if(aidisabled && user.isAI()) + user << "AI control for \the [src] interface has been disabled." + return STATUS_CLOSE + + . = shorted ? STATUS_DISABLED : STATUS_INTERACTIVE + + return min(..(), .) /obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/remote = 0) - if(..(href, href_list, nowindow, !remote) || !( Adjacent(usr) || nowindow || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o - usr.machine = null - usr << browse(null, "window=air_alarm") - usr << browse(null, "window=AAlarmwires") - return - - add_fingerprint(usr) - usr.set_machine(src) + if(..(href, href_list, nowindow, !remote)) + return 1 // hrefs that can always be called -walter0o if(href_list["rcon"]) @@ -798,18 +646,19 @@ table tr:first-child th:first-child { border: none;} rcon_setting = RCON_AUTO if(RCON_YES) rcon_setting = RCON_YES - else - return + return 1 if(href_list["temperature"]) var/list/selected = TLV["temperature"] var/max_temperature = min(selected[3] - T0C, MAX_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 - if(!input_temperature || input_temperature > max_temperature || input_temperature < min_temperature) - usr << "Temperature must be between [min_temperature]C and [max_temperature]C" - else - target_temperature = input_temperature + T0C + var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null + if(isnum(input_temperature)) + if(input_temperature > max_temperature || input_temperature < min_temperature) + usr << "Temperature must be between [min_temperature]C and [max_temperature]C" + else + target_temperature = input_temperature + T0C + return 1 // hrefs that need the AA unlocked -walter0o if(!locked || remote || istype(usr, /mob/living/silicon)) @@ -817,9 +666,18 @@ table tr:first-child th:first-child { border: none;} if(href_list["command"]) var/device_id = href_list["id_tag"] switch(href_list["command"]) + if("set_external_pressure") + var/input_pressure = input("What pressure you like the system to mantain?", "Pressure Controls") as num|null + if(isnum(input_pressure)) + send_signal(device_id, list(href_list["command"] = input_pressure)) + return 1 + + if("reset_external_pressure") + send_signal(device_id, list(href_list["command"] = ONE_ATMOSPHERE)) + return 1 + if( "power", "adjust_external_pressure", - "set_external_pressure", "checks", "o2_scrub", "n2_scrub", @@ -830,6 +688,7 @@ table tr:first-child th:first-child { border: none;} "scrubbing") send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) ) + return 1 if("set_threshold") var/env = href_list["env"] @@ -838,7 +697,7 @@ table tr:first-child th:first-child { border: none;} var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound") var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num if (isnull(newval)) - return + return 1 if (newval<0) selected[threshold] = -1.0 else if (env=="temperature" && newval>5000) @@ -880,9 +739,11 @@ table tr:first-child th:first-child { border: none;} selected[3] = selected[4] apply_mode() + return 1 if(href_list["screen"]) screen = text2num(href_list["screen"]) + return 1 if(href_list["atmos_unlock"]) switch(href_list["atmos_unlock"]) @@ -890,24 +751,24 @@ table tr:first-child th:first-child { border: none;} alarm_area.air_doors_close() if("1") alarm_area.air_doors_open() + return 1 if(href_list["atmos_alarm"]) if (alarm_area.atmosalert(2)) apply_danger_level(2) update_icon() + return 1 if(href_list["atmos_reset"]) if (alarm_area.atmosalert(0)) apply_danger_level(0) update_icon() + return 1 if(href_list["mode"]) mode = text2num(href_list["mode"]) apply_mode() - - if(!nowindow) - updateUsrDialog() - + return 1 /obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob) src.add_fingerprint(user) @@ -937,7 +798,6 @@ table tr:first-child th:first-child { border: none;} if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN)) locked = !locked user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface." - updateUsrDialog() else user << "\red Access denied." return diff --git a/nano/templates/air_alarm.tmpl b/nano/templates/air_alarm.tmpl new file mode 100644 index 0000000000..5b1ee24574 --- /dev/null +++ b/nano/templates/air_alarm.tmpl @@ -0,0 +1,213 @@ + +

Air Status

+{{if data.has_environment}} + {{for data.environment}} + {{:value.name}}: + {{if value.danger_level == 2}} + + {{else value.danger_level == 1}} + + {{else}} + + {{/if}} + {{:helper.fixed(value.value, 1)}} + {{:value.unit}}
+ {{/for}} + Local Status: {{if value.danger_level == 2}} + DANGER: Internals Required + {{else value.danger_level == 1}} + Caution + {{else}} + Optimal + {{/if}} +
+ Area Status: {{if data.atmos_alarm}}Atmosphere alert in area{{else data.fire_alarm}}Fire alarm in area{{else}}No alerts{{/if}} +{{else}} + Warning: Cannot obtain air sample for analysis. +{{/if}} +
+ + + + + + + + + + + + + +
+
+

Remote Control

+
+

Thermostat

+
+
+
+
+ {{:helper.link('Off', null, { 'rcon' : 1}, null, data.rcon == 1 ? 'selected' : null)}} + {{:helper.link('Auto', null, { 'rcon' : 2}, null, data.rcon == 2 ? 'selected' : null)}} + {{:helper.link('On', null, { 'rcon' : 3}, null, data.rcon == 3 ? 'selected' : null)}} +
+
+
+ {{:helper.link(data.target_temperature, null, { 'temperature' : 1})}} +
+
+{{if data.locked}} + (Swipe ID card to unlock interface) +{{else}} + {{if data.screen != 1}} +
{{:helper.link('Main Menu', null, { 'screen' : 1})}}
+ {{/if}} + {{if data.screen == 1}} +
+ {{if data.atmos_alarm}} + {{:helper.link('Reset - Area Atmospheric Alarm', null, { 'atmos_reset' : 1})}} + {{else}} + {{:helper.link('Activate - Area Atmospheric Alarm', null, { 'atmos_alarm' : 1})}} + {{/if}} +
+
+
+ {{:helper.link('Scrubbers Control', null, { 'screen' : 3})}} +
+
+ {{:helper.link('Vents Control', null, { 'screen' : 2})}} +
+
+ {{:helper.link('Set Environmental Mode', null, { 'screen' : 4})}} +
+
+ {{:helper.link('Sensor Settings', null, { 'screen' : 5})}} +
+
+ {{if data.mode==3}} + {{:helper.link('PANIC SIPHON ACTIVE - Turn siphoning off', null, { 'mode' : 1}, null, 'redButton')}} + {{else}} + {{:helper.link('ACTIVATE PANIC SIPHON IN AREA', null, { 'mode' : 3}, null, 'yellowButton')}} + {{/if}} + {{else data.screen == 2}} + {{for data.vents}} +
+ {{:value.long_name}}
+
+
+ Operating: +
+
+ {{:helper.link(value.power ? 'On' : 'Off', null, { 'id_tag' : value.id_tag, 'command' : 'power', 'val' : value.power ? 0 : 1}, null, value.power ? null : 'redButton')}} +
+
+
+
+ Operation Mode: +
+
+ {{:value.direction == "siphon" ? 'Siphoning' : 'Pressurizing'}} +
+
+
+
+ Pressure Checks: +
+
+ {{:helper.link('External', null, { 'id_tag' : value.id_tag, 'command' : 'checks', 'val' : value.checks^1}, null, value.checks&1 ? 'selected' : null)}} + {{:helper.link('Internal', null, { 'id_tag' : value.id_tag, 'command' : 'checks', 'val' : value.checks^2}, null, value.checks&2 ? 'selected' : null)}} +
+
+
+
+ External Pressure Bound: +
+
+ {{:helper.link(helper.fixed(value.external,2), null, { 'id_tag' : value.id_tag, 'command' : 'set_external_pressure'})}} + {{:helper.link('Reset', null, { 'id_tag' : value.id_tag, 'command' : 'reset_external_pressure'})}} +
+
+
+ {{empty}} + No vents connected. + {{/for}} + {{else data.screen == 3}} + {{for data.scrubbers}} +
+ {{:value.long_name}}
+
+
+ Operating: +
+
+ {{:helper.link(value.power ? 'On' : 'Off', null, { 'id_tag' : value.id_tag, 'command' : 'power', 'val' : value.power ? 0 : 1}, null, value.power ? null : 'redButton')}} +
+
+
+
+ Operation Mode: +
+
+ {{:helper.link(value.scrubbing ? 'Scrubbing' : 'Siphoning', null, { 'id_tag' : value.id_tag, 'command' : 'scrubbing', 'val' : value.scrubbing ? 0 : 1}, null, value.scrubbing ? null : 'redButton')}} +
+
+
+
+ Filters: +
+
+ {{for value.filters :filterValue:filterIndex}} + {{:helper.link(filterValue.name, null, { 'id_tag' : value.id_tag, 'command' : filterValue.command, 'val' : filterValue.val ? 0 : 1}, null, filterValue.val ? 'selected' : null)}} + {{/for}} +
+
+
+ {{empty}} + No scrubbers connected. + {{/for}} + {{else data.screen == 4}} +

Environmental Modes

+ {{for data.modes}} +
+ {{:helper.link(value.name, null, { 'mode' : value.mode }, null, value.selected ? (value.danger ? 'redButton' : 'selected') : null)}} +
+ {{/for}} + {{else data.screen == 5}} +

Alarm Threshold

+ Partial pressure for gases. + + + + + {{for data.thresholds}} + + + {{for value.settings :settingsValue:settingsIndex}} + + {{/for}} + + {{/for}} +
min2min1max1max2
{{:value.name}} + {{:helper.link(settingsValue.selected >= 0 ? helper.fixed(settingsValue.selected, 2) : "Off", null, { 'command' : 'set_threshold', 'env' : settingsValue.env, 'var' : settingsValue.val })}} +
+ {{/if}} +{{/if}} + \ No newline at end of file