Merge pull request #14136 from shellspeed1/Fixes-infinite-floor-tiles

Ports a fix for infinite floor tiles from tg caused by a bug that was fixed a long time ago on tg code.
This commit is contained in:
silicons
2021-01-25 23:01:23 -07:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
@@ -335,6 +335,11 @@
/mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf)
if(check_bot_working(target_turf))
add_to_ignore(target_turf)
target = null
playsound(src, 'sound/effects/whistlereset.ogg', 50, TRUE)
return
if(isspaceturf(target_turf))
//Must be a hull breach or in line mode to continue.
if(!is_hull_breach(target_turf) && !targetdirection)
@@ -418,3 +423,14 @@
repair(A)
else
..()
/**
* Checks a given turf to see if another floorbot is there, working as well.
*/
/mob/living/simple_animal/bot/floorbot/proc/check_bot_working(turf/active_turf)
if(isturf(active_turf))
for(var/mob/living/simple_animal/bot/floorbot/robot in active_turf)
if(robot.mode == BOT_REPAIRING)
return TRUE
return FALSE