From cf87e6b394e46a2a4a2da26d3fc8f9a05d4f6440 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 9 Sep 2020 08:17:13 +0200 Subject: [PATCH] [MIRROR] Several associated shower bug/QOL fixes. (#706) * Merge pull request #53377 from ArcaneMusic/plumbingfixesrev2 So, I may have made at least one... maybe 1.5 math errors. Namely, the reaction volume on every reagent was the full 200u. This is bad for bitcoin, as it means that you can instantly bottom out most reactions and drown someone in 1000 units of water in a single second! That's bad. Also! On that note, vapor reaction was also transferring reagents that otherwise helped contribute to the above problem. I've yeeted this in kind, but I'm willing to do some more testing and planning to see if they were specific to the reaction volume fix first, but to be safe vapor is vape-aint. Lastly: Gas chems were producing way, way, WAY too much gas even once the above two points were occuring. So much gas, that it was capable of filling a 8x10 tile airless room in a timed 1 minute 40 seconds. So, we've slowed the roll of the free reagents being produced by synthesizers, and brought it down to 1/5th of the reaction volume to 1/20th. That sounds like a massive leap, but trust me, you could produce millions of KPA very, VERY quickly without it, but at 1/20 it was actually sort of reasonable. Edit: Apparently this also fixes #46413 as a result of removing the obj_react from the above gasses! Fixes #53357. Also, prevents reagent synthesizers and showers to behave EXACTLY like gas miners, but free. Also, prevents 1000s of reagents from being multiplied through the use of showers. Changelog fix: Showers no longer have the vapor reaction, as before the changes. fix: Showers no longer produce ludicrously over-scaled chemical reactions. balance: Gas chems now produce 1/4th less gas when released into the air as before. * Several associated shower bug/QOL fixes. Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/game/objects/structures/shower.dm | 2 +- .../chemistry/reagents/other_reagents.dm | 41 ++++--------------- .../chemistry/reagents/toxin_reagents.dm | 10 +---- 3 files changed, 9 insertions(+), 44 deletions(-) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 2eea9f6fb07..9d4c181238f 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -130,7 +130,7 @@ wash_atom(loc) for(var/am in loc) var/atom/movable/movable_content = am - reagents.expose(movable_content, TOUCH, reaction_volume) + reagents.expose(movable_content, TOUCH, 5) //There's not many reagents leaving the sink at once! if(!ismopable(movable_content)) // Mopables will be cleaned anyways by the turf wash above wash_atom(movable_content) else diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index aedde1ad3ac..f344a91f929 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -723,18 +723,13 @@ color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 // oderless and tasteless -/datum/reagent/oxygen/expose_obj(obj/exposed_obj, reac_volume) - . = ..() - if((!exposed_obj) || (!reac_volume)) - return - var/temp = holder ? holder.chem_temp : T20C - exposed_obj.atmos_spawn_air("o2=[reac_volume/2];TEMP=[temp]") /datum/reagent/oxygen/expose_turf(turf/open/exposed_turf, reac_volume) . = ..() if(istype(exposed_turf)) var/temp = holder ? holder.chem_temp : T20C - exposed_turf.atmos_spawn_air("o2=[reac_volume/2];TEMP=[temp]") + exposed_turf.atmos_spawn_air("o2=[reac_volume/20];TEMP=[temp]") + return /datum/reagent/copper name = "Copper" @@ -760,19 +755,11 @@ color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 -/datum/reagent/nitrogen/expose_obj(obj/exposed_obj, reac_volume) - . = ..() - if((!exposed_obj) || (!reac_volume)) - return - var/temp = holder ? holder.chem_temp : T20C - exposed_obj.atmos_spawn_air("n2=[reac_volume/2];TEMP=[temp]") - /datum/reagent/nitrogen/expose_turf(turf/open/exposed_turf, reac_volume) - . = ..() if(istype(exposed_turf)) var/temp = holder ? holder.chem_temp : T20C - exposed_turf.atmos_spawn_air("n2=[reac_volume/2];TEMP=[temp]") - return + exposed_turf.atmos_spawn_air("n2=[reac_volume/20];TEMP=[temp]") + return ..() /datum/reagent/hydrogen name = "Hydrogen" @@ -1268,18 +1255,11 @@ color = "#B0B0B0" // rgb : 192, 192, 192 taste_description = "something unknowable" -/datum/reagent/carbondioxide/expose_obj(obj/exposed_obj, reac_volume) - . = ..() - if((!exposed_obj) || (!reac_volume)) - return - var/temp = holder ? holder.chem_temp : T20C - exposed_obj.atmos_spawn_air("co2=[reac_volume/5];TEMP=[temp]") - /datum/reagent/carbondioxide/expose_turf(turf/open/exposed_turf, reac_volume) - . = ..() if(istype(exposed_turf)) var/temp = holder ? holder.chem_temp : T20C - exposed_turf.atmos_spawn_air("co2=[reac_volume/5];TEMP=[temp]") + exposed_turf.atmos_spawn_air("co2=[reac_volume/20];TEMP=[temp]") + return ..() /datum/reagent/nitrous_oxide name = "Nitrous Oxide" @@ -1289,18 +1269,11 @@ color = "#808080" taste_description = "sweetness" -/datum/reagent/nitrous_oxide/expose_obj(obj/exposed_obj, reac_volume) - . = ..() - if((!exposed_obj) || (!reac_volume)) - return - var/temp = holder ? holder.chem_temp : T20C - exposed_obj.atmos_spawn_air("n2o=[reac_volume/5];TEMP=[temp]") - /datum/reagent/nitrous_oxide/expose_turf(turf/open/exposed_turf, reac_volume) . = ..() if(istype(exposed_turf)) var/temp = holder ? holder.chem_temp : T20C - exposed_turf.atmos_spawn_air("n2o=[reac_volume/5];TEMP=[temp]") + exposed_turf.atmos_spawn_air("n2o=[reac_volume/20];TEMP=[temp]") /datum/reagent/nitrous_oxide/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume) . = ..() diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 0589e2f9291..34aae23aa07 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -87,21 +87,13 @@ A.atmos_spawn_air("plasma=[volume];TEMP=[holder.chem_temp]") holder.del_reagent(type) -/datum/reagent/toxin/plasma/expose_obj(obj/exposed_obj, reac_volume) - . = ..() - if((!exposed_obj) || (!reac_volume)) - return - var/temp = holder ? holder.chem_temp : T20C - if(temp >= LIQUID_PLASMA_BP) - exposed_obj.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]") - /datum/reagent/toxin/plasma/expose_turf(turf/open/exposed_turf, reac_volume) - . = ..() if(!istype(exposed_turf)) return var/temp = holder ? holder.chem_temp : T20C if(temp >= LIQUID_PLASMA_BP) exposed_turf.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]") + return ..() /datum/reagent/toxin/plasma/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! . = ..()