Merge pull request #14615 from Incoming5643/stopgoingsouthwestibegofyou

Shuffles bot scanning
This commit is contained in:
tkdrg
2016-01-14 19:45:34 -03:00
@@ -327,7 +327,7 @@ Pass the desired type path itself, declaring a temporary var beforehand is not r
*/
/mob/living/simple_animal/bot/proc/scan(scan_type, old_target, scan_range = DEFAULT_SCAN_RANGE)
var/final_result
for (var/scan in view (scan_range, src) ) //Search for something in range!
for (var/scan in shuffle(view(scan_range, src))) //Search for something in range!
if(!istype(scan, scan_type)) //Check that the thing we found is the type we want!
continue //If not, keep searching!
if( (scan in ignore_list) || (scan == old_target) ) //Filter for blacklisted elements, usually unreachable or previously processed oness