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
@@ -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)
@@ -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"