mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Adds attack animation calls for attack_generic()
This commit is contained in:
@@ -38,11 +38,12 @@
|
|||||||
/obj/structure/cult/pylon/proc/attackpylon(mob/user as mob, var/damage)
|
/obj/structure/cult/pylon/proc/attackpylon(mob/user as mob, var/damage)
|
||||||
if(!isbroken)
|
if(!isbroken)
|
||||||
if(prob(1+ damage * 5))
|
if(prob(1+ damage * 5))
|
||||||
user << "You hit the pylon, and its crystal breaks apart!"
|
user.visible_message(
|
||||||
for(var/mob/M in viewers(src))
|
"<span class='danger'>[user] smashed the pylon!</span>",
|
||||||
if(M == user)
|
"<span class='warning'>You hit the pylon, and its crystal breaks apart!</span>",
|
||||||
continue
|
"You hear a tinkle of crystal shards"
|
||||||
M.show_message("[user.name] smashed the pylon!", 3, "You hear a tinkle of crystal shards", 2)
|
)
|
||||||
|
user.do_attack_animation(src)
|
||||||
playsound(get_turf(src), 'sound/effects/Glassbr3.ogg', 75, 1)
|
playsound(get_turf(src), 'sound/effects/Glassbr3.ogg', 75, 1)
|
||||||
isbroken = 1
|
isbroken = 1
|
||||||
density = 0
|
density = 0
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
else
|
else
|
||||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
|
|
||||||
/obj/machinery/door/New()
|
/obj/machinery/door/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -341,6 +341,7 @@
|
|||||||
if(stat & BROKEN)
|
if(stat & BROKEN)
|
||||||
user << "That object is useless to you."
|
user << "That object is useless to you."
|
||||||
return 0
|
return 0
|
||||||
|
user.do_attack_animation(src)
|
||||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||||
src.health -= damage
|
src.health -= damage
|
||||||
|
|||||||
@@ -1791,8 +1791,9 @@
|
|||||||
if(!damage)
|
if(!damage)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
src.log_message("Attack by an animal. Attacker - [user].",1)
|
src.log_message("Attacked. Attacker - [user].",1)
|
||||||
|
|
||||||
|
user.do_attack_animation(src)
|
||||||
if(!prob(src.deflect_chance))
|
if(!prob(src.deflect_chance))
|
||||||
src.take_damage(damage)
|
src.take_damage(damage)
|
||||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||||
|
|||||||
@@ -192,5 +192,6 @@
|
|||||||
if(!breakable || !damage || !wallbreaker)
|
if(!breakable || !damage || !wallbreaker)
|
||||||
return 0
|
return 0
|
||||||
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
spawn(1) qdel(src)
|
spawn(1) qdel(src)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -305,6 +305,7 @@
|
|||||||
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
||||||
if(!damage || !wallbreaker)
|
if(!damage || !wallbreaker)
|
||||||
return
|
return
|
||||||
|
user.do_attack_animation(src)
|
||||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||||
dump_contents()
|
dump_contents()
|
||||||
spawn(1) qdel(src)
|
spawn(1) qdel(src)
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
|
|
||||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||||
health -= I.force
|
health -= I.force
|
||||||
|
user.do_attack_animation(src)
|
||||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
for(var/mob/M in src)
|
for(var/mob/M in src)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||||
if(!damage || !wallbreaker)
|
if(!damage || !wallbreaker)
|
||||||
return 0
|
return 0
|
||||||
|
user.do_attack_animation(src)
|
||||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||||
spawn(1) dismantle()
|
spawn(1) dismantle()
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -217,6 +217,7 @@
|
|||||||
|
|
||||||
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
health -= damage
|
health -= damage
|
||||||
spawn(1) healthcheck()
|
spawn(1) healthcheck()
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -115,6 +115,7 @@
|
|||||||
|
|
||||||
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||||
health -= damage
|
health -= damage
|
||||||
|
user.do_attack_animation(src)
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
|
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
|
||||||
spawn(1) deflate(1)
|
spawn(1) deflate(1)
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
|
|
||||||
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
||||||
|
|
||||||
|
user.do_attack_animation(src)
|
||||||
if(shattered)
|
if(shattered)
|
||||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -207,6 +207,7 @@
|
|||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
else
|
else
|
||||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
/turf/simulated/wall/proc/success_smash(var/mob/user)
|
/turf/simulated/wall/proc/success_smash(var/mob/user)
|
||||||
user << "<span class='danger'>You smash through the wall!</span>"
|
user << "<span class='danger'>You smash through the wall!</span>"
|
||||||
|
user.do_attack_animation(src)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
dismantle_wall(1)
|
dismantle_wall(1)
|
||||||
|
|
||||||
|
|||||||
@@ -275,6 +275,7 @@
|
|||||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
|
|
||||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||||
|
|||||||
@@ -194,6 +194,7 @@
|
|||||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
spawn(1) updatehealth()
|
spawn(1) updatehealth()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -271,6 +271,7 @@
|
|||||||
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
if(!(status == LIGHT_OK||status == LIGHT_BURNED))
|
||||||
return
|
return
|
||||||
visible_message("<span class='danger'>[user] smashes the light!</span>")
|
visible_message("<span class='danger'>[user] smashes the light!</span>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
broken()
|
broken()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -363,6 +363,7 @@
|
|||||||
return
|
return
|
||||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||||
|
user.do_attack_animation(src)
|
||||||
src.health -= damage
|
src.health -= damage
|
||||||
if(prob(10))
|
if(prob(10))
|
||||||
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||||
|
|||||||
Reference in New Issue
Block a user