Merge branch 'main' into translations-system
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user