// list.Find(item, start, end)
proc/list_find(list/list, item, start = 1, end = list.len + 1)
for(var/index in start to end - 1)
if(list[index] == item)
return index
return 0
It's an alternative to "item in list" which only returns true or false, instead of the index, like this:
// item in list
proc/list_in(list/list, item)
for(var/check in list)
if(check == item)
return TRUE
return FALSE
Neither are alternatives to looping over a list to actually do something to each item.
Will it still check all turfs in the game? Is what comes after 'in' relevant at all? If so, is there a way to use the Find() proc to achieve the same result without using a for loop?