Allows dumping the contents out of bar glasses

This commit is contained in:
killer653
2017-09-12 22:25:42 -04:00
parent 49aad1a59e
commit 577bc7f1d9

View File

@@ -146,3 +146,14 @@
underlays += I
else continue
side = "right"
/obj/item/weapon/reagent_containers/food/drinks/glass2/afterattack(var/obj/target, var/mob/user, var/proximity)
if(user.a_intent == I_HURT) //We only want splashing to be done if they are on harm intent.
if(!is_open_container() || !proximity)
return
if(standard_splash_mob(user, target))
return
if(reagents && reagents.total_volume) //They are on harm intent, aka wanting to spill it.
user << "<span class='notice'>You splash the solution onto [target].</span>"
reagents.splash(target, reagents.total_volume)
return