Merge pull request #6764 from Citadel-Station-13/upstream-merge-37839
[MIRROR] Fixes minor cleanbot runtime.
This commit is contained in:
@@ -148,9 +148,14 @@
|
||||
if(loc == get_turf(target))
|
||||
if(!(check_bot(target) && prob(50))) //Target is not defined at the parent. 50% chance to still try and clean so we dont get stuck on the last blood drop.
|
||||
UnarmedAttack(target) //Rather than check at every step of the way, let's check before we do an action, so we can rescan before the other bot.
|
||||
if(QDELETED(target)) //We done here.
|
||||
target = null
|
||||
mode = BOT_IDLE
|
||||
return
|
||||
else
|
||||
shuffle = TRUE //Shuffle the list the next time we scan so we dont both go the same way.
|
||||
path = list()
|
||||
|
||||
if(!path || path.len == 0) //No path, need a new one
|
||||
//Try to produce a path to the target, and ignore airlocks to which it has access.
|
||||
path = get_path_to(src, target.loc, /turf/proc/Distance_cardinal, 0, 30, id=access_card)
|
||||
|
||||
Reference in New Issue
Block a user