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/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 && TS.active) || !TS) && !isrobot(M))
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)
user.attack_log += "\[[time_stamp()]\]<font color='red'>pushed [M.name] ([M.ckey]) with [src.name].</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'>pushed [user.name] ([user.ckey]) with [src.name].</font>"
msg_admin_attack("[key_name(user)] pushed [key_name(M)] with [src.name].", user)

if(prob(20))
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)

if(user.a_intent == I_HURT || M == user || (TS && !TS.active) || isrobot(M))
..()

/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