mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Add attack animations
This commit is contained in:
@@ -365,7 +365,7 @@
|
||||
|
||||
|
||||
//attack with an item - open/close cover, insert cell, or (un)lock interface
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user)
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
@@ -577,6 +577,7 @@
|
||||
(istype(W, /obj/item/device/multitool) || \
|
||||
istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/assembly/signaler)))
|
||||
return src.attack_hand(user)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!", \
|
||||
"\red You hit the [src.name] with your [W.name]!", \
|
||||
"You hear bang")
|
||||
@@ -671,6 +672,8 @@
|
||||
return
|
||||
if(indestructible)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("\red [user.name] slashes at the [src.name]!", "\blue You slash at the [src.name]!")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/obj/machinery/light/newlight = null
|
||||
var/sheets_refunded = 2
|
||||
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
del(src)
|
||||
@@ -99,7 +99,7 @@
|
||||
usr << "The casing is closed."
|
||||
return
|
||||
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.stage == 1)
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
// attack with item - insert light (if right type), otherwise try to break the light
|
||||
|
||||
/obj/machinery/light/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/light/attackby(obj/item/W, mob/living/user)
|
||||
|
||||
//Light replacer code
|
||||
if(istype(W, /obj/item/device/lightreplacer))
|
||||
@@ -390,7 +390,7 @@
|
||||
|
||||
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
|
||||
|
||||
|
||||
user.do_attack_animation(src)
|
||||
if(prob(1+W.force * 5))
|
||||
|
||||
user << "You hit the light, and it smashes!"
|
||||
@@ -405,7 +405,7 @@
|
||||
broken()
|
||||
|
||||
else
|
||||
user << "You hit the light!"
|
||||
user.visible_message("<span class='danger'>[user.name] hits the light.</span>")
|
||||
|
||||
// attempt to stick weapon into light socket
|
||||
else if(status == LIGHT_EMPTY)
|
||||
@@ -471,8 +471,8 @@
|
||||
user << "\green That object is useless to you."
|
||||
return
|
||||
else if (status == LIGHT_OK||status == LIGHT_BURNED)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red [user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
|
||||
broken()
|
||||
return
|
||||
|
||||
@@ -482,8 +482,8 @@
|
||||
M << "\red That object is useless to you."
|
||||
return
|
||||
else if (status == LIGHT_OK||status == LIGHT_BURNED)
|
||||
for(var/mob/O in viewers(src))
|
||||
O.show_message("\red [M.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
|
||||
broken()
|
||||
return
|
||||
// attack with hand - remove tube/bulb
|
||||
|
||||
Reference in New Issue
Block a user