mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-04 14:42:56 +00:00
Fixings
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
name = "Atmospherics Automations Console"
|
||||
|
||||
var/list/datum/automation/automations=list()
|
||||
var/list/datum/automation/automations = list()
|
||||
|
||||
receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -118,7 +118,8 @@
|
||||
|
||||
Topic(href,href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
if(href_list["on"])
|
||||
on = !on
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
|
||||
/datum/automation/set_injector_rate
|
||||
name = "Injector: Rate"
|
||||
var/injector=null
|
||||
var/rate=0
|
||||
var/injector = null
|
||||
var/rate = 0
|
||||
|
||||
Export()
|
||||
var/list/json = ..()
|
||||
json["injector"]=injector
|
||||
json["rate"]=rate
|
||||
json["injector"] = injector
|
||||
json["rate"] = rate
|
||||
return json
|
||||
|
||||
Import(var/list/json)
|
||||
|
||||
@@ -1,103 +1,121 @@
|
||||
/datum/automation/set_vent_pump_mode
|
||||
name="Vent Pump: Mode"
|
||||
|
||||
var/vent_pump=null
|
||||
var/mode="stabilize"
|
||||
var/vent_pump = null
|
||||
var/mode = "stabilize"
|
||||
var/vent_type = 0//0 for unary vents, 1 for DP vents
|
||||
|
||||
var/list/modes = list("stabilize","purge")
|
||||
|
||||
Export()
|
||||
var/list/json = ..()
|
||||
json["vent_pump"]=vent_pump
|
||||
json["mode"]=mode
|
||||
json["vent_pump"] = vent_pump
|
||||
json["mode"] = mode
|
||||
json["vent_type"] = vent_type
|
||||
return json
|
||||
|
||||
Import(var/list/json)
|
||||
..(json)
|
||||
vent_pump = json["vent_pump"]
|
||||
mode = json["mode"]
|
||||
|
||||
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
|
||||
..(aa)
|
||||
children=list(null)
|
||||
vent_type = text2num(json["vent_type"])
|
||||
|
||||
process()
|
||||
if(vent_pump)
|
||||
var/dirvalue = (mode == "stabalize" ? 1 : mode == "purge" ? 0 : 1)
|
||||
parent.send_signal(list ("tag" = vent_pump, "direction" = dirvalue),filter = RADIO_FROM_AIRALARM)
|
||||
var/dirvalue = (mode == "stabilize" ? 1 : mode == "purge" ? 0 : 1)
|
||||
parent.send_signal(list("tag" = vent_pump, "direction" = dirvalue), filter = (vent_type ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
|
||||
return 0
|
||||
|
||||
GetText()
|
||||
return "Set vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> mode to <a href=\"?src=\ref[src];set_mode=1\">[mode]</a>."
|
||||
return "Set <a href=\"?src=\ref[src];toggle_type=1\">[vent_type ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> mode to <a href=\"?src=\ref[src];set_mode=1\">[mode]</a>."
|
||||
|
||||
Topic(href,href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["set_mode"])
|
||||
mode = input("Select a mode to put this pump into.",mode) in modes
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["set_vent_pump"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
|
||||
//world << "test"
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
var/list/injector_names = list()
|
||||
if(!vent_type)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names |= I.id_tag
|
||||
else
|
||||
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
|
||||
//world << "test"
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names |= I.id_tag
|
||||
|
||||
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["toggle_type"])
|
||||
vent_type = !vent_type
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/datum/automation/set_vent_pump_power
|
||||
name="Vent Pump: Power"
|
||||
|
||||
var/vent_pump=null
|
||||
var/state=0
|
||||
var/vent_pump = null
|
||||
var/state = 0
|
||||
var/mode = 0//0 for unary vents, 1 for DP vents.
|
||||
|
||||
Export()
|
||||
var/list/json = ..()
|
||||
json["vent_pump"]=vent_pump
|
||||
json["state"]=state
|
||||
json["vent_pump"] = vent_pump
|
||||
json["state"] = state
|
||||
json["mode"] = mode
|
||||
return json
|
||||
|
||||
Import(var/list/json)
|
||||
..(json)
|
||||
vent_pump = json["vent_pump"]
|
||||
state = text2num(json["state"])
|
||||
|
||||
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
|
||||
..(aa)
|
||||
mode = text2num(json["mode"])
|
||||
|
||||
process()
|
||||
if(vent_pump)
|
||||
parent.send_signal(list ("tag" = vent_pump, "power"=state), filter = RADIO_FROM_AIRALARM)
|
||||
parent.send_signal(list ("tag" = vent_pump, "power" = state), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
|
||||
|
||||
GetText()
|
||||
return "Set vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> power to <a href=\"?src=\ref[src];set_power=1\">[state ? "on" : "off"]</a>."
|
||||
return "Set <a href=\"?src=\ref[src];toggle_mode=1\">[mode ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> power to <a href=\"?src=\ref[src];set_power=1\">[state ? "on" : "off"]</a>."
|
||||
|
||||
Topic(href,href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["set_power"])
|
||||
state = !state
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["set_vent_pump"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
if(!mode)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
else
|
||||
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["toggle_mode"])
|
||||
mode = !mode
|
||||
parent.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/datum/automation/set_vent_pump_pressure//controls the internal/external pressure bounds of a vent pump.
|
||||
name = "Vent pump: Pressure settings"
|
||||
name = "Vent Pump: Pressure Settings"
|
||||
|
||||
var/vent_pump = null
|
||||
var/intpressureout = 0//these 2 are for DP vents, if it's a unary vent you're sending to it will take intpressureout as var
|
||||
@@ -207,7 +225,7 @@
|
||||
return 1
|
||||
|
||||
/datum/automation/set_vent_pressure_checks
|
||||
name = "Vent pump: pressure checks"
|
||||
name = "Vent Pump: Pressure Checks"
|
||||
|
||||
var/vent_pump = null
|
||||
var/checks = 1
|
||||
|
||||
@@ -101,7 +101,7 @@ var/global/automation_types=typesof(/datum/automation) - /datum/automation
|
||||
return str
|
||||
|
||||
/datum/automation/Topic(href,href_list)
|
||||
if(parent.CanUseTopic(usr, href_list))//dumb hack to check sanity, empty topic shouldn't trigger a 1 on anything but sanity checks
|
||||
if(parent.Topic("src=\ref[parent]", list("src" = parent)))//dumb hack to check sanity, empty topic shouldn't trigger a 1 on anything but sanity checks
|
||||
return 1
|
||||
|
||||
if(href_list["add"])
|
||||
|
||||
Reference in New Issue
Block a user