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
29 changes: 29 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,35 @@
else
..()

/obj/item/weapon/shield/riot/proc/shield_push(mob/living/M, mob/user)
if(M.pulling)
M.stop_pulling()

user.do_attack_animation(M)
user.visible_message("<span class='warning'>[user.name] pushed away [M.name] with a [src.name]</span>")
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, user.dir), 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, M, user.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)

/obj/item/weapon/shield/riot/attack(mob/living/M, mob/user)
var/obj/item/weapon/shield/riot/tele/TS
if(istype(src, /obj/item/weapon/shield/riot/tele))
TS = src

if((M != user && !TS) || (M != user && TS && TS.active))
Miracler112 marked this conversation as resolved.
Show resolved Hide resolved
shield_push(M, user)
Miracler112 marked this conversation as resolved.
Show resolved Hide resolved
Miracler112 marked this conversation as resolved.
Show resolved Hide resolved

if(user.a_intent == I_HURT || M == user || (TS && !TS.active))
Miracler112 marked this conversation as resolved.
Show resolved Hide resolved
..()

/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