From 7b2564628fa24096308ff4f0b4ca369a8f0e05df Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 5 Sep 2025 05:02:19 +0200 Subject: [PATCH] Fixes water cooler weird code/runtimes (#92758) ## About The Pull Request ``liquid_amount`` does nothing as its an atavism from main tank explosions (which use it for welding fuel effects), and ``chem_splash`` requires an integer range. Latter is also a problem in main boom proc, so we gotta floor the values before passing the range. ## Changelog :cl: fix: Water cooler explosions no longer runtime /:cl: --- code/modules/reagents/reagent_dispenser.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 3e1ebf3e461..7d35f43b103 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -174,7 +174,7 @@ if(!fuel_amt) visible_message(span_danger("\The [src] ruptures!")) // Leave it up to future terrorists to figure out the best way to mix reagents with fuel for a useful boom here - chem_splash(loc, null, 2 + (reagents.total_volume + fuel_amt) / 1000, list(reagents), extra_heat=(fuel_amt / 50),adminlog=(fuel_amt<25)) + chem_splash(loc, null, 2 + floor((reagents.total_volume + fuel_amt) / 1000), list(reagents), extra_heat=(fuel_amt / 50),adminlog=(fuel_amt<25)) if(fuel_amt) // with that done, actually explode visible_message(span_danger("\The [src] explodes!")) @@ -514,10 +514,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/peppertank, 3 /obj/structure/reagent_dispensers/water_cooler/boom() if(QDELETED(src)) return - var/liquid_amount = 0 if(reagents.total_volume) visible_message(span_danger("\The [src] flips on it's side and spills everywhere!")) - chem_splash(get_turf(src), null, 2 + (reagents.total_volume + liquid_amount) / 1000, list(reagents), extra_heat=(liquid_amount / 50), adminlog=(liquid_amount<25)) + chem_splash(get_turf(src), null, 2 + floor((reagents.total_volume) / 1000), list(reagents)) eject_jug(throw_away = TRUE) playsound(src, 'sound/effects/glass/glassbash.ogg', 100) tip_over()