mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Add attack animations
This commit is contained in:
@@ -162,6 +162,7 @@
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("\red [user] destroys the [src]. ")
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
var/locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if (isrobot(user) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "\red Resetting circuitry..."
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
@@ -31,6 +31,7 @@
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weapon/W = O
|
||||
if(src.smashed || src.localopened)
|
||||
if(localopened)
|
||||
@@ -39,6 +40,7 @@
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "\blue The cabinet's protective glass glances off the hit."
|
||||
|
||||
@@ -55,11 +55,12 @@
|
||||
if(ismob(user)) shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user as mob)
|
||||
/obj/structure/grille/attack_paw(mob/living/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
/obj/structure/grille/attack_hand(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='warning'>You kick [src].</span>", \
|
||||
@@ -73,9 +74,10 @@
|
||||
health -= 1
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/user as mob)
|
||||
/obj/structure/grille/attack_alien(mob/living/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
@@ -86,8 +88,9 @@
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/user as mob)
|
||||
/obj/structure/grille/attack_slime(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
return
|
||||
@@ -104,7 +107,7 @@
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
|
||||
@@ -71,7 +71,8 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
|
||||
user.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
@@ -84,8 +85,9 @@
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/user as mob)
|
||||
/obj/structure/mirror/attack_alien(mob/living/user as mob)
|
||||
if(islarva(user)) return
|
||||
user.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
@@ -93,10 +95,11 @@
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/user as mob)
|
||||
/obj/structure/mirror/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
|
||||
M.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
@@ -104,10 +107,11 @@
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_slime(mob/user as mob)
|
||||
/obj/structure/mirror/attack_slime(mob/living/user as mob)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
|
||||
@@ -278,26 +278,30 @@
|
||||
if(prob(75))
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
/obj/structure/table/attack_paw(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/attack_alien(mob/user)
|
||||
/obj/structure/table/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
|
||||
/obj/structure/table/attack_hand(mob/user)
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
@@ -766,20 +770,23 @@
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/rack/attack_paw(mob/user)
|
||||
/obj/structure/rack/attack_paw(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/user)
|
||||
/obj/structure/rack/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
@@ -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