Puts in a check so you don't drink & splash

This commit is contained in:
killer653
2017-09-12 23:26:39 -04:00
parent 577bc7f1d9
commit 2fa9a55360

View File

@@ -150,10 +150,18 @@
/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
return 1
if(standard_splash_mob(user, target))
return
return 1
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
return 1
else
return
/obj/item/weapon/reagent_containers/food/drinks/glass2/standard_feed_mob(var/mob/user, var/mob/target)
if(afterattack()) //Check to see if harm intent & splash.
return
else
..() //If they're splashed, no need to do anything else.