mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Merge pull request #14615 from Incoming5643/stopgoingsouthwestibegofyou
Shuffles bot scanning
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user