Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusDisconnected = "disconnected" StatusConnecting = "connecting" StatusConnected = "connected" StatusError = "error" ActionChat = "chat" ActionSpawn = "spawn" ActionKeys = "keys" ActionAFK = "afk" ActionTeleport = "teleport" ActionEnterVehicle = "enterVehicle" ActionExitVehicle = "exitVehicle" ActionDialog = "dialog" ActionTextDraw = "textDraw" ActionClickPlayer = "clickPlayer" ActionDeferDialog = "deferDialog" ActionShowDialog = "showDialog" ActionDismissDialog = "dismissDialog" EventInstanceCreated = "instance.created" EventInstanceUpdated = "instance.updated" EventInstanceDeleted = "instance.deleted" EventChatMessage = "chat.message" EventChatReset = "chat.reset" MaxChatMessages = 64 MaxInstances = 64 MaxCommandsPerInstance = 128 MaxPlayers = 1004 MaxVehicles = 2000 MaxObjects = 1000 MaxTextDraws = 2048 MaxDeferredDialogs = 64 InvalidPlayerID = -1 InvalidVehicleID = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
type ChatPage ¶ added in v0.1.1
type ChatPage struct {
Items []ChatMessage `json:"items"`
NextBefore int64 `json:"nextBefore,omitempty"`
}
type Connection ¶
type InstancePatch ¶ added in v0.1.2
type InstancePatch struct {
Revision uint64 `json:"revision"`
SyncEpoch string `json:"syncEpoch"`
Operations []PatchOperation `json:"operations"`
}
InstancePatch is the incremental form of an instance update. Each operation replaces one top-level Snapshot field, allowing the model to grow without changing the event envelope.
type PatchOperation ¶ added in v0.1.2
type Player ¶
type Player struct {
ID int `json:"id"`
Name string `json:"name"`
Score int `json:"score"`
Ping int `json:"ping"`
Distance float32 `json:"distance"`
Health float32 `json:"health"`
Armour float32 `json:"armour"`
Skin int `json:"skin"`
Team int `json:"team"`
Rotation float32 `json:"rotation"`
Color string `json:"color"`
X float32 `json:"x"`
Y float32 `json:"y"`
Z float32 `json:"z"`
}
type QuickCommand ¶
type Snapshot ¶
type Snapshot struct {
// Revision is incremented for every state update. Clients use it to detect
// dropped incremental events and re-fetch a complete snapshot when needed.
Revision uint64 `json:"revision"`
// SyncEpoch identifies the manager process that produced the snapshot. A
// revision is only meaningful within one epoch because revisions restart
// when the process is restarted.
SyncEpoch string `json:"syncEpoch"`
Server Server `json:"server"`
Connection Connection `json:"connection"`
Chat []ChatMessage `json:"-"`
Players []Player `json:"players"`
NearbyPlayers []Player `json:"nearbyPlayers"`
Vehicles []Vehicle `json:"vehicles"`
Objects []Object `json:"objects"`
TextDraws []TextDraw `json:"textDraws"`
Dialogs []Dialog `json:"dialogs"`
Commands []QuickCommand `json:"commands"`
ActiveDialog *Dialog `json:"activeDialog"`
VehicleState VehicleState `json:"vehicleState"`
KeyMask int `json:"keyMask"`
AFK bool `json:"afk"`
Spawned bool `json:"spawned"`
SpawnReady bool `json:"spawnReady"`
}
type TextDraw ¶
type TextDraw struct {
ID int `json:"id"`
Style int `json:"style"`
Text string `json:"text"`
LetterColor string `json:"letterColor"`
BoxColor string `json:"boxColor"`
BackgroundColor string `json:"backgroundColor"`
Selectable bool `json:"selectable"`
X float32 `json:"x"`
Y float32 `json:"y"`
LetterWidth float32 `json:"letterWidth"`
LetterHeight float32 `json:"letterHeight"`
}
type VehicleState ¶
Click to show internal directories.
Click to hide internal directories.