From 4a11790d4050886ad0cff37f1ec3e66c8bb64a75 Mon Sep 17 00:00:00 2001 From: ShiftyRail <31417754+ShiftyRail@users.noreply.github.com> Date: Mon, 13 Apr 2020 15:38:20 +0200 Subject: [PATCH] Bot bugfixes (#26184) * Bot bugfixes * frick --- code/game/machinery/bots/bots.dm | 12 ++++++++---- code/game/machinery/bots/mulebot.dm | 10 ++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 84e4d6fd034..32efc0af0b3 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -142,7 +142,7 @@ if (!isturf(src.loc)) return // Stay in the closet, little bot. The world isn't ready to accept you yet ;_; var/turf/T = get_turf(src) - set_glide_size(DELAY2GLIDESIZE((SS_WAIT_BOTS/steps_per)-1)) + set_glide_size(DELAY2GLIDESIZE(SS_WAIT_BOTS/steps_per - 0.5)) for(var/i = 1 to steps_per) log_astar_bot("Step [i] of [steps_per]") if(!path.len) //It is assumed we gain a path through process_bot() @@ -164,7 +164,7 @@ else frustration++ on_path_step_fail(next) - sleep((SS_WAIT_BOTS/steps_per)-1) + sleep((SS_WAIT_BOTS/steps_per)-0.5) return T == get_turf(src) // What happens when the bot cannot go to the next turf. @@ -173,6 +173,8 @@ for (var/obj/machinery/door/D in next) if (istype(D, /obj/machinery/door/firedoor)) continue + if (istype(D, /obj/machinery/door/poddoor)) + continue if (D.check_access(botcard)) D.open() frustration = 0 @@ -199,7 +201,7 @@ // It is very important to exit this proc when you don't have a path. /obj/machinery/bot/proc/process_patrol() astar_debug("process patrol called [src] [patrol_path.len]") - set_glide_size(DELAY2GLIDESIZE((SS_WAIT_BOTS/steps_per)-1)) + set_glide_size(DELAY2GLIDESIZE(SS_WAIT_BOTS/steps_per - 0.5)) for(var/i = 1 to steps_per) if(!patrol_path.len) return find_patrol_path() @@ -218,7 +220,7 @@ else frustration++ on_patrol_step_fail(next) - sleep((SS_WAIT_BOTS/steps_per)-1) + sleep((SS_WAIT_BOTS/steps_per)-0.5) return TRUE // This proc is called when the bot has no patrol path, no regular path, and is on autopatrol. @@ -289,6 +291,8 @@ for (var/obj/machinery/door/D in next) if (istype(D, /obj/machinery/door/firedoor)) continue + if (istype(D, /obj/machinery/door/poddoor)) + continue if (D.check_access(botcard)) D.open() frustration = 0 diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 6c1bdb56b51..5f83623533e 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -529,7 +529,7 @@ var/global/mulebot_count = 0 /obj/machinery/bot/mulebot/set_destination(var/new_dest) request_path(new_dest) - to_chat(world, "new_destination [new_dest]") + log_astar_beacon("new_destination [new_dest]") new_destination = new_dest request_path(new_dest) @@ -547,7 +547,7 @@ var/global/mulebot_count = 0 /obj/machinery/bot/mulebot/receive_signal(datum/signal/signal) var/recv = signal.data["beacon"] if(recv == new_destination) // if the recvd beacon location matches the set destination, then we will navigate there - to_chat(world, "[src] : new destination chosen, [recv]") + log_astar_beacon("[src] : new destination chosen, [recv]") destination = new_destination new_destination = "" target = signal.source.loc @@ -731,12 +731,6 @@ var/global/mulebot_count = 0 cell.emp_act(severity) ..() -/obj/machinery/bot/mulebot/post_signal_multiple(var/freq, var/list/keyval) - to_chat(world, "post_signal_multiple, [freq]") - for (var/x in keyval) - to_chat(world, "[x] : [keyval[x]]") - return ..() - /obj/machinery/bot/mulebot/explode() src.visible_message("[src] blows apart!", 1) var/turf/Tsec = get_turf(src)