mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Add attack animations
This commit is contained in:
@@ -179,8 +179,9 @@ var/global/wcColored
|
||||
/obj/structure/window/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
/obj/structure/window/proc/attack_generic(mob/living/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
@@ -193,25 +194,25 @@ var/global/wcColored
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/window/attack_alien(mob/user as mob)
|
||||
/obj/structure/window/attack_alien(mob/living/user as mob)
|
||||
if(islarva(user)) return
|
||||
attack_generic(user, 15)
|
||||
|
||||
/obj/structure/window/attack_animal(mob/user as mob)
|
||||
/obj/structure/window/attack_animal(mob/living/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
|
||||
/obj/structure/window/attack_slime(mob/user as mob)
|
||||
/obj/structure/window/attack_slime(mob/living/user as mob)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
return
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
|
||||
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
if(!istype(W)) return//I really wish I did not need this
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
|
||||
Reference in New Issue
Block a user