From 4c201d82192fadbb0a46cd8dca9f44744e790020 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Sat, 5 Dec 2015 14:22:40 +0000 Subject: [PATCH] Adds ability to smash bottles on things other than people's heads --- .../reagent_containers/food/drinks/bottle.dm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 3d832bf6a2..96f1ff219f 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -73,6 +73,19 @@ qdel(src) return B +/obj/item/weapon/reagent_containers/food/drinks/bottle/verb/smash_bottle() + set name = "Smash Bottle" + set category = "Object" + + var/list/things_to_smash_on = list() + for(var/atom/A in range (1, usr)) + if(A.density && usr.Adjacent(A) && !istype(A, /mob)) + things_to_smash_on += A + + var/choice = input("Select what you want to smash the bottle on.") as null|anything in things_to_smash_on + usr.put_in_hands(src.smash(usr.loc, choice)) + usr.visible_message("[usr] smashed the bottle on [choice]!") + /obj/item/weapon/reagent_containers/food/drinks/bottle/attackby(obj/item/W, mob/user) if(!rag && istype(W, /obj/item/weapon/reagent_containers/glass/rag)) insert_rag(W, user) @@ -452,6 +465,4 @@ center_of_mass = list("x"=16, "y"=10) New() ..() - reagents.add_reagent("ale", 30) - - + reagents.add_reagent("ale", 30) \ No newline at end of file