From f29456994334843de5669e6842b9f21f8a88ced7 Mon Sep 17 00:00:00 2001 From: Seris02 Date: Thu, 5 Dec 2019 16:12:46 +0800 Subject: [PATCH] fixes bottle smash and fun stuff --- code/modules/food_and_drinks/drinks/drinks.dm | 2 ++ code/modules/reagents/reagent_containers.dm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index b8f937d8..a61063dc 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -14,6 +14,7 @@ volume = 50 resistance_flags = NONE var/isGlass = TRUE //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it + splashable = TRUE /obj/item/reagent_containers/food/drinks/on_reagent_change(changetype) if (gulp_size < 5) @@ -104,6 +105,7 @@ /obj/item/reagent_containers/food/drinks/throw_impact(atom/target, datum/thrownthing/throwinfo) . = ..() if(!.) //if the bottle wasn't caught + SplashReagents(target) smash(target, throwinfo.thrower, TRUE) /obj/item/reagent_containers/food/drinks/proc/smash(atom/target, mob/thrower, ranged = FALSE) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 5d30fb77..93a8f1f5 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -17,6 +17,7 @@ var/spillable = FALSE var/beaker_weakness_bitflag = NONE//Bitflag! var/container_HP = 2 + var/splashable = FALSE /obj/item/reagent_containers/Initialize(mapload, vol) . = ..() @@ -92,7 +93,7 @@ transform = initial(transform) /obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE) - if(!reagents || !reagents.total_volume || !spillable) + if(!reagents || !reagents.total_volume || !(splashable ? splashable : spillable)) return if(ismob(target) && target.reagents)