save

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashTerrainID

func HashTerrainID(s string) uint32

Types

type City

type City struct {
	Name string `json:"name"`
	X    int    `json:"x"`
	Y    int    `json:"y"`
	Size int    `json:"size"`
}

type Overmap

type Overmap struct {
	Chunks []OvermapChunk
}

type OvermapChunk

type OvermapChunk struct {
	X      int
	Y      int
	Layers [][]TerrainGroup `json:"layers"`
	//RegionID string           `json:"region_id"`
	//MonsterGroups   string `json:"monster_groups"`
	Cities []City `json:"cities"`
}

type Save

type Save struct {
	Name    string
	Mods    []string
	Overmap Overmap
	Seen    map[string]Seen
}

func Build

func Build(save, filter string) (Save, error)

type Seen

type Seen struct {
	Character string
	Chunks    []SeenChunk
}

type SeenChunk

type SeenChunk struct {
	X        int
	Y        int
	Visible  [][]SeenGroup `json:"visible"`
	Explored [][]SeenGroup `json:"explored"`
}

type SeenGroup

type SeenGroup struct {
	Seen  bool
	Count float64
}

func (*SeenGroup) UnmarshalJSON

func (sg *SeenGroup) UnmarshalJSON(bs []byte) error

type TerrainGroup

type TerrainGroup struct {
	OvermapTerrainID string
	Count            float64
}

func (*TerrainGroup) UnmarshalJSON

func (tg *TerrainGroup) UnmarshalJSON(bs []byte) error

Jump to

Keyboard shortcuts

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