diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/WorkInProgress/Mini/atmos_control.dm
index c2ad6330ed6..68b03b10794 100644
--- a/code/WorkInProgress/Mini/atmos_control.dm
+++ b/code/WorkInProgress/Mini/atmos_control.dm
@@ -5,16 +5,37 @@
/obj/machinery/computer/atmoscontrol
name = "\improper Central Atmospherics Computer"
icon = 'icons/obj/computer.dmi'
- icon_state = "computer_generic"
+ icon_state = "tank"
density = 1
anchored = 1.0
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
var/obj/machinery/alarm/current
+ var/list/filter=null
var/overridden = 0 //not set yet, can't think of a good way to do it
- req_access = list(access_ce)
+ req_one_access = list(access_ce)
+/*
+/obj/machinery/computer/atmoscontrol/xeno
+ name = "\improper Xenobiology Atmospherics Computer"
+ filter=list(
+ /area/toxins/xenobiology/specimen_1,
+ /area/toxins/xenobiology/specimen_2,
+ /area/toxins/xenobiology/specimen_3,
+ /area/toxins/xenobiology/specimen_4,
+ /area/toxins/xenobiology/specimen_5,
+ /area/toxins/xenobiology/specimen_6)
+ req_one_access = list(access_xenobiology,access_ce)
+
+
+/obj/machinery/computer/atmoscontrol/gas_chamber
+ name = "\improper Gas Chamber Atmospherics Computer"
+ filter=list(
+ /area/security/gas_chamber)
+ req_one_access = list(access_ce,access_hos)
+*/
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
+ src.add_hiddenprint(user)
return interact(user)
/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob)
@@ -35,7 +56,9 @@
if(current)
dat += specific()
else
- for(var/obj/machinery/alarm/alarm in machines)
+ for(var/obj/machinery/alarm/alarm in sortAtom(machines))
+ if(!is_in_filter(alarm.alarm_area.type))
+ continue // NO ACCESS 4 U
dat += ""
switch(max(alarm.danger_level, alarm.alarm_area.atmosalm))
if (0)
@@ -57,11 +80,16 @@
return
return ..()
+
+/obj/machinery/computer/atmoscontrol/proc/is_in_filter(var/typepath)
+ if(!filter) return 1 // YEP. TOTALLY.
+ return typepath in filter
+
/obj/machinery/computer/atmoscontrol/proc/specific()
if(!current)
return ""
var/dat = "[current.name]
"
- dat += current.return_status()
+ //dat += current.return_status()
if(current.remote_control || overridden)
dat += "
[return_controls()]"
return dat
@@ -84,10 +112,19 @@
"co2_scrub",
"tox_scrub",
"n2o_scrub",
+ "o2_scrub",
"panic_siphon",
"scrubbing"
)
- current.send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
+ var/val
+ if(href_list["val"])
+ val=text2num(href_list["val"])
+ else
+ var/newval = input("Enter new value") as num|null
+ if(isnull(newval))
+ return
+ val = newval
+ current.send_signal(device_id, list (href_list["command"] = val))
spawn(3)
src.updateUsrDialog()
//if("adjust_threshold") //was a good idea but required very wide window
@@ -184,6 +221,26 @@
spawn(5)
src.updateUsrDialog()
return
+
+ if(href_list["preset"])
+ current.preset = text2num(href_list["preset"])
+ current.apply_preset()
+ spawn(5)
+ src.updateUsrDialog()
+ return
+
+ if(href_list["temperature"])
+ var/list/selected = current.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==null)
+ return
+ if(input_temperature > max_temperature || input_temperature < min_temperature)
+ usr << "Temperature must be between [min_temperature]C and [max_temperature]C"
+ else
+ current.target_temperature = input_temperature + T0C
+ return
updateUsrDialog()
//copypasta from alarm code, changed to work with this without derping hard
@@ -192,13 +249,14 @@
var/label=replacetext(uppertext(code),"2","2")
if(code=="tox")
label="Plasma"
- return "[label]"
+ return "[label]"
/obj/machinery/computer/atmoscontrol/proc/return_controls()
var/output = ""//"[alarm_zone] Air [name]
| Thermostat: [current.target_temperature - T0C]C |