From 17a2aaf1938da90ee80da5c0957da6d7176835da Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 22 Apr 2022 01:03:25 +0200 Subject: [PATCH] [MIRROR] Hypernob Trit consumption reduction with bz [MDB IGNORE] (#12982) * Hypernob Trit consumption reduction with bz (#65856) Hypernob formation consumes a massive amount of tritium and nitrogen, creating a big hurdle for ordinance player. Solution: expand the importance of bz in hypernob formation to also reduce the amount of trit consumed Add an options to reduce amount of tritium consumed during hypernob formation. This should make nob-experiment easier for ordinance players. * Hypernob Trit consumption reduction with bz Co-authored-by: FinancialGoose <92416224+TheBoondock@users.noreply.github.com> --- code/modules/atmospherics/gasmixtures/reaction_factors.dm | 2 +- code/modules/atmospherics/gasmixtures/reactions.dm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reaction_factors.dm b/code/modules/atmospherics/gasmixtures/reaction_factors.dm index 5b546cca843..2d04de63e3c 100644 --- a/code/modules/atmospherics/gasmixtures/reaction_factors.dm +++ b/code/modules/atmospherics/gasmixtures/reaction_factors.dm @@ -130,7 +130,7 @@ /datum/gas/tritium = "5 moles of tritium needs to be present for the reaction to occur. Tritium is consumed at 5 reaction rate", /datum/gas/hypernoblium = "Hyper-Noblium is produced at 1 reaction rate", "Energy" = "[NOBLIUM_FORMATION_ENERGY] joules of energy is released per reaction rate.", - /datum/gas/bz = "BZ is not consumed in the reaction but will lower the amount of energy released", + /datum/gas/bz = "BZ is not consumed in the reaction but will lower the amount of energy released. It also reduces amount of trit consumed by a ratio between trit and bz, greater bz than trit will reduce more.", "Temperature" = "Can only occur between [NOBLIUM_FORMATION_MIN_TEMP] - [NOBLIUM_FORMATION_MAX_TEMP] kelvin", ) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 1d12ae6a732..4eaf62740fb 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -792,7 +792,8 @@ var/old_heat_capacity = air.heat_capacity() air.assert_gases(/datum/gas/hypernoblium, /datum/gas/bz) - cached_gases[/datum/gas/tritium][MOLES] -= 5 * nob_formed + var/reduction_factor = clamp(cached_gases[/datum/gas/tritium][MOLES]/(cached_gases[/datum/gas/tritium][MOLES] + cached_gases[/datum/gas/bz][MOLES]), 0.001 , 1) //reduces trit consumption in presence of bz upward to 0.1% reduction + cached_gases[/datum/gas/tritium][MOLES] -= 5 * nob_formed * reduction_factor cached_gases[/datum/gas/nitrogen][MOLES] -= 10 * nob_formed cached_gases[/datum/gas/hypernoblium][MOLES] += nob_formed // I'm not going to nitpick, but N20H10 feels like it should be an explosive more than anything.