[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>
This commit is contained in:
SkyratBot
2021-02-25 14:36:50 +01:00
committed by GitHub
parent 57f58b1714
commit d3ec11d55e
2 changed files with 4 additions and 4 deletions
@@ -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)
+2 -2
View File
@@ -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)