From 9b4692c056e9b9c10bb730d87ad73f87a766d1ef Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Thu, 1 Dec 2022 08:56:55 +0000 Subject: [PATCH 1/5] fix gas priorities --- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 96a72f312475..034dc96a10f4 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -185,6 +185,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) reactions += SSair.gas_reactions[I] if(!length(reactions)) return + reactions = sortTim(reactions, /proc/cmp_gas_reactions, TRUE) reaction_results = new var/temp = return_temperature() var/ener = thermal_energy() From b68af4e17c334348e0090dbd6c68569e34005c2b Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Thu, 1 Dec 2022 09:00:22 +0000 Subject: [PATCH 2/5] dumb --- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 2 +- code/modules/atmospherics/gasmixtures/reactions.dm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 034dc96a10f4..4e77a909ea33 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) reactions += SSair.gas_reactions[I] if(!length(reactions)) return - reactions = sortTim(reactions, /proc/cmp_gas_reactions, TRUE) + reactions = sortTim(reactions, /proc/cmp_gas_reaction, TRUE) reaction_results = new var/temp = return_temperature() var/ener = thermal_energy() diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index ce9706d909ac..91227e05208a 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -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. From cf44475318d64ba16dd9728360a4d37872e0c202 Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Thu, 1 Dec 2022 09:04:54 +0000 Subject: [PATCH 3/5] . --- code/modules/atmospherics/gasmixtures/reactions.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 91227e05208a..7f42a71a37b7 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -59,7 +59,7 @@ nobliumformation = 1001 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 + return b.priority - a.priority /datum/gas_reaction //regarding the requirements lists: the minimum or maximum requirements must be non-zero. From 29b76dbceb536cf988ce9d043056bc59e8c3ba43 Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Thu, 1 Dec 2022 09:12:03 +0000 Subject: [PATCH 4/5] Update gas_mixture.dm --- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 4e77a909ea33..6569afa1d2d3 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -185,7 +185,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) reactions += SSair.gas_reactions[I] if(!length(reactions)) return - reactions = sortTim(reactions, /proc/cmp_gas_reaction, TRUE) + if (length(reactions) > 1) + reactions = sortTim(reactions, /proc/cmp_gas_reaction, TRUE) reaction_results = new var/temp = return_temperature() var/ener = thermal_energy() From 3feb3bb26378462efe70611a6231d1a4268d5567 Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Thu, 1 Dec 2022 09:25:43 +0000 Subject: [PATCH 5/5] Update gas_mixture.dm --- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 6569afa1d2d3..41c51dfc01b0 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -186,7 +186,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) if(!length(reactions)) return if (length(reactions) > 1) - reactions = sortTim(reactions, /proc/cmp_gas_reaction, TRUE) + reactions = sortTim(reactions, /proc/cmp_gas_reaction) reaction_results = new var/temp = return_temperature() var/ener = thermal_energy()