Fixed the funny UI stuff
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
|
||||
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
|
||||
data["filter_types"] = list()
|
||||
for(var/path in GLOB.meta_gas_ids)
|
||||
data["filter_types"] += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in scrubbing)))
|
||||
for(var/id in GLOB.gas_data)
|
||||
data["filter_types"] += list(list("gas_id" = id, "gas_name" = GLOB.gas_data[id].name, "enabled" = (id in scrubbing)))
|
||||
|
||||
if(holding)
|
||||
data["holding"] = list()
|
||||
@@ -93,7 +93,7 @@
|
||||
holding = null
|
||||
. = TRUE
|
||||
if("toggle_filter")
|
||||
scrubbing ^= gas_id2path(params["val"])
|
||||
scrubbing ^= params["val"]
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user