From 5c4af8dd7e8bba67f2008a34faad6cddac953840 Mon Sep 17 00:00:00 2001 From: Akrilla Date: Wed, 18 May 2016 18:01:26 +0100 Subject: [PATCH] Compile error fix. --- code/modules/mob/living/bot/cleanbot.dm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index ed57248b531..ab2d223c930 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -60,6 +60,12 @@ /mob/living/bot/cleanbot/Life() ..() + var/found_spot + var/current_tile + var/cleanable_type = /obj/effect/decal/cleanable + var/target_type + var/searching = 1 + if(!on) return @@ -101,14 +107,8 @@ patrol_path = list() return - var/found_spot - var/current_tile - var/cleanable_type = obj/effect/decal/cleanable - var/target_type - var/searching = true - while (searching) - for (current_tile = 0, current_tile <= maximum_search_range, i++) + for (current_tile = 0, current_tile <= maximum_search_range, current_tile++) for (cleanable_type in view(current_tile, src)) if (!(cleanable_type in ignorelist)) for (target_type in target_types) @@ -118,9 +118,10 @@ found_spot = handle_target() if (found_spot) - searching = false; - else if (target = null) //handles if path can not be created - searching = false + searching = 0; + else + if (target == null) //handles if path can not be created + searching = 0 else target = null @@ -158,9 +159,6 @@ var/moved = step_towards(src, patrol_path[1]) if(moved) patrol_path -= patrol_path[1] - - - /mob/living/bot/cleanbot/UnarmedAttack(var/obj/effect/decal/cleanable/D, var/proximity) if(!..()) return