data

package
v0.0.0-...-47a16e8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppearanceKey

type AppearanceKey struct {
	Sex        game.CharacterSex
	Profession string
	Hair       string
	Skin       string
}

AppearanceKey uniquely identifies a Profession and Sex.

type Archive

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

Archive is a store of game data.

func NewArchive

func NewArchive() (*Archive, error)

NewArchive constructs a new Archive.

func (*Archive) Appearance

func (a *Archive) Appearance(profession string, sex game.CharacterSex, hair string, skin string) *game.Appearance

Appearance retrieves an appropriate Appearance object to use for a character in combat.

func (*Archive) GetAnimation

func (a *Archive) GetAnimation(name string) game.FrameAnimation

func (*Archive) GetCombatMap

func (a *Archive) GetCombatMap() *game.CombatMapRecipe

GetCombatMap for use in a combat.

func (*Archive) GetImage

func (a *Archive) GetImage(name string) (val image.Image, ok bool)

GetImage returns an image that has been loaded dynamically into the archive.

func (*Archive) GetOverworldBaseTiles

func (a *Archive) GetOverworldBaseTiles() map[procedural.Code]hbg.BaseTile

func (*Archive) GetOverworldEncroachments

func (a *Archive) GetOverworldEncroachments() hbg.EncroachmentsCollection

func (*Archive) GetPedestal

func (a *Archive) GetPedestal(pedestalAppearance int) *game.Sprite

func (*Archive) GetRecipes

func (a *Archive) GetRecipes() []*overworld.Recipe

GetRecipes returns overworld recipes.

func (*Archive) HairVariations

func (a *Archive) HairVariations() []string

HairVariations returns the list of available hair colors.

func (*Archive) Load

func (a *Archive) Load(r io.Reader) error

Load data into the Archive from a tar.gz archive, replacing data already in the Archive if the provided files share the same filenames.

func (*Archive) Names

func (a *Archive) Names() map[string][]string

Names returns ...

func (*Archive) PedestalAppearances

func (a *Archive) PedestalAppearances(sinister bool) []int

func (*Archive) Profession

func (a *Archive) Profession(profession string) *game.ProfessionDetails

Profession returns the details of a profession.

func (*Archive) Skill

func (a *Archive) Skill(id skill.ID) *skill.Description

Skill retrieves a skill by its ID.

func (*Archive) SkillsByProfession

func (a *Archive) SkillsByProfession(prof string) []*skill.Description

SkillsByProfession gets the skills for a profession.

func (*Archive) SkillsByWeaponClass

func (a *Archive) SkillsByWeaponClass(weap item.Class) []*skill.Description

SkillsByWeaponClass provides the skills of a weapon class. FIXME: the skills should be provided by the instance of a class instead, so that a rapier can have different skills to a broadsword and to a scimitar.

func (*Archive) SkinVariations

func (a *Archive) SkinVariations() []string

SkinVariations returns the list of available skin colors.

Jump to

Keyboard shortcuts

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