Fix: some fixes to make studio useable again, probably fixes #2139

This commit is contained in:
Pieter Vander Vennet 2024-09-14 22:43:09 +02:00
parent f2fca2dad8
commit 6672fc87b4
4 changed files with 89 additions and 65 deletions

View file

@ -401,6 +401,19 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
return newArr
}
public static DedupT<T>(arr: T[]): T[]{
if(!arr){
return arr
}
const items = []
for (const item of arr) {
if(items.indexOf(item) < 0){
items.push(item)
}
}
return items
}
/**
* Finds all duplicates in a list of strings
*