mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Ah yes, shuffle, of course (#22276)
This commit is contained in:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user