dfhack

package
v0.0.0-...-87ea9e4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2015 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidHandshake = errors.New("dfhack: invalid handshake")
	ErrMessageTooLarge  = errors.New("dfhack: message too large")
	ErrInvalidError     = errors.New("dfhack: error code unknown")

	ErrLinkFailure    = errors.New("dfhack: CR_LINK_FAILURE: RPC call failed due to I/O or protocol error")
	ErrNeedsConsole   = errors.New("dfhack: CR_NEEDS_CONSOLE: attempt to call interactive command without console")
	ErrNotImplemented = errors.New("dfhack: CR_NOT_IMPLEMENTED: command not implemented, or plugin not loaded")
	ErrFailure        = errors.New("dfhack: CR_FAILURE: failure")
	ErrWrongUsage     = errors.New("dfhack: CR_WRONG_USAGE: wrong arguments or ui state")
	ErrNotFound       = errors.New("dfhack: CR_NOT_FOUND: target object not found (for RPC mainly)")
)

Functions

This section is empty.

Types

type Conn

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

func Connect

func Connect() (*Conn, error)

func Dial

func Dial(addr string) (*Conn, error)

func (*Conn) BindMethod

func (c *Conn) BindMethod(req *dfproto.CoreBindRequest) (int32, []*dfproto.CoreTextNotification, error)

RPC BindMethod : CoreBindRequest -> CoreBindReply

func (*Conn) CheckHashes

func (c *Conn) CheckHashes() ([]*dfproto.CoreTextNotification, error)

RPC CheckHashes : EmptyMessage -> EmptyMessage

func (*Conn) Close

func (c *Conn) Close() error

3. Disconnect

The client terminates the connection by sending an
RPC_REQUEST_QUIT header with zero size and immediately
closing the socket.

func (*Conn) CoreResume

func (c *Conn) CoreResume() (int32, []*dfproto.CoreTextNotification, error)

RPC CoreResume : EmptyMessage -> IntMessage

func (*Conn) CoreSuspend

func (c *Conn) CoreSuspend() (int32, []*dfproto.CoreTextNotification, error)

RPC CoreSuspend : EmptyMessage -> IntMessage

func (*Conn) GetBlockList

RPC GetBlockList : BlockRequest -> BlockList

func (*Conn) GetDFVersion

func (c *Conn) GetDFVersion() (string, []*dfproto.CoreTextNotification, error)

RPC GetDFVersion : EmptyMessage -> StringMessage

func (*Conn) GetGrowthList

RPC GetGrowthList : EmptyMessage -> MaterialList

func (*Conn) GetMapInfo

RPC GetMapInfo : EmptyMessage -> MapInfo

func (*Conn) GetMaterialList

RPC GetMaterialList : EmptyMessage -> MaterialList

func (*Conn) GetPlantList

RPC GetPlantList : BlockRequest -> PlantList

func (*Conn) GetTiletypeList

RPC GetTiletypeList : EmptyMessage -> TiletypeList

func (*Conn) GetUnitList

RPC GetUnitList : EmptyMessage -> UnitList

func (*Conn) GetVersion

func (c *Conn) GetVersion() (string, []*dfproto.CoreTextNotification, error)

RPC GetVersion : EmptyMessage -> StringMessage

func (*Conn) GetViewInfo

RPC GetViewInfo : EmptyMessage -> ViewInfo

func (*Conn) GetWorldInfo

func (c *Conn) GetWorldInfo() (*dfproto.GetWorldInfoOut, []*dfproto.CoreTextNotification, error)

RPC GetWorldInfo : EmptyMessage -> GetWorldInfoOut

func (*Conn) ListEnums

func (c *Conn) ListEnums() (*dfproto.ListEnumsOut, []*dfproto.CoreTextNotification, error)

RPC ListEnums : EmptyMessage -> ListEnumsOut

func (*Conn) ListJobSkills

func (c *Conn) ListJobSkills() (*dfproto.ListJobSkillsOut, []*dfproto.CoreTextNotification, error)

RPC ListJobSkills : EmptyMessage -> ListJobSkillsOut

func (*Conn) ListMaterials

RPC ListMaterials : ListMaterialsIn -> ListMaterialsOut

func (*Conn) ListSquads

RPC ListSquads : ListSquadsIn -> ListSquadsOut

func (*Conn) ListUnits

RPC ListUnits : ListUnitsIn -> ListUnitsOut

func (*Conn) ResetMapHashes

func (c *Conn) ResetMapHashes() ([]*dfproto.CoreTextNotification, error)

RPC ResetMapHashes : EmptyMessage -> EmptyMessage

func (*Conn) RoundTripBind

func (c *Conn) RoundTripBind(command string, plugin *string, in, out string, req, resp proto.Message) ([]*dfproto.CoreTextNotification, error)

func (*Conn) RunCommand

RPC RunCommand : CoreRunCommandRequest -> EmptyMessage

func (*Conn) RunLua

RPC RunLua : CoreRunLuaRequest -> StringListMessage

func (*Conn) SetUnitLabors

func (c *Conn) SetUnitLabors(req *dfproto.SetUnitLaborsIn) ([]*dfproto.CoreTextNotification, error)

RPC SetUnitLabors : SetUnitLaborsIn -> EmptyMessage

Directories

Path Synopsis
Package RemoteFortressReader is a generated protocol buffer package.
Package RemoteFortressReader is a generated protocol buffer package.
Package dfproto is a generated protocol buffer package.
Package dfproto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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