Consolodated config, added portals, etc.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user