further optimizes performance by making all of the meta gas properties use their own individual lists instead of being in a messy nested list

This commit is contained in:
deathride58
2019-04-14 16:40:37 -04:00
parent f7203a3428
commit 905f32b193
22 changed files with 101 additions and 61 deletions
@@ -371,7 +371,7 @@ obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir()
for(var/filtered_gas in removed.gases)
//Get the name of the gas and see if it is in the list
if(GLOB.meta_gas_info[filtered_gas][META_GAS_NAME] in wanted)
if(GLOB.meta_gas_names[filtered_gas] in wanted)
//The gas that is put in all the filtered out gases
filtered_out.temperature = removed.temperature
filtered_out.gases[filtered_gas] = removed.gases[filtered_gas]
@@ -1165,7 +1165,7 @@
var/list/gas_names = list()
var/list/gas_amounts = list()
for(var/id in gases)
var/name = GLOB.meta_gas_info[id][META_GAS_NAME]
var/name = GLOB.meta_gas_names[id]
var/amt = round(gases[id], 0.001)
gas_names.Add(name)
gas_amounts.Add(amt)