Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/modules/atmospherics/gasmixtures/gas_mixture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
reactions += SSair.gas_reactions[I]
if(!length(reactions))
return
if (length(reactions) > 1)
reactions = sortTim(reactions, /proc/cmp_gas_reaction)
reaction_results = new
var/temp = return_temperature()
var/ener = thermal_energy()
Expand Down
3 changes: 3 additions & 0 deletions code/modules/atmospherics/gasmixtures/reactions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ nobliumformation = 1001
maxb = R.priority
return maxb - maxa

/proc/cmp_gas_reaction(datum/gas_reaction/a, datum/gas_reaction/b) // compares lists of reactions by the maximum priority contained within the list
return b.priority - a.priority

/datum/gas_reaction
//regarding the requirements lists: the minimum or maximum requirements must be non-zero.
//when in doubt, use MINIMUM_MOLE_COUNT.
Expand Down