Consolodated config, added portals, etc.

This commit is contained in:
2025-11-24 15:03:56 -07:00
parent f39684873b
commit 57d08f2f04
15 changed files with 895 additions and 212 deletions

View File

@@ -21,8 +21,9 @@ type Data struct {
}
type Settings struct {
FPSMonitor bool `toml:"fps_monitor"`
FPSCap string `toml:"fps_cap"`
FPSMonitor bool `toml:"fps_monitor"`
FPSCap string `toml:"fps_cap"`
PortalVisibility bool `toml:"portal_visibility"`
}
type GameState struct {
@@ -59,8 +60,9 @@ func (m *Manager) LoadData() (*Data, error) {
if _, err := os.Stat(m.dataPath); os.IsNotExist(err) {
return &Data{
Settings: Settings{
FPSMonitor: false,
FPSCap: "60",
FPSMonitor: false,
FPSCap: "60",
PortalVisibility: false,
},
GameState: GameState{
HasSave: false,
@@ -137,8 +139,9 @@ func (m *Manager) SaveGameState(state *GameState) error {
if err != nil {
data = &Data{
Settings: Settings{
FPSMonitor: false,
FPSCap: "60",
FPSMonitor: false,
FPSCap: "60",
PortalVisibility: false,
},
GameState: *state,
}