Stop bots standing around blocking doors (#7509)

* Idle bots will move out of doorways

Idle bots will move out of doorways, including turfs with firedoors or blastdoors.

* +changelog

* fix parentheses
This commit is contained in:
Meghan-Rossi
2020-08-20 19:31:57 -07:00
committed by GitHub
parent 7428d47c83
commit d1ee8d117f
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -197,6 +197,12 @@
else
startPatrol()
else
if((locate(/obj/machinery/door) in loc) && !pulledby) //Don't hang around blocking doors, but don't run off if someone tries to pull us through one.
var/turf/my_turf = get_turf(src)
var/list/can_go = my_turf.CardinalTurfsWithAccess(botcard)
if(LAZYLEN(can_go))
if(step_towards(src, pick(can_go)))
return
handleIdle()
/mob/living/bot/proc/handleRegular()