diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index bc79c6634f..f8e24e1d85 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,88 @@ 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 + slot_flags = SLOT_BELT + w_class = 2 + force = 3 + var/on = 0 + + +/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob) + on = !on + 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.") + icon_state = "telebaton_1" + item_state = "telebaton_1" + w_class = 4 + force = 15//quite robust + attack_verb = list("smacked", "struck", "slapped") + else + user.visible_message("\blue You collapse the baton.",\ + "\blue [user] collapses their telescopic baton.",\ + "You hear a click.") + icon_state = "telebaton_0" + item_state = "telebaton_0" + w_class = 2 + force = 3//not so robust now + attack_verb = list("hit", "punched") + playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) + add_fingerprint(user) + + if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any + overlays.Cut()//this might delete other item overlays as well but eeeeeeeh + + var/icon/I = new /icon(src.icon, src.icon_state) + I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) + I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) + blood_overlay = I + + overlays += blood_overlay + + return + +/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob) + 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(4) //naaah + target.Weaken(4) + 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 9da76e62c6..828b9387c4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -26,6 +26,7 @@ new /obj/item/clothing/gloves/captain(src) new /obj/item/weapon/gun/energy/gun(src) new /obj/item/clothing/suit/armor/captain(src) + new /obj/item/weapon/melee/telebaton(src) return @@ -90,6 +91,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/html/changelog.html b/html/changelog.html index 3ffcb1b8c1..f76a4e94a5 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -58,7 +58,13 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. --> - +