From 5eb87781574afd96a6cc3ad4b060b5ecc2b3cf36 Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 03:52:45 +0700 Subject: [PATCH 1/9] Partially Revert "Metallic hydrogen production now requires EFFORT (#15333)" and make few adjustment This reverts commit 543e7d88f271eccc3497e52b67fcdbc716f1a95a. --- .../atmospherics/gasmixtures/reactions.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index f55d5a6120d4..43d562994468 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -677,8 +677,8 @@ nobliumformation = 1001 /datum/gas_reaction/metalhydrogen/init_reqs() min_requirements = list( - /datum/gas/hydrogen = 1000, - /datum/gas/bz = 50, + /datum/gas/hydrogen = 100, + /datum/gas/bz = 5, "TEMP" = METAL_HYDROGEN_MINIMUM_HEAT ) @@ -688,18 +688,18 @@ nobliumformation = 1001 if(!isturf(holder)) return NO_REACTION var/turf/open/location = holder - ///More heat means higher chance to react but less efficiency, i.e. higher speed lower yield - var/increase_factor = min(log(10 , (temperature / METAL_HYDROGEN_MINIMUM_HEAT)), 5) //e7-e12 range + ///the more heat you use the higher is this factor + var/increase_factor = min((temperature / METAL_HYDROGEN_MINIMUM_HEAT), 5) ///the more moles you use and the higher the heat, the higher is the efficiency - var/heat_efficency = air.get_moles(/datum/gas/hydrogen)* 0.01 * increase_factor //This variable name is dumb but I can't be assed to change it + var/heat_efficency = air.get_moles(/datum/gas/hydrogen)* 0.01 * increase_factor var/pressure = air.return_pressure() var/energy_used = heat_efficency * METAL_HYDROGEN_FORMATION_ENERGY if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) - air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.05)) //0.0005-0.0025 x mols of present hydrogen as BZ consumed, something about it decomposing + air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.01)) if (prob(20 * increase_factor)) - air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 14)) //14-70% of present hydrogen consumed. - if (prob(25 / increase_factor)) + air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 3.5)) + if (prob(100 / increase_factor)) new /obj/item/stack/sheet/mineral/metal_hydrogen(location) SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) From 3398dc53b96e96903b854f1c05d24e553cc6d9cf Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 04:11:51 +0700 Subject: [PATCH 2/9] just change the number instead of adding of math --- code/modules/atmospherics/gasmixtures/reactions.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 43d562994468..88507be8d938 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -677,8 +677,9 @@ nobliumformation = 1001 /datum/gas_reaction/metalhydrogen/init_reqs() min_requirements = list( - /datum/gas/hydrogen = 100, - /datum/gas/bz = 5, + //same requirement as crystallizer metal h2 recipe + /datum/gas/hydrogen = 300, + /datum/gas/bz = 50, "TEMP" = METAL_HYDROGEN_MINIMUM_HEAT ) From ffe73ede9feb1ca86896d9f63b0c689ecf549b1b Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 04:16:16 +0700 Subject: [PATCH 3/9] th --- code/modules/atmospherics/gasmixtures/reactions.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 88507be8d938..3783db160a27 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -697,9 +697,9 @@ nobliumformation = 1001 var/energy_used = heat_efficency * METAL_HYDROGEN_FORMATION_ENERGY if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) - air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.01)) + air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.05)) if (prob(20 * increase_factor)) - air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 3.5)) + air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 4.5)) if (prob(100 / increase_factor)) new /obj/item/stack/sheet/mineral/metal_hydrogen(location) SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) From 685b874ac1cc188cb345c350d796e49d7737d822 Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 04:21:26 +0700 Subject: [PATCH 4/9] alr --- code/modules/atmospherics/gasmixtures/reactions.dm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 3783db160a27..43189f629494 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -677,9 +677,8 @@ nobliumformation = 1001 /datum/gas_reaction/metalhydrogen/init_reqs() min_requirements = list( - //same requirement as crystallizer metal h2 recipe - /datum/gas/hydrogen = 300, - /datum/gas/bz = 50, + /datum/gas/hydrogen = 400, + /datum/gas/bz = 40, "TEMP" = METAL_HYDROGEN_MINIMUM_HEAT ) @@ -700,9 +699,8 @@ nobliumformation = 1001 air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.05)) if (prob(20 * increase_factor)) air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 4.5)) - if (prob(100 / increase_factor)) - new /obj/item/stack/sheet/mineral/metal_hydrogen(location) - SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) + new /obj/item/stack/sheet/mineral/metal_hydrogen(location) + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) if(energy_used > 0) var/new_heat_capacity = air.heat_capacity() From 9157a434466fc2098636ebcef8626193b152f46f Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 15:23:07 +0700 Subject: [PATCH 5/9] c --- 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 43189f629494..6a4eb58c23c3 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -698,7 +698,7 @@ nobliumformation = 1001 if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.05)) if (prob(20 * increase_factor)) - air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 4.5)) + air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 10)) //Still consume about 70% of the hydrogen present new /obj/item/stack/sheet/mineral/metal_hydrogen(location) SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) From b41b3d40c9f38f84d323999039157dad2382eccb Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 15:30:10 +0700 Subject: [PATCH 6/9] do --- 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 6a4eb58c23c3..0d724310c579 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -696,7 +696,7 @@ nobliumformation = 1001 var/energy_used = heat_efficency * METAL_HYDROGEN_FORMATION_ENERGY if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) - air.adjust_moles(/datum/gas/bz, -(heat_efficency * 0.05)) + air.adjust_moles(/datum/gas/bz, -(heat_efficency)) //About half the amount of BZ requirement consumed if (prob(20 * increase_factor)) air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 10)) //Still consume about 70% of the hydrogen present new /obj/item/stack/sheet/mineral/metal_hydrogen(location) From 47bdcd6c259f30aa7a599ac91aeb97303040ad42 Mon Sep 17 00:00:00 2001 From: Bop Date: Thu, 6 Jul 2023 15:33:15 +0700 Subject: [PATCH 7/9] more bz consumption --- 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 0d724310c579..69c8e7604702 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -696,7 +696,7 @@ nobliumformation = 1001 var/energy_used = heat_efficency * METAL_HYDROGEN_FORMATION_ENERGY if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) - air.adjust_moles(/datum/gas/bz, -(heat_efficency)) //About half the amount of BZ requirement consumed + air.adjust_moles(/datum/gas/bz, -(heat_efficency)) //About 70% the amount of BZ requirement consumed if (prob(20 * increase_factor)) air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 10)) //Still consume about 70% of the hydrogen present new /obj/item/stack/sheet/mineral/metal_hydrogen(location) From 83fd3b3e57693827c0f4f900fc37929d66403d1e Mon Sep 17 00:00:00 2001 From: Bop Date: Sat, 8 Jul 2023 04:06:34 +0700 Subject: [PATCH 8/9] log --- code/modules/atmospherics/gasmixtures/reactions.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 69c8e7604702..6bbba56c6fa3 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -677,8 +677,8 @@ nobliumformation = 1001 /datum/gas_reaction/metalhydrogen/init_reqs() min_requirements = list( - /datum/gas/hydrogen = 400, - /datum/gas/bz = 40, + /datum/gas/hydrogen = 300, + /datum/gas/bz = 50, "TEMP" = METAL_HYDROGEN_MINIMUM_HEAT ) @@ -689,7 +689,7 @@ nobliumformation = 1001 return NO_REACTION var/turf/open/location = holder ///the more heat you use the higher is this factor - var/increase_factor = min((temperature / METAL_HYDROGEN_MINIMUM_HEAT), 5) + var/increase_factor = min(log(10 , (temperature / METAL_HYDROGEN_MINIMUM_HEAT)), 5) //e7-e12 range ///the more moles you use and the higher the heat, the higher is the efficiency var/heat_efficency = air.get_moles(/datum/gas/hydrogen)* 0.01 * increase_factor var/pressure = air.return_pressure() @@ -697,7 +697,7 @@ nobliumformation = 1001 if(pressure >= METAL_HYDROGEN_MINIMUM_PRESSURE && temperature >= METAL_HYDROGEN_MINIMUM_HEAT) air.adjust_moles(/datum/gas/bz, -(heat_efficency)) //About 70% the amount of BZ requirement consumed - if (prob(20 * increase_factor)) + if (prob(25 * increase_factor)) air.adjust_moles(/datum/gas/hydrogen, -(heat_efficency * 10)) //Still consume about 70% of the hydrogen present new /obj/item/stack/sheet/mineral/metal_hydrogen(location) SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((heat_efficency * increase_factor * 0.5), METAL_HYDROGEN_RESEARCH_MAX_AMOUNT)) From 97fc6151f156d422f46ccdf9dad6ddae2e4328b0 Mon Sep 17 00:00:00 2001 From: Bop Date: Sat, 8 Jul 2023 04:09:55 +0700 Subject: [PATCH 9/9] d --- code/modules/atmospherics/gasmixtures/reactions.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 6bbba56c6fa3..efe099b4b64d 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -677,7 +677,7 @@ nobliumformation = 1001 /datum/gas_reaction/metalhydrogen/init_reqs() min_requirements = list( - /datum/gas/hydrogen = 300, + /datum/gas/hydrogen = 300, //same crystallizer recipe /datum/gas/bz = 50, "TEMP" = METAL_HYDROGEN_MINIMUM_HEAT ) @@ -691,7 +691,7 @@ nobliumformation = 1001 ///the more heat you use the higher is this factor var/increase_factor = min(log(10 , (temperature / METAL_HYDROGEN_MINIMUM_HEAT)), 5) //e7-e12 range ///the more moles you use and the higher the heat, the higher is the efficiency - var/heat_efficency = air.get_moles(/datum/gas/hydrogen)* 0.01 * increase_factor + var/heat_efficency = air.get_moles(/datum/gas/hydrogen)* 0.01 * increase_factor //This variable name is dumb but I can't be assed to change it var/pressure = air.return_pressure() var/energy_used = heat_efficency * METAL_HYDROGEN_FORMATION_ENERGY