From d0ee297f993273c70d494e75eda03d10c2ac9fef Mon Sep 17 00:00:00 2001 From: uporotiy Date: Wed, 19 Oct 2011 16:39:48 +0000 Subject: [PATCH] This is why we can have nice things. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2393 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items.dm | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index a41fcfe6871..44bfa14c7fb 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -162,6 +162,15 @@ safety = 1 return +/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob) + if(!ismob(M)) + return + user << "\red You stab [M] with the pen." + M << "\red You feel a tiny prick!" + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") + return + /obj/item/weapon/pen/sleepypen origin_tech = "syndicate=5" @@ -182,16 +191,21 @@ /obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob) if (!( istype(M, /mob) )) return + ..() if (reagents.total_volume) - //for(var/mob/O in viewers(M, null)) - // O.show_message(text("\red [] has been stabbed with [] by [].", M, src, user), 1) - user << "\red You stab [M] with the pen." - M << "\red You feel a tiny prick!" - M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") if(M.reagents) reagents.trans_to(M, 50) //used to be 150 return +/obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob) + if(!ismob(M)) + return + user << "\red You stab [M] with the pen." + M << "\red You feel a tiny prick!" + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") + ..() + return + /obj/item/device/flashlight/pen/paralysis/New() var/datum/reagents/R = new/datum/reagents(15) reagents = R @@ -203,13 +217,9 @@ /obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob) if (!( istype(M, /mob) )) return - if (reagents.total_volume) - user << "\red You stab [M] with the penlight." - M << "\red You feel a tiny prick!" - M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") - if(M.reagents) reagents.trans_to(M, 15) ..() + if (reagents.total_volume) + if(M.reagents) reagents.trans_to(M, 15) return /obj/item/weapon/Bump(mob/M as mob)