commands

package
v0.0.0-...-8d7dea8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorNoSuchExit      = "No exit in that direction!"
	ErrorMigrationFailed = "Weird, that didn't seem to work..."
)

Variables

This section is empty.

Functions

func IsFatalError

func IsFatalError(err error) bool

func MoveActor

func MoveActor(actor *core.Actor, direction string, observer core.Observer) (*core.Actor, error)

Types

type ActorVisibleAttributes

type ActorVisibleAttributes struct {
	Strength, Physical               int
	Fitness, Stamina                 int
	Will, Focus                      int
	Faith, Zeal                      int
	NaturalBiteMin, NaturalBiteMax   float64
	NaturalSlashMin, NaturalSlashMax float64
}

type ActorVisibleInfo

type ActorVisibleInfo struct {
	ID                uuid.UUID
	Name              string
	VisibleInventory  map[string][]uuid.UUID
	VisibleAttributes ActorVisibleAttributes
}

func LookAtActor

func LookAtActor(actor *core.Actor) ActorVisibleInfo

type LocationInfo

type LocationInfo struct {
	ID               uuid.UUID
	ZoneID           uuid.UUID
	ShortDescription string
	Description      string
	Actors           []uuid.UUID
	Objects          []uuid.UUID
	Exits            map[string][2]uuid.UUID // direction->ZoneID/LocationID
}

func LookAtLocation

func LookAtLocation(loc *core.Location) LocationInfo

func LookAtLocationByID

func LookAtLocationByID(locID, zoneID uuid.UUID, world *core.World) (LocationInfo, error)

type ObjectVisibleInfo

type ObjectVisibleInfo struct {
	ID               uuid.UUID
	Name             string
	Description      string
	Capacity         int
	ContainedObjects []uuid.UUID
	Attributes       core.ObjectAttributes
}

func LookAtObject

func LookAtObject(obj *core.Object) ObjectVisibleInfo

Jump to

Keyboard shortcuts

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