Help us shape the future of Go! Take the 2026 Go Developer Survey

gameconfig

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0, BSD-3-Clause, ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterDefaults

type CharacterDefaults struct {
	CharacterID        uint8      `json:"CharacterID"`
	DefaultPartTypeIDs [24]uint32 `json:"DefaultPartTypeIDs"`
}

type CourseBonusRate

type CourseBonusRate struct {
	CourseID   uint8
	CourseName string
	BonusRate  int
}

type ItemProbability

type ItemProbability struct {
	TypeID uint32
	Weight int64
	Rarity uint32
}

type Manifest

type Manifest struct {
	CharacterDefaults    []CharacterDefaults `json:"CharacterDefaults"`
	DefaultClubSetTypeID uint32              `json:"DefaultClubSetTypeID"`
	DefaultPang          uint64              `json:"DefaultPang"`
	CourseBonusRate      []CourseBonusRate   `json:"CourseBonusRate"`
	PapelShopOdds        []ItemProbability   `json:"PapelShopOdds"`
}

type Provider

type Provider interface {
	GetCharacterDefaults(id uint8) CharacterDefaults
	GetDefaultClubSetTypeID() uint32
	GetDefaultPang() uint64
	GetCourseBonus(course uint8, numPlayers, numHoles int) uint64
	GetPapelShopOdds() []ItemProbability
}

func Default

func Default() Provider

func FromJSONFile

func FromJSONFile(filename string) (Provider, error)

func FromJSONStream

func FromJSONStream(r io.Reader) (Provider, error)

func FromManifest

func FromManifest(manifest Manifest) Provider

Jump to

Keyboard shortcuts

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