From d3ec11d55e2d98dca478f63c19d1699ac1725736 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 25 Feb 2021 14:36:50 +0100 Subject: [PATCH] [MIRROR] Fixes broken bottles not splashing the poor fellow hit by said bottle (#3637) * Fixes splashing (#57157) #57042 reported that bottles aren't splashing people properly, so this fixes that by setting the SplashReagents() function to have a spillable override. (I think the override was added recently, and this isan oversight, since bottles don't spill?) * Fixes broken bottles not splashing the poor fellow hit by said bottle Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com> --- code/modules/food_and_drinks/drinks/drinks/bottle.dm | 4 ++-- code/modules/reagents/reagent_containers.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index cee7a9cf6d7..a33ddcfcfdb 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -127,7 +127,7 @@ log_combat(user, target, "attacked", src) //The reagents in the bottle splash all over the target, thanks for the idea Nodrak - SplashReagents(target) + SplashReagents(target, override_spillable = TRUE) //Finally, smash the bottle. This kills (del) the bottle. smash(target, user) @@ -568,7 +568,7 @@ for(var/i in 1 to 2) if(istype(target, /obj/item/storage)) target = target.loc - SplashReagents(target) + SplashReagents(target, override_spillable = TRUE) target.fire_act() qdel(src) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index d00f063fd40..e3c80a30ea9 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -161,8 +161,8 @@ if(target.CanPass(src, get_turf(src)) && thrownby && HAS_TRAIT(thrownby, TRAIT_BOOZE_SLIDER)) . = TRUE -/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE) - if(!reagents || !reagents.total_volume || !spillable) +/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE, override_spillable = FALSE) + if(!reagents || !reagents.total_volume || (!spillable && !override_spillable)) return if(ismob(target) && target.reagents)