diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index bc79c6634f2..1321115bafc 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -75,13 +75,13 @@ else user.take_organ_damage(2*force) return +/*this is already called in ..() src.add_fingerprint(user) - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") - +*/ if (user.a_intent == "hurt") if(!..()) return playsound(src.loc, "swing_hit", 50, 1, -1) @@ -90,13 +90,79 @@ M.Stun(8) M.Weaken(8) for(var/mob/O in viewers(M)) - if (O.client) O.show_message("\red [M] has been beaten with the police baton by [user]!", 1, "\red You hear someone fall", 2) + if (O.client) O.show_message("\red [M] has been beaten with \the [src] by [user]!", 1, "\red You hear someone fall", 2) else playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1) M.Stun(5) M.Weaken(5) + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") + log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + src.add_fingerprint(user) + for(var/mob/O in viewers(M)) - if (O.client) O.show_message("\red [M] has been stunned with the police baton by [user]!", 1, "\red You hear someone fall", 2) + if (O.client) O.show_message("\red [M] has been stunned with \the [src] by [user]!", 1, "\red You hear someone fall", 2) + +//Telescopic baton +/obj/item/weapon/melee/telebaton + name = "telescopic baton" + desc = "A compact yet robust personal defense weapon. Can be concealed when folded." + icon = 'icons/obj/weapons.dmi' + icon_state = "telebaton_0" + item_state = "telebaton_0" + flags = FPRINT | TABLEPASS + attack_verb = list("smacked", "struck", "hit", "slapped") + w_class = 2 + force = 3 + var/on = 0 + var/mob/lastAttacked //fix for blood overlays not updating + +/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob) + on = !on + src.clean_blood() + if(on) + user.visible_message("\red You extend the baton.",\ + "\red With a flick of their wrist, [user] extends their telescopic baton.",\ + "You hear an ominous click.") + playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) + icon_state = "telebaton_1" + item_state = "telebaton_1" + w_class = 4 + force = 15//quite robust + else + user.visible_message("\blue You collapse the baton.",\ + "\blue [user] collapses their telescopic baton.",\ + "You hear a click.") + playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) + icon_state = "telebaton_0" + item_state = "telebaton_0" + w_class = 2 + force = 3//not so robust now + src.add_blood(lastAttacked) + src.add_fingerprint(user) + return + +/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob) + lastAttacked = target + if(on) + if ((CLUMSY in user.mutations) && prob(50)) + user << "\red You club yourself over the head." + user.Weaken(3 * force) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(2*force, BRUTE, "head") + else + user.take_organ_damage(2*force) + return + + if(!..()) return + playsound(src.loc, "swing_hit", 50, 1, -1) + target.Stun(8) + target.Weaken(8) + return + else + return ..() + /* *Energy Blade diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 9da76e62c60..0956de1e8d2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -90,6 +90,7 @@ new /obj/item/weapon/melee/baton(src) new /obj/item/weapon/gun/energy/gun(src) new /obj/item/clothing/tie/holster/waist(src) + new /obj/item/weapon/melee/telebaton(src) return diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 3fe20dbba72..0d535f5641d 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index e51ac68cec5..4f54739e80c 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 8b460325276..cf7f50c60a4 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ