Fixed the funny UI stuff

This commit is contained in:
Putnam
2021-06-08 18:22:15 -07:00
parent b04312cb3f
commit 268d3ec408
7 changed files with 26 additions and 53 deletions
@@ -98,14 +98,8 @@
//Actually transfer the gas
if(transfer_ratio > 0)
var/filtering = TRUE
if(!ispath(filter_type))
if(filter_type)
filter_type = gas_id2path(filter_type) //support for mappers so they don't need to type out paths
else
filtering = FALSE
if(filtering && air2.return_pressure() <= 9000)
if(filter_type && air2.return_pressure() <= 9000)
air1.scrub_into(air2, transfer_ratio, list(filter_type))
if(air3.return_pressure() <= 9000)
air1.transfer_ratio_to(air3, transfer_ratio)
@@ -129,9 +123,9 @@
data["max_rate"] = round(MAX_TRANSFER_RATE)
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type))
for(var/path in GLOB.meta_gas_ids)
data["filter_types"] += list(list("name" = GLOB.meta_gas_names[path], "id" = GLOB.meta_gas_ids[path], "selected" = (path == gas_id2path(filter_type))))
data["filter_types"] += list(list("name" = "Nothing", "id" = "", "selected" = !filter_type))
for(var/id in GLOB.gas_data)
data["filter_types"] += list(list("name" = GLOB.meta_gas_names[id], "id" = id, "selected" = (id == filter_type)))
return data
@@ -161,7 +155,7 @@
if("filter")
filter_type = null
var/filter_name = "nothing"
var/gas = gas_id2path(params["mode"])
var/gas = params["mode"]
if(gas in GLOB.meta_gas_names)
filter_type = gas
filter_name = GLOB.meta_gas_names[gas]
@@ -35,11 +35,6 @@
if(!id_tag)
id_tag = assign_uid_vents()
for(var/f in filter_types)
if(istext(f))
filter_types -= f
filter_types += gas_id2path(f)
/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy()
var/area/A = get_base_area(src)
if (A)
@@ -209,12 +204,12 @@
investigate_log(" was toggled to [scrubbing ? "scrubbing" : "siphon"] mode by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
if("toggle_filter" in signal.data)
filter_types ^= gas_id2path(signal.data["toggle_filter"])
filter_types ^= signal.data["toggle_filter"]
if("set_filters" in signal.data)
filter_types = list()
for(var/gas in signal.data["set_filters"])
filter_types += gas_id2path(gas)
filter_types += gas
if("init" in signal.data)
name = signal.data["init"]