mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
Fixes unpowered doors being ignored by AStar
Fixes avoid turf functionality Makes mulebots only recalculate paths due to blockades only once per life tick.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user