diff --git a/auxmos.dll b/auxmos.dll index 90e82c8f39..bd4e502f46 100644 Binary files a/auxmos.dll and b/auxmos.dll differ diff --git a/auxmos.pdb b/auxmos.pdb index 26a5b41065..778914dcf0 100644 Binary files a/auxmos.pdb and b/auxmos.pdb differ diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index bf10049bfd..3d45b9ab78 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -1,15 +1,6 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLASMA)) //the main four gases, which were at one time hardcoded GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLUOXIUM, GAS_STIMULUM, GAS_NITRYL))) //unable to react amongst themselves -/proc/gas_id2path(id) - var/list/meta_gas = GLOB.meta_gas_ids - if(id in meta_gas) - return id - for(var/path in meta_gas) - if(meta_gas[path] == id) - return path - return "" - // Listmos 2.0 // aka "auxgm", a send-up of XGM // it's basically the same architecture as XGM but @@ -28,29 +19,30 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list()) . = list() for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = new gas_path // ! - .[gas.id] = gas + if(gas.id) + .[gas.id] = gas /proc/meta_gas_heat_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.specific_heat) /proc/meta_gas_name_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.name) /proc/meta_gas_visibility_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.moles_visible) /proc/meta_gas_overlay_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = 0 //gotta make sure if(GLOB.meta_gas_overlays[gaspath]) doesn't break if(initial(gas.moles_visible) != null) @@ -59,20 +51,20 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list()) .[initial(gas.id)][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX) /proc/meta_gas_flags_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.flags) /proc/meta_gas_id_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.id) /proc/meta_gas_fusion_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) + . = list() + for(var/gas_path in subtypesof(/datum/gas)) var/datum/gas/gas = gas_path .[initial(gas.id)] = initial(gas.fusion_power) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 454da822fe..e1295d740e 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -8,13 +8,6 @@ if(initial(reaction.exclude)) continue reaction = new r - var/datum/gas/reaction_key - for (var/req in reaction.min_requirements) - if (ispath(req)) - var/datum/gas/req_gas = req - if (!reaction_key || initial(reaction_key.rarity) > initial(req_gas.rarity)) - reaction_key = req_gas - reaction.major_gas = reaction_key . += reaction sortTim(., /proc/cmp_gas_reaction) @@ -26,7 +19,6 @@ //when in doubt, use MINIMUM_MOLE_COUNT. var/list/min_requirements var/list/max_requirements - var/major_gas //the highest rarity gas used in the reaction. var/exclude = FALSE //do it this way to allow for addition/removal of reactions midmatch in the future var/priority = 100 //lower numbers are checked/react later than higher numbers. if two reactions have the same priority they may happen in either order var/name = "reaction" diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 8dc764222b..0a3125e116 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -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] diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index e462ccffe6..f15b7243c7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -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"] diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index ffffaac4d4..2caf337e10 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -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()