component

package
v0.0.0-...-d1c6960 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: GPL-2.0 Imports: 2 Imported by: 0

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"`
}

func (Action) Name

func (Action) Name() string

type ActionOutput

type ActionOutput struct {
	PlayerID uint32   `json:"player_id"`
	TxtIDs   []string `json:"txt_ids"`
}

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.
}

func (DirObject) Name

func (DirObject) Name() string

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"`
}

func (Object) Name

func (Object) Name() string

type Output

type Output struct {
	PlayerID uint32 `json:"player_id"`
	Text     string `json:"text"`
}

func (Output) Name

func (Output) Name() string

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.

}

func (Player) Name

func (Player) Name() string

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.
}

func (Room) Name

func (Room) Name() string

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"`
}

func (TxtDef) Name

func (TxtDef) Name() string

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

func (VerbData) Name

func (VerbData) Name() string

Name returns the name of the structure, used for identification

Jump to

Keyboard shortcuts

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