diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index af23fdf9ea0..f686de963e1 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -11,13 +11,11 @@ var/move_to_delay = 2 //delay for the automated movement. var/list/friends = list() stop_automated_movement_when_pulled = 0 - var/destroy_surroundings = 1 /mob/living/simple_animal/hostile/proc/FindTarget() var/atom/T = null stop_automated_movement = 0 - var/list/non_threat_targets = list() // Targets which it will target if there are no other targets for(var/atom/A in ListTargets()) if(isliving(A)) @@ -27,25 +25,16 @@ else if(L in friends) continue else - - if(L.stat == CONSCIOUS) + if(!L.stat) stance = HOSTILE_STANCE_ATTACK T = L break - else if(L.stat == UNCONSCIOUS) - non_threat_targets += L - continue - if(istype(A, /obj/mecha)) var/obj/mecha/M = A if (M.occupant) stance = HOSTILE_STANCE_ATTACK T = M break - - if(!T && non_threat_targets.len) - T = pick(non_threat_targets) - return T /mob/living/simple_animal/hostile/proc/MoveToTarget() @@ -171,8 +160,7 @@ return /mob/living/simple_animal/hostile/proc/DestroySurroundings() - if(destroy_surroundings) - for(var/dir in cardinal) // North, South, East, West - var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir)) - if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille)) - obstacle.attack_animal(src) \ No newline at end of file + for(var/dir in cardinal) // North, South, East, West + var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir)) + if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille)) + obstacle.attack_animal(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index f341cc838d7..57c53cb6af8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -134,7 +134,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca health = 100 maxHealth = 100 var/obj/item/staff = null // the staff that changed they, never attack the bearer of this staff - destroy_surroundings = 0 + var/destroy_objects = 0 var/knockdown_people = 0 /mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/obj/item/staff) @@ -164,7 +164,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca if(istype(O, /obj/structure)) health = (anchored * 50) + 50 - destroy_surroundings = 1 + destroy_objects = 1 if(O.density && O.anchored) knockdown_people = 1 melee_damage_lower *= 2 @@ -183,6 +183,10 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca return 1 return +/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings() + if(destroy_objects) + ..() + /mob/living/simple_animal/hostile/mimic/copy/AttackingTarget() . =..() if(knockdown_people) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 86125886a0c..e3be6a83b3f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -422,10 +422,10 @@ /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) var/mob/living/L = target_mob - if(L.stat != DEAD) - return 0 + if(!L.stat) + return (0) if (istype(target_mob,/obj/mecha)) var/obj/mecha/M = target_mob if (M.occupant) - return 0 - return 1 \ No newline at end of file + return (0) + return (1) \ No newline at end of file