Merge branch 'main' into translations-system

This commit is contained in:
NeeEoo
2024-04-12 12:40:09 +02:00
11 changed files with 37 additions and 26 deletions
+4 -1
View File
@@ -98,6 +98,9 @@ class Note extends FlxSprite
return __customNoteTypeExists[path];
return __customNoteTypeExists[path] = Assets.exists(path);
}
static var DEFAULT_FIELDS:Array<String> = ["time", "id", "type", "sLen"];
public function new(strumLine:StrumLine, noteData:ChartNote, sustain:Bool = false, sustainLength:Float = 0, sustainOffset:Float = 0, ?prev:Note)
{
super();
@@ -115,7 +118,7 @@ class Note extends FlxSprite
this.sustainLength = sustainLength;
this.strumLine = strumLine;
for(field in Reflect.fields(noteData)) {
if(!["time", "id", "type", "sLen"].contains(field)) {
if(!DEFAULT_FIELDS.contains(field)) {
this.extra.set(field, Reflect.field(noteData, field));
}
}
+1 -1
View File
@@ -584,7 +584,7 @@ class PlayState extends MusicBeatState
}
var songEvents:Array<String> = [];
for (event in SONG.events) if (!songEvents.contains(event.name)) songEvents.push(event.name);
for (event in SONG.events) songEvents.pushOnce(event.name);
for (file in Paths.getFolderContent('data/events/', true, fromMods ? MODS : BOTH)) {
var fileName:String = Path.withoutExtension(Path.withoutDirectory(file));
+1 -1
View File
@@ -244,7 +244,7 @@ class Stage extends FlxBasic implements IBeatReceiver {
for (path in Paths.getFolderContent('data/stages/', true, mods ? MODS : BOTH))
if (Path.extension(path) == "xml" || Path.extension(path) == "hx") {
var file:String = Path.withoutDirectory(Path.withoutExtension(path));
if (!list.contains(file)) list.push(file);
list.pushOnce(file);
}
return list;