Save endgame progress, team presets, technique support and camera controls

This commit is contained in:
CAtlas0784 committed 2026-10-17 23:44:36 +07:00
1 parent a681affdb3
commit 639cef7d19
52 files changed
+11940 -766

No files matched your search

+44 -10
View File
@@ -331,17 +331,41 @@ func DefaultScene() Scene {
return Scene{PlaneID: 20411, FloorID: 20411001, EntryID: 2041101}
}
// Tierce teams and best measured node results survive leaving a scene/login.
type TierceNodeProgress struct {
Score uint32 `json:"score"`
Won bool `json:"won"`
Result []byte `json:"result,omitempty"`
}
type TierceProgress struct {
Teams [][]uint32 `json:"teams"`
Buffs []uint32 `json:"buffs"`
Nodes map[uint32]TierceNodeProgress `json:"nodes"`
}
type TeamPreset struct {
Name string `json:"name"`
Avatars map[uint32]uint32 `json:"avatars"`
LeaderSlot uint32 `json:"leader_slot"`
Favourite bool `json:"favourite"`
}
type Persistent struct {
Lineups map[uint32]uint32 `json:"lineups"`
Position Position `json:"position"`
Scene Scene `json:"scene"`
MainCharacter MultiPathAvatar `json:"main_character"`
MarchType MultiPathAvatar `json:"march_type"`
EnableSWGlobal *bool `json:"enable_sw_global"`
EnableCastoriceGlobal *bool `json:"enable_castorice_global"`
EnableAhaGlobal *bool `json:"enable_aha_global"`
DressedSkins map[uint32]uint32 `json:"dressed_skins"`
ExRanksUnlocked map[uint32]bool `json:"ex_ranks_unlocked"`
TeamPresets map[uint32]*TeamPreset `json:"team_presets"`
ActiveTeamPreset uint32 `json:"active_team_preset"`
TierceProgress map[uint32]*TierceProgress `json:"tierce_progress"`
TechniqueFoodStock map[uint32]uint32 `json:"technique_food_stock"`
AutoTechniqueFood *bool `json:"auto_technique_food"`
Lineups map[uint32]uint32 `json:"lineups"`
Position Position `json:"position"`
Scene Scene `json:"scene"`
MainCharacter MultiPathAvatar `json:"main_character"`
MarchType MultiPathAvatar `json:"march_type"`
EnableSWGlobal *bool `json:"enable_sw_global"`
EnableCastoriceGlobal *bool `json:"enable_castorice_global"`
EnableAhaGlobal *bool `json:"enable_aha_global"`
DressedSkins map[uint32]uint32 `json:"dressed_skins"`
ExRanksUnlocked map[uint32]bool `json:"ex_ranks_unlocked"`
}
// DefaultPersistent mirrors the Rust Default impl.
@@ -368,6 +392,11 @@ func DefaultPersistent() Persistent {
// ---------------------------------------------------------------------------
type FreesrData struct {
TeamPresets map[uint32]*TeamPreset `json:"-"`
ActiveTeamPreset uint32 `json:"-"`
TierceProgress map[uint32]*TierceProgress `json:"-"`
TechniqueFoodStock map[uint32]uint32 `json:"-"`
AutoTechniqueFood *bool `json:"-"`
persistentBaseline map[string]any
Lightcones []Lightcone `json:"lightcones"`
@@ -413,6 +442,11 @@ func LoadFreesrData() (*FreesrData, error) {
var p Persistent
if err := json.Unmarshal(pers, &p); err == nil {
data.Lineups = p.Lineups
data.TeamPresets = p.TeamPresets
data.ActiveTeamPreset = p.ActiveTeamPreset
data.TierceProgress = p.TierceProgress
data.TechniqueFoodStock = p.TechniqueFoodStock
data.AutoTechniqueFood = p.AutoTechniqueFood
data.Position = p.Position
data.Scene = p.Scene
data.MainCharacter = p.MainCharacter