diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 13604b6d635..e4a8d982970 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1148,8 +1148,8 @@ About the new airlock wires panel: update_icon() /obj/machinery/door/airlock/CanAStarPass(obj/item/weapon/card/id/ID) -//Airlock is passable if it is open (!density), bot has access, and is not bolted shut) - return !density || (check_access(ID) && !locked) +//Airlock is passable if it is open (!density), bot has access, and is not bolted shut or powered off) + return !density || (check_access(ID) && !locked && hasPower()) /obj/machinery/door/airlock/HasProximity(atom/movable/AM as mob|obj) for (var/obj/A in contents) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index eddf10879de..2ea8377d817 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -87,7 +87,7 @@ //used in the AStar algorithm to determinate if the turf the door is on is passable /obj/machinery/door/window/CanAStarPass(obj/item/weapon/card/id/ID, to_dir) - return !density || (dir != to_dir) || check_access(ID) + return !density || (dir != to_dir) || (check_access(ID) && hasPower()) /obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target) if(istype(mover) && mover.checkpass(PASSGLASS)) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index d4ff74d7fa6..fac256bd14c 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -515,7 +515,6 @@ mob/living/simple_animal/bot/mulebot/bot_reset() if(refresh) update_controls() /mob/living/simple_animal/bot/mulebot/proc/process_bot() - if(!on) return @@ -582,13 +581,13 @@ mob/living/simple_animal/bot/mulebot/bot_reset() if(blockcount > 10) // attempt 10 times before recomputing // find new path excluding blocked turf buzz(SIGH) - - spawn(2) - calc_path(next) + mode = BOT_WAIT_FOR_NAV + blockcount = 0 + spawn(20) + calc_path(avoid=next) if(path.len > 0) buzz(DELIGHT) mode = BOT_BLOCKED - mode = BOT_WAIT_FOR_NAV return return else @@ -622,7 +621,6 @@ mob/living/simple_animal/bot/mulebot/bot_reset() /mob/living/simple_animal/bot/mulebot/calc_path(turf/avoid = null) path = get_path_to(loc, target, src, /turf/proc/Distance_cardinal, 0, 250, id=access_card, exclude=avoid) - // sets the current destination // signals all beacons matching the delivery code // beacons will return a signal giving their locations diff --git a/code/orphaned procs/AStar.dm b/code/orphaned procs/AStar.dm index e00d43e9e8e..fdcd3f531f1 100644 --- a/code/orphaned procs/AStar.dm +++ b/code/orphaned procs/AStar.dm @@ -120,7 +120,7 @@ Actual Adjacent procs : //get adjacents turfs using the adjacent proc, checking for access with id var/list/L = call(cur.source,adjacent)(atom,id, simulated_only) for(var/turf/T in L) - if(T == exclude || T in closed) + if(T == exclude || (T in closed)) continue var/newg = cur.g + call(cur.source,dist)(T)