Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пихаем щитами или жестко катаем персонал ими по полу #3974

Merged
merged 9 commits into from
Sep 25, 2019
34 changes: 34 additions & 0 deletions code/game/objects/items/weapons/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,40 @@
else
..()

/obj/item/weapon/shield/riot/attack(mob/living/M, mob/user)
if(user.a_intent == I_DISARM && M != user)
if(M.pulling)
M.stop_pulling()
if(istype(src, /obj/item/weapon/shield/riot/tele))
var/obj/item/weapon/shield/riot/tele/TS = src
if(TS.active)
user.do_attack_animation(M)
user.visible_message("<span class='warning'>[user.name] pushed away [M.name] with a [src.name]</span>")
M.dir = user.dir
Miracler112 marked this conversation as resolved.
Show resolved Hide resolved
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, user.dir), 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, user.dir), 2)
else
..()
return
else
user.do_attack_animation(M)
user.visible_message("<span class='warning'>[user.name] pushed away [M.name] with a [src.name]</span>")
M.dir = user.dir
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, M.dir), 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, M.dir), 2)

if(prob(35))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.shoes)
if(H.shoes.flags & NOSLIP)
return
M.Weaken(3)
shake_camera(M, 1, 1)

return
..()

/obj/item/weapon/shield/energy
name = "energy combat shield"
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
Expand Down