Skip to content

Commit

Permalink
simple export
Browse files Browse the repository at this point in the history
  • Loading branch information
lemz1 committed Nov 10, 2024
1 parent 6123419 commit 60c809e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 6 additions & 0 deletions source/funkin/data/freeplay/player/PlayerData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ class PlayerCharSelectData
*/
@:optional
public var gf:PlayerCharSelectGFData;

public function new(?position:Int, ?gf:PlayerCharSelectGFData)
{
this.position = position;
this.gf = gf;
}
}

typedef PlayerCharSelectGFData =
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/ui/debug/char/CharCreatorCharacter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class CharCreatorCharacter extends Bopper
public function toJSON():String
{
var writer = new json2object.JsonWriter<CharacterData>(true);
return writer.write(toCharacterData(), ' ');
return writer.write(toCharacterData(), " ");
}

/**
Expand Down
13 changes: 11 additions & 2 deletions source/funkin/ui/debug/char/pages/CharCreatorSelectPage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,17 @@ class CharCreatorSelectPage extends CharCreatorDefaultPage

public function toJSON():String
{
var writer = new json2object.JsonWriter<{id:String}>(true);
return writer.write({id: 'lol'}, ' ');
var playerData:PlayerData = new PlayerData();
playerData.name = "Unknown";
playerData.ownedChars = [];
playerData.showUnownedChars = false;
playerData.freeplayStyle = "bf";
playerData.freeplayDJ = null;
playerData.charSelect = new PlayerCharSelectData(selectedIndexData);
playerData.results = null;
playerData.unlocked = true;

return playerData.serialize();
}
}

Expand Down

0 comments on commit 60c809e

Please sign in to comment.