Documentation
¶
Index ¶
- Constants
- func AbsDiff(a uint, b uint) uint
- func FlickClient(client *types.Datum, flick sprite.Flick)
- func GetDir(from, to types.Value) common.Direction
- func GetStepTo(ref, target types.Value, min int) types.Value
- func InvokeVerb(client types.Value, verb string)
- func ManhattanDistance(a, b types.Value) uint
- func MaxUint(a uint, b uint) uint
- func NewClientData(_ *types.Datum, _ *ClientData, _ ...types.Value)
- func PullClientRequests(client *types.Datum) (textDisplay []string, sounds []sprite.Sound, flicks []sprite.Flick)
- func StepTo(usr *types.Datum, ref, target types.Value, min int) bool
- func UpdateWalk(src types.Value)
- func WalkTo(ref, target types.Value, min, lag int)
- func XY(atom types.Value) (uint, uint)
- func XYZ(atom types.Value) (uint, uint, uint)
- type ClientData
- func (d *ClientData) GetEye(src *types.Datum) types.Value
- func (d *ClientData) GetMob(src *types.Datum) types.Value
- func (d *ClientData) GetVirtualEye(src *types.Datum) types.Value
- func (d *ClientData) ListVerbs(src *types.Datum) (verbs []string, available map[*types.Datum][]string)
- func (d *ClientData) OperatorWrite(src *types.Datum, usr *types.Datum, output types.Value) types.Value
- func (d *ClientData) ProcDel(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ProcEast(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ProcMove(src *types.Datum, usr *types.Datum, loc types.Value, dir types.Value) types.Value
- func (d *ClientData) ProcNew(src *types.Datum, _ *types.Datum, usr types.Value) types.Value
- func (d *ClientData) ProcNorth(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ProcSouth(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ProcStat(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ProcWest(src *types.Datum, usr *types.Datum) types.Value
- func (d *ClientData) ResolveVerb(src *types.Datum, verbName string, args []string)
- func (d *ClientData) SetEye(src *types.Datum, eye types.Value)
- func (d *ClientData) SetMob(src *types.Datum, mob types.Value)
- type World
- func (w *World) CreateNewPlayer(key string) *types.Datum
- func (w *World) FindAll(predicate func(*types.Datum) bool) []types.Value
- func (w *World) FindAllType(tp types.TypePath) []types.Value
- func (w *World) FindOne(predicate func(*types.Datum) bool) types.Value
- func (w *World) FindOneType(tp types.TypePath) types.Value
- func (w *World) Flick(icon *icon.Icon, iconState string, target types.Value)
- func (w *World) Icon(name string) *icon.Icon
- func (w *World) ListVerbsOnAtom(client types.Value, atom *types.Datum) (verbs []string)
- func (w *World) LocateXYZ(x, y, z uint) types.Value
- func (w World) MaxXYZ() (uint, uint, uint)
- func (w *World) PlayerExists(client types.Value) bool
- func (w *World) Realm() *types.Realm
- func (w *World) RemovePlayer(client *types.Datum)
- func (w *World) RenderClientView(client types.Value) (center types.Value, viewAtoms []types.Value, stat sprite.StatDisplay, ...)
- func (w *World) ServerAPI() websession.WorldAPI
- func (w *World) SetMaxXYZ(x, y, z uint)
- func (w *World) UpdateDefaultViewDistance()
- func (w *World) View(distance uint, centerD *types.Datum, mode atoms.ViewMode) []types.Value
- func (w *World) View1(center *types.Datum, mode atoms.ViewMode) []types.Value
- func (w *World) ViewX(distance uint, center *types.Datum, perspective *types.Datum, ...) []types.Value
- func (w *World) ViewXLocations(distance uint, center *types.Datum, perspective *types.Datum) []types.Value
Constants ¶
View Source
const SpriteSize = 32
Variables ¶
This section is empty.
Functions ¶
func InvokeVerb ¶
func ManhattanDistance ¶
func NewClientData ¶
func NewClientData(_ *types.Datum, _ *ClientData, _ ...types.Value)
func PullClientRequests ¶
Types ¶
type ClientData ¶
type ClientData struct { VarKey string VarView int VarStatobj *types.Ref // contains filtered or unexported fields }
func ClientDataChunk ¶
func ClientDataChunk(v types.Value) (*types.Datum, *ClientData)
func (*ClientData) GetVirtualEye ¶
func (d *ClientData) GetVirtualEye(src *types.Datum) types.Value
func (*ClientData) OperatorWrite ¶
func (*ClientData) ResolveVerb ¶
func (d *ClientData) ResolveVerb(src *types.Datum, verbName string, args []string)
type World ¶
type World struct { Name string Mob types.TypePath ViewDist uint MaxX, MaxY, MaxZ uint // contains filtered or unexported fields }
func (*World) ListVerbsOnAtom ¶
func (*World) RemovePlayer ¶
func (*World) RenderClientView ¶
func (*World) ServerAPI ¶
func (w *World) ServerAPI() websession.WorldAPI
func (*World) UpdateDefaultViewDistance ¶
func (w *World) UpdateDefaultViewDistance()
Click to show internal directories.
Click to hide internal directories.