damp rag can now inject or apply reagents

This commit is contained in:
Jordie0608
2015-05-20 01:12:16 +10:00
parent 67f1132b3f
commit ffcba8cb61
3 changed files with 17 additions and 17 deletions
@@ -19,18 +19,17 @@
volume = 5
can_be_placed_into = null
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
if(ismob(target) && target.reagents && reagents.total_volume)
user.visible_message("<span class='danger'>[user] has smothered \the [target] with \the [src]!</span>", "<span class='danger'>You smother \the [target] with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
src.reagents.reaction(target, TOUCH)
src.reagents.clear_reagents()
return
else
..()
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity)
if(!proximity) return
if(istype(A) && src in user)
if(!proximity)
return
if(ismob(A) && A.reagents && reagents.total_volume)
if(user.a_intent == "harm")
src.reagents.reaction(A, TOUCH)
src.reagents.clear_reagents()
else
reagents.trans_to(A, reagents.total_volume)
user.visible_message("<span class='danger'>[user] has smothered \the [A] with \the [src]!</span>", "<span class='danger'>You smother \the [A] with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
else if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user,30))
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")