Skip to content

Commit 69832f3

Browse files
bctixcharlesisfeline
authored andcommitted
add override for options
1 parent 37d8e0f commit 69832f3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

source/funkin/options/OptionsMenu.hx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,14 @@ class OptionsMenu extends TreeMenu {
6767
}
6868
})]);
6969

70+
var overridedMods:Array<String> = [];
71+
7072
for (i in funkin.backend.assets.ModsFolder.getLoadedMods()) {
7173
var xmlPath = Paths.xml('config/options/LIB_$i');
7274

75+
if(overridedMods.contains(i))
76+
continue;
77+
7378
if (Paths.assetsTree.existsSpecific(xmlPath, "TEXT")) {
7479
var access:Access = null;
7580
try {
@@ -78,8 +83,12 @@ class OptionsMenu extends TreeMenu {
7883
Logs.trace('Error while parsing options.xml: ${Std.string(e)}', ERROR);
7984
}
8085
if (access != null)
86+
{
87+
var firstElement = access.x.firstElement();
88+
if(firstElement.exists("override")) overridedMods.push(firstElement.get("override"));
8189
for(o in parseOptionsFromXML(access))
8290
main.add(o);
91+
}
8392
}
8493
}
8594
}

0 commit comments

Comments
 (0)