mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
@@ -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
|
||||
|
||||
@@ -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("<span class='danger'>[src] blows apart!</span>", 1)
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
Reference in New Issue
Block a user