gamedata

package
v0.0.0-...-5ad4fe9 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 17 Imported by: 2

Documentation

Overview

Package gamedata provides Arknights gamedata lookup datastructures parsed from https://github.com/Kengxxiao/ArknightsGameData. The package will automatically query the ArknightsGameData github repository will update the local files if the files are different from the local files.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidRegion is returned if the specified region is invalid.
	ErrInvalidRegion = errors.New("Invalid region")
)
View Source
var ErrPathOutOfBounds = fmt.Errorf("Path specified breaks out of data directory")

ErrPathOutOfBounds is returned when the fileName specified breaks out the directory.

Functions

This section is empty.

Types

type GameData

type GameData struct {
	// contains filtered or unexported fields
}

GameData provides methods to get data structures that contain game related data.

func New

func New(region string, logger log.Logger) (*GameData, error)

New creates a new GameData struct, may return an error if an invalid region is provided. Refer to proxy.regionMap for valid region strings.

func (*GameData) GetItemInfo

func (d *GameData) GetItemInfo(region ...string) (*itemtable.ItemTable, error)

GetItemInfo provides a reference to the ItemTable struct which contains information about items. This call will block if the gamedata has not been loaded yet. Region is an optional argument, by default it will use the region associated with the GameData receiver.

func (*GameData) GetStageInfo

func (d *GameData) GetStageInfo(region ...string) (*stagetable.StageTable, error)

GetStageInfo provides a reference to the StageTable struct which contains information about game stages. This call will block if the gamedata has not been loaded yet. Region is an optional argument, by default it will use the region associated with the GameData receiver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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