diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 86d1b61c38..85087a1f8a 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -142,6 +142,13 @@ proc/listclearnulls(list/list) return picked return null +//Returns the next element in parameter list after first appearance of parameter element. If it is the last element of the list or not present in list, returns first element. +/proc/next_in_list(element, list/L) + for(var/i=1, i