[MIRROR] You can now shove pets and some pushover bots away (#490)

* You can now shove pets and some pushover bots away (#53125)

* shove

* floyd suggestion

* lemon review

* You can now shove pets and some pushover bots away

Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
SkyratBot
2020-08-24 22:52:14 +02:00
committed by GitHub
co-authored by Rohesie
parent c6454e39e1
commit 7cc18320a8
@@ -16,7 +16,23 @@
if("grab")
grabbedby(M)
if("harm", "disarm")
if("disarm")
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
var/shove_dir = get_dir(M, src)
if(!Move(get_step(src, shove_dir), shove_dir))
log_combat(M, src, "shoved", "failing to move it")
M.visible_message("<span class='danger'>[M.name] shoves [src]!</span>",
"<span class='danger'>You shove [src]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
to_chat(src, "<span class='userdanger'>You're shoved by [M.name]!</span>")
return TRUE
log_combat(M, src, "shoved", "pushing it")
M.visible_message("<span class='danger'>[M.name] shoves [src], pushing [p_them()]!</span>",
"<span class='danger'>You shove [src], pushing [p_them()]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
to_chat(src, "<span class='userdanger'>You're pushed by [name]!</span>")
return TRUE
if("harm")
if(HAS_TRAIT(M, TRAIT_PACIFISM))
to_chat(M, "<span class='warning'>You don't want to hurt [src]!</span>")
return