1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 11:22:55 +00:00

Give timeFormat a default value (fixes the Stress issues!)

This commit is contained in:
EliteMasterEric 2024-05-31 18:09:07 -04:00
parent 007ec95e85
commit 98eda8ef55

View file

@ -56,6 +56,8 @@ class SongMetadata implements ICloneable<SongMetadata>
@:default(funkin.data.song.SongRegistry.DEFAULT_GENERATEDBY) @:default(funkin.data.song.SongRegistry.DEFAULT_GENERATEDBY)
public var generatedBy:String; public var generatedBy:String;
@:optional
@:default(funkin.data.song.SongData.SongTimeFormat.MILLISECONDS)
public var timeFormat:SongTimeFormat; public var timeFormat:SongTimeFormat;
public var timeChanges:Array<SongTimeChange>; public var timeChanges:Array<SongTimeChange>;
@ -117,7 +119,7 @@ class SongMetadata implements ICloneable<SongMetadata>
{ {
var ignoreNullOptionals = true; var ignoreNullOptionals = true;
var writer = new json2object.JsonWriter<SongMetadata>(ignoreNullOptionals); var writer = new json2object.JsonWriter<SongMetadata>(ignoreNullOptionals);
// I believe @:jignored should be iggnored by the writer? // I believe @:jignored should be ignored by the writer?
// var output = this.clone(); // var output = this.clone();
// output.variation = null; // Not sure how to make a field optional on the reader and ignored on the writer. // output.variation = null; // Not sure how to make a field optional on the reader and ignored on the writer.
return writer.write(this, pretty ? ' ' : null); return writer.write(this, pretty ? ' ' : null);