Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
ActionID uint32 `json:"action_id"`
ActionType enums.ActionType `json:"action_type"`
DBitTxt string `json:"d_bit_txt"`
Enabled bool `json:"enabled"`
Revert bool `json:"revert"`
DBit bool `json:"d_bit"`
AffectsActionID uint32 `json:"affects_action_id"`
AffectedByActionID uint32 `json:"affected_by_action_id"`
}
type ActionOutput ¶
func (ActionOutput) Name ¶
func (ActionOutput) Name() string
type Description ¶
type Description struct {
TxtIDs []string `json:"txt_ids"`
}
func (Description) Name ¶
func (Description) Name() string
type DirObject ¶
type DirObject struct {
DirObjID uint32 `json:"dir_obj_id"` // Direction object ID.
ObjType enums.DirObjectType `json:"obj_type"` // The object type: door, window, etc. Use enums.DirObjectType
DirType enums.DirectionType `json:"dir_type"` // The direction it is located: North, South, Up, etc. Use enums.DirectionType
MatType enums.MaterialType `json:"mat_type"` // The material it is done with: iron, IKEA, etc. Use enums.MaterialType
DestID uint32 `json:"dest_id"` // The destination room ID.
TxtDefID string `json:"txt_def_id"`
ObjectActionIDs [32]uint32 `json:"object_action_ids"` // The actions to perform on the object: Open, Loct, Breal, etc.
}
type Object ¶
type Object struct {
ObjectID uint32 `json:"object_id"` // ID of the object.
ObjectType enums.ObjectType `json:"object_type"` // The type it is: Key, Knife, etc. Use enums.ObjectType.
MaterialType enums.MaterialType `json:"material_type"` // The material it is done with: Iron, IKEA, etc. Use enums.MaterialType.
TxtDefID string `json:"txt_def_id"`
ObjectActionIDs [32]uint32 `json:"object_action_ids"`
Description string `json:"description"`
}
type Player ¶
type Player struct {
PlayerEntityID types.EntityID // EntityID assigned to the player.
PlayerName string // Name of the player, can be the username.
PlayerID uint32 `json:"player_id"` // ID of the player.
RoomID uint32 `json:"room_id"` // ID of the room where the playre is.
ObjectIDs [32]uint32 `json:"object_ids"` // Map of all the objects tha the player has.
PlayerConnection bool // Bool to notify if the player is connected or not.
}
type Room ¶
type Room struct {
RoomEntityID types.EntityID // Entity ID for the room. This will allows access to it.
RoomID uint32 `json:"room_id"` // Room ID.
RoomType enums.RoomType `json:"room_type"` // Type of room.
Description string `json:"description"`
ObjectIDs [32]uint32 `json:"object_ids"` // Objects map that are on the room.
DirObjIDs [32]uint32 `json:"dir_obj_ids"` // Objects that allow to go into a direction. They are the "doors".
Players [32]uint32 `json:"players"` // Map of players that are on the room.
}
type TxtDef ¶
type TxtDef struct {
TxtDefID string `json:"txt_def_id"`
Owner uint32 `json:"owner"`
TxtDefType enums.TxtDefType `json:"txt_def_type"` // Use enums.TxtDefType
Value string `json:"value"`
}
type VerbData ¶
type VerbData struct {
Verb enums.ActionType // The action/verb from the command
DirectNoun enums.ObjectType // The direct object of the action
IndirectDirNoun enums.DirObjectType // The indirect directional object of the action
ErrCode uint8 // Error code for parsing the tokens
}
VerbData represents the data structure for verb-related information
Click to show internal directories.
Click to hide internal directories.