Documentation
¶
Index ¶
Constants ¶
View Source
const ( RoomExitTypeNormal RoomExitType = "normal" RoomExitTypeDirection = "direction" RoomExitTypeTeleport = "teleport" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { Name string `bson:"name,omitempty" json:"name,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` Response string `bson:"response,omitempty" json:"response,omitempty"` Type RoomActionType `bson:"type,omitempty" json:"type,omitempty"` Params map[string]interface{} `bson:"params,omitempty" json:"params"` }
Action ... action that can be invoked by a player in thi room
type Exit ¶
type Exit struct { Name string `bson:"name,omitempty" json:"name,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` Type RoomExitType `bson:"type,omitempty" json:"type,omitempty"` Hidden bool `bson:"hidden,omitempty" json:"hidden,omitempty"` Target string `bson:"target,omitempty" json:"target,omitempty"` Params map[string]interface{} `bson:"params,omitempty" json:"params"` }
Exit ... action that can be invoked by a player in thi room
type Room ¶
type Room struct { *entities.Entity `bson:",inline"` traits.LookAt `bson:",inline"` // provides detail Name string `bson:"name,omitempty" json:"name"` Description string `bson:"description,omitempty" json:"description"` //Detail string `bson:"detail,omitempty" json:"detail"` RoomType string `bson:"roomType,omitempty" json:"roomType"` Area string `bson:"area,omitempty" json:"area"` AreaType string `bson:"areaType,omitempty" json:"areaType"` Tags []string `bson:"tags" json:"tags"` Actions Actions `bson:"actions" json:"actions"` Exits Exits `bson:"exits" json:"exits"` Characters Characters `bson:"characters" json:"characters"` Items Items `bson:"items" json:"items"` // can be optionally used for MUDs that want to be grid based or need stricter maps Coords *struct { X int32 `bson:"x" json:"x"` Y int32 `bson:"y" json:"y"` Z int32 `bson:"z" json:"z"` } `bson:"coords,omitempty" json:"coords,omitempty"` // additional non game critical meta information to enhance player experience on client Meta *struct { // supply a mood to the client (optional) Mood string `bson:"mood,omitempty" json:"mood,omitempty"` // supply a background image id to the client (optional) Background string `bson:"background,omitempty" json:"background,omitempty"` } `bson:"meta,omitempty" json:"meta,omitempty"` }
Room data
func RoomFromJSONString ¶
RoomFromJSONString ...
func (*Room) IsCharacterInRoom ¶
IsCharacterInRoom ,,,
func (*Room) RemoveCharacter ¶
RemoveCharacter ,,,
type RoomActionType ¶
type RoomActionType string
RoomActionType type
const ( RoomActionTypeResponse RoomActionType = "response" RoomActionTypeRoomResponse RoomActionType = "room_response" RoomActionTypeScript RoomActionType = "script" )
Click to show internal directories.
Click to hide internal directories.