From 3afe490be3b94cdaa26ccbab03b8d216a274a6dc Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 19 Sep 2017 06:37:30 -0500 Subject: [PATCH] [MIRROR] Fixes bees attacking apiaries (#2772) * Fixes bees attacking apiaries * Update bees.dm --- .../mob/living/simple_animal/hostile/bees.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index dea21157c6..f2d29d3660 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -128,11 +128,12 @@ if(istype(target, /obj/machinery/hydroponics)) var/obj/machinery/hydroponics/Hydro = target pollinate(Hydro) - else if(target == beehome) - var/obj/structure/beebox/BB = target - loc = BB - target = null - wanted_objects -= typecacheof(/obj/structure/beebox) //so we don't attack beeboxes when not going home + else if(istype(target, /obj/structure/beebox)) + if(target == beehome) + var/obj/structure/beebox/BB = target + forceMove(BB) + target = null + wanted_objects -= typecacheof(/obj/structure/beebox) //so we don't attack beeboxes when not going home return //no don't attack the goddamm box else . = ..() @@ -186,7 +187,7 @@ if(loc == beehome) idle = min(100, ++idle) if(idle >= BEE_IDLE_ROAMING && prob(BEE_PROB_GOROAM)) - loc = get_turf(beehome) + forceMove(get_turf(beehome)) else idle = max(0, --idle) if(idle <= BEE_IDLE_GOHOME && prob(BEE_PROB_GOHOME))