oh my god i found the source

This commit is contained in:
Yoshman29
2022-11-08 18:18:31 +01:00
parent 9638543af8
commit 9c021f319e
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
1239 1241
+6 -5
View File
@@ -627,19 +627,20 @@ class PlayState extends MusicBeatState
name = "Unknown"; name = "Unknown";
} }
for(k=>e in noteTypesArray)
if (e == name) return k;
noteTypesArray.push(name);
// loads script // loads script
var scriptPath = Paths.script('data/notes/${name}'); var scriptPath = Paths.script('data/notes/${name}');
if (Assets.exists(scriptPath)) { if (Assets.exists(scriptPath) && !scripts.contains(scriptPath)) {
var script = Script.create(scriptPath); var script = Script.create(scriptPath);
if (!(script is DummyScript)) { if (!(script is DummyScript)) {
scripts.add(script); scripts.add(script);
script.load(); script.load();
} }
} }
for(k=>e in noteTypesArray)
if (e == name) return k;
noteTypesArray.push(name);
return noteTypesArray.length-1; return noteTypesArray.length-1;
} }
function sortByShit(Obj1:Note, Obj2:Note):Int function sortByShit(Obj1:Note, Obj2:Note):Int
+6
View File
@@ -15,6 +15,12 @@ class ScriptPack extends Script {
} }
} }
public function contains(path:String) {
for(e in scripts)
if (e.path == path)
return true;
return false;
}
public function new(name:String) { public function new(name:String) {
additionalDefaultVariables["importScript"] = importScript; additionalDefaultVariables["importScript"] = importScript;
super(name); super(name);