Various Simple Mob Fixes (#11618)

This commit is contained in:
Geeves
2021-04-08 12:13:07 -03:00
committed by GitHub
parent 44222f1cc8
commit b87eb96ca0
3 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -227,6 +227,7 @@
AM.forceMove(loc)
captured = WEAKREF(L)
buckle(L)
layer = L.layer + 0.1
playsound(src, 'sound/weapons/beartrap_shut.ogg', 100, 1)
deployed = FALSE
src.shake_animation()
@@ -368,6 +369,7 @@
shake_animation()
update_icon()
release_time = world.time
layer = initial(layer)
/obj/item/trap/animal/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/grab))
@@ -585,7 +587,7 @@
return
user.visible_message("<span class='notice'>[user] begins [anchored ? "un" : "" ]securing \the [src]!</span>",
"<span class='notice'>You beign [anchored ? "un" : "" ]securing \the [src]!</span>")
"<span class='notice'>You begin [anchored ? "un" : "" ]securing \the [src]!</span>")
playsound(src.loc, W.usesound, 50, 1)
if(do_after(user, 30/W.toolspeed, act_target = src))
@@ -175,6 +175,8 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
setClickCooldown(attack_delay)
if(!Adjacent(target_mob))
return
if(!canmove)
return
if(!see_target())
LoseTarget()
for(var/grab in grabbed_by)
@@ -210,6 +212,8 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
/mob/living/simple_animal/hostile/proc/PostAttack(var/atom/target)
if(stat)
return
if(!isturf(loc)) // no teleporting out of lockers
return
for(var/grab in grabbed_by)
var/obj/item/grab/G = grab
if(G.state >= GRAB_AGGRESSIVE)
@@ -0,0 +1,8 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Mobs no longer teleport out of lockers after trying to attack people."
- bugfix: "Hostile mobs no longer attack out of traps."
- bugfix: "Trap now properly layer over mobs they've trapped."