Update json2object to respect @:order when exporting + skip default values
* @:order is only for Maps, not Arrays (IDK how this compiled before lol?) * Don't use @:default on version number. * Don't use @:default for ChartManifestData * Don't use @:default for generatedBy
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
"name": "json2object",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "a7e4cef3d444bea8d8244d6e59ab82f5a593f597",
|
||||
"ref": "59e0467c953d1f26e3cbf2a070f140e2d2e8457d",
|
||||
"url": "https://github.com/FunkinCrew/json2object"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ class SongMetadata implements ICloneable<SongMetadata>
|
||||
* A semantic versioning string for the song data format.
|
||||
*
|
||||
*/
|
||||
// @:default(funkin.data.song.SongRegistry.SONG_METADATA_VERSION)
|
||||
@:jcustomparse(funkin.data.DataParse.semverVersion)
|
||||
@:jcustomwrite(funkin.data.DataWrite.semverVersion)
|
||||
public var version:Version;
|
||||
@@ -53,7 +52,6 @@ class SongMetadata implements ICloneable<SongMetadata>
|
||||
*/
|
||||
public var playData:SongPlayData;
|
||||
|
||||
@:default(funkin.data.song.SongRegistry.DEFAULT_GENERATEDBY)
|
||||
public var generatedBy:String;
|
||||
|
||||
@:optional
|
||||
@@ -352,7 +350,6 @@ class SongMusicData implements ICloneable<SongMusicData>
|
||||
* A semantic versioning string for the song data format.
|
||||
*
|
||||
*/
|
||||
// @:default(funkin.data.song.SongRegistry.SONG_METADATA_VERSION)
|
||||
@:jcustomparse(funkin.data.DataParse.semverVersion)
|
||||
@:jcustomwrite(funkin.data.DataWrite.semverVersion)
|
||||
public var version:Version;
|
||||
@@ -463,6 +460,7 @@ class SongPlayData implements ICloneable<SongPlayData>
|
||||
*/
|
||||
@:optional
|
||||
@:default(['normal' => 0])
|
||||
@:order(funkin.util.Constants.DEFAULT_DIFFICULTY_LIST_FULL)
|
||||
public var ratings:Map<String, Int>;
|
||||
|
||||
/**
|
||||
@@ -595,16 +593,16 @@ class SongCharacterData implements ICloneable<SongCharacterData>
|
||||
|
||||
class SongChartData implements ICloneable<SongChartData>
|
||||
{
|
||||
@:default(funkin.data.song.SongRegistry.SONG_CHART_DATA_VERSION)
|
||||
@:jcustomparse(funkin.data.DataParse.semverVersion)
|
||||
@:jcustomwrite(funkin.data.DataWrite.semverVersion)
|
||||
public var version:Version;
|
||||
|
||||
@:order(funkin.util.Constants.DEFAULT_DIFFICULTY_LIST_FULL)
|
||||
public var scrollSpeed:Map<String, Float>;
|
||||
public var events:Array<SongEventData>;
|
||||
@:order(funkin.util.Constants.DEFAULT_DIFFICULTY_LIST_FULL)
|
||||
public var notes:Map<String, Array<SongNoteData>>;
|
||||
|
||||
@:default(funkin.data.song.SongRegistry.DEFAULT_GENERATEDBY)
|
||||
public var generatedBy:String;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,6 @@ class ChartManifestData
|
||||
|
||||
public static final invalidIdRegex:EReg = ~/[\/\\:*?"<>|]/g;
|
||||
|
||||
@:default(funkin.data.song.importer.ChartManifestData.CHART_MANIFEST_DATA_VERSION)
|
||||
@:jcustomparse(funkin.data.DataParse.semverVersion)
|
||||
@:jcustomwrite(funkin.data.DataWrite.semverVersion)
|
||||
public var version:thx.semver.Version;
|
||||
|
||||
Reference in New Issue
Block a user