Ah yes, shuffle, of course (#22276)

This commit is contained in:
DGamerL
2023-09-10 10:19:31 -05:00
committed by GitHub
parent bb2b6d85fd
commit 79f9afb54e
@@ -469,7 +469,7 @@ Pass the desired type path itself, declaring a temporary var beforehand is not r
*/
/mob/living/simple_animal/bot/proc/scan(atom/scan_type, atom/old_target, scan_range = DEFAULT_SCAN_RANGE)
var/final_result
for(var/scan in shuffle(view(scan_range, src))) //Search for something in range!
for(var/scan in view(scan_range, src)) //Search for something in range!
var/atom/A = scan
if(!istype(A, scan_type)) //Check that the thing we found is the type we want!
continue //If not, keep searching!