end_of_eden/game/saved_state.go
2024-08-27 23:14:00 +02:00

30 lines
640 B
Go

package game
import (
"encoding/gob"
"math/rand/v2"
)
func init() {
gob.Register(SavedState{})
}
// SavedState represents a save file that don't contain any pointer so the lua
// runtime or other pointer.
type SavedState struct {
State GameState
Seed uint64
Rand *rand.PCG
Actors map[string]Actor
Instances map[string]any
StagesCleared int
CurrentEvent string
CurrentFight FightState
PointsPerRound int
Merchant MerchantState
EventHistory []string
StateCheckpoints []StateCheckpoint
CtxData map[string]any
LoadedMods []string
}