save

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGame

func DeleteGame(folder, name string) error

func IsValidName

func IsValidName(name string) bool

func LoadAchievements added in v0.2.0

func LoadAchievements(file string, completed *[]string) error

func LoadMap added in v0.2.0

func LoadMap(f fs.FS, folder string, mapLoc MapLocation) (maps.Map, error)

func LoadWorld

func LoadWorld(world *ecs.World, folder, name string) error

func ParseMap added in v0.2.0

func ParseMap(mapStr string) (maps.Map, error)

func SaveAchievements added in v0.2.0

func SaveAchievements(file string, completed []string) error

func SaveMap added in v0.2.0

func SaveMap(folder, name string, world *ecs.World) error

func SaveWorld

func SaveWorld(folder, name string, world *ecs.World, skip []generic.Comp) error

Types

type LoadType added in v0.2.0

type LoadType uint8
const (
	LoadTypeNone LoadType = iota
	LoadTypeGame
	LoadTypeMap
)

type MapInfo added in v0.2.0

type MapInfo struct {
	Achievements []string
	Description  string
}

func LoadMapData added in v0.2.0

func LoadMapData(f fs.FS, folder string, mapLoc MapLocation) (MapInfo, error)

type MapLocation added in v0.2.0

type MapLocation struct {
	Name       string
	IsEmbedded bool
}

func ListMaps added in v0.2.0

func ListMaps(f fs.FS, folder string) ([]MapLocation, error)

type SaveGame added in v0.2.0

type SaveGame struct {
	Name string
	Time time.Time
}

func ListSaveGames

func ListSaveGames(folder string) ([]SaveGame, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL