From c289975498efecff312aa130441cd5e66726b7fe Mon Sep 17 00:00:00 2001 From: mwerezak Date: Wed, 20 May 2015 00:28:57 -0400 Subject: [PATCH] Adds attack animation calls for a few common machines and structures - Cameras - Doors - Grilles - Windows --- code/game/machinery/camera/camera.dm | 2 ++ code/game/machinery/doors/door.dm | 1 + code/game/objects/structures/grille.dm | 2 ++ code/game/objects/structures/window.dm | 11 +++++++---- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 4a7aed5555..c88b9bfa37 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -115,6 +115,7 @@ if(user.species.can_shred(user)) set_status(0) + user.do_attack_animation(src) visible_message("\The [user] slashes at [src]!") playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) icon_state = "[initial(icon_state)]1" @@ -188,6 +189,7 @@ else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras if (W.force >= src.toughness) + user.do_attack_animation(src) visible_message("[src] has been [pick(W.attack_verb)] with [W] by [user]!") if (istype(W, /obj/item)) //is it even possible to get into attackby() with non-items? var/obj/item/I = W diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 5fe902c485..a5f492814e 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -265,6 +265,7 @@ if(src.density && istype(I, /obj/item/weapon) && user.a_intent == I_HURT && !istype(I, /obj/item/weapon/card)) var/obj/item/weapon/W = I if(W.damtype == BRUTE || W.damtype == BURN) + user.do_attack_animation(src) if(W.force < min_force) user.visible_message("\red \The [user] hits \the [src] with \the [W] with no visible effect." ) else diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 0dadc6b44f..49be0622c9 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -34,6 +34,7 @@ /obj/structure/grille/attack_hand(mob/user as mob) playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) + user.do_attack_animation(src) var/damage_dealt = 1 var/attack_message = "kicks" @@ -156,6 +157,7 @@ else if(istype(W, /obj/item/weapon/shard)) health -= W.force * 0.1 else if(!shock(user, 70)) + user.do_attack_animation(src) playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) switch(W.damtype) if("fire") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 8be7d2bd97..82a64c2f4a 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -178,6 +178,7 @@ if(HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) user.visible_message("[user] smashes through [src]!") + user.do_attack_animation(src) shatter() else if (usr.a_intent == I_HURT) @@ -189,13 +190,14 @@ return playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) - usr.visible_message("\red [usr.name] bangs against the [src.name]!", \ - "\red You bang against the [src.name]!", \ + user.do_attack_animation(src) + usr.visible_message("\red [usr.name] bangs against the [src.name]!", + "\red You bang against the [src.name]!", "You hear a banging sound.") else playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) - usr.visible_message("[usr.name] knocks on the [src.name].", \ - "You knock on the [src.name].", \ + usr.visible_message("[usr.name] knocks on the [src.name].", + "You knock on the [src.name].", "You hear a knocking sound.") return @@ -270,6 +272,7 @@ qdel(src) else if(W.damtype == BRUTE || W.damtype == BURN) + user.do_attack_animation(src) hit(W.force) if(health <= 7) anchored = 0