loot
This commit is contained in:
parent
0ead044da1
commit
51cc3f3ca6
20 changed files with 278 additions and 33 deletions
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "data",
|
||||
"path": "folders/Scripts/util/data.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "array_contains",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
function array_contains_within(array, val) {
|
||||
var i, j;
|
||||
for (i=0; i<array_length(array); i++) {
|
||||
if typeof(array[i]) == "struct" {
|
||||
var dudes = variable_struct_get_names(array[i]);
|
||||
for (j=0; j<array_length(dudes); j++) {
|
||||
if array[i][$dudes[j]] == val return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "data",
|
||||
"path": "folders/Scripts/util/data.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "array_contains_within",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue