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

+34 -1
View File
@@ -10,7 +10,9 @@ import (
)
type profileResources struct {
Source struct {
PamSkins []uint32 `json:"pam_skins"`
CurrentPamSkin uint32 `json:"current_pam_skin"`
Source struct {
Revision string `json:"revision"`
} `json:"source"`
PersonalCards []uint32 `json:"personal_cards"`
@@ -44,6 +46,37 @@ func loadProfileResources() (*profileResources, error) {
profileError = fmt.Errorf("profile source, head frame or selected personal card is invalid")
return
}
if profileData.CurrentPamSkin == 0 || !containsU32(profileData.PamSkins, profileData.CurrentPamSkin) {
profileError = fmt.Errorf("selected Pam skin is missing or not owned")
return
}
pamRaw, err := common.ReadResourceFile("resources/PamSkinConfig.json")
if err != nil {
profileError = err
return
}
var pamTable struct {
Rows []struct {
ID uint32 `json:"SkinID"`
Path string `json:"ConfigEntityPath"`
} `json:"pam_skin_config"`
}
if err := json.Unmarshal(pamRaw, &pamTable); err != nil {
profileError = err
return
}
validSkins := map[uint32]bool{}
for _, row := range pamTable.Rows {
if row.ID != 0 && row.Path != "" {
validSkins[row.ID] = true
}
}
for _, id := range profileData.PamSkins {
if !validSkins[id] {
profileError = fmt.Errorf("Pam skin %d has no Client entity config", id)
return
}
}
if !containsU32(profileData.PhoneCases, profileData.CurrentPhoneCase) {
profileError = fmt.Errorf("selected phone case is not owned")
return