[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>
This commit is contained in:
SkyratBot
2022-04-22 00:03:25 +01:00
committed by GitHub
co-authored by FinancialGoose
parent c5f0ea76e0
commit 17a2aaf193
2 changed files with 3 additions and 2 deletions
@@ -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",
)
@@ -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.