cmd

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2018 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(t has.Thing, input string) string

Parse initiates processing of the input string for the specified Thing. The input string is expected to be input from a player. The actual command processed will be returned. For example GET or DROP.

Parse runs with state.scripting set to false, disallowing scripting specific commands from being executed by players directly.

When sync handles a command the command may determine it needs to hold additional locks. In this case sync will return false and should be called again. This repeats until the list of locks is complete, the command processed and sync returns true.

func Script added in v0.0.4

func Script(t has.Thing, input string) string

Script processes the input string the same as Parse. However Script runs with the state.scripting flag set to true, permitting scripting specific commands to be executed.

Types

This section is empty.

Notes

Bugs

  • Terminal with is hardcoded to be 80 characters wide

  • If you examine another player you can see their inventory items. For now we just skip the inventory listing if we are examining a player.

  • If a container is not collectable then it and its content will not be saved - even if it contains collectable items.

  • We don't treat observer differently to observers - should we?

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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