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
🆑
fix: Water cooler explosions no longer runtime
/🆑
This commit is contained in:
SmArtKar
2025-09-04 23:02:19 -04:00
committed by GitHub
parent 2da4d026b0
commit 7b2564628f
+2 -3
View File
@@ -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()