Documentation ¶
Index ¶
- Constants
- type ActorAddToZoneEventBody
- type ActorAdminRelocateEventBody
- type ActorDeathEventBody
- type ActorMigrateInEventBody
- type ActorMigrateOutEventBody
- type ActorMoveEventBody
- type ActorRemoveFromZoneEventBody
- type ActorSpeakEventBody
- type AuthService
- type CombatDodgeEventBody
- type CombatMeleeDamageEventBody
- type CommandAttachActor
- type CommandLookAtObject
- type CommandLookAtOtherActor
- type CommandMeleeCombat
- type CommandMoveActor
- type CommandMoveObject
- type CompleteAttachActor
- type CompleteListActors
- type CurrentLocationInfo
- type Event
- type Message
- type ObjectAddToZoneEventBody
- type ObjectAdminRelocateEventBody
- type ObjectMoveEventBody
- type ObjectMoveSubcontainerEventBody
- type ObjectRemoveFromZoneEventBody
- type Server
Constants ¶
View Source
const ( EventTypeActorMove = "actor-move" EventTypeActorAdminRelocate = "actor-admin-relocate" EventTypeActorAddToZone = "actor-add-to-zone" EventTypeActorRemoveFromZone = "actor-remove-from-zone" EventTypeActorDeath = "actor-death" EventTypeActorMigrateIn = "actor-migrate-in" EventTypeActorMigrateOut = "actor-migrate-out" EventTypeActorSpeak = "actor-speak" //EventTypeLocationAddToZone //EventTypeLocationRemoveFromZone //EventTypeLocationUpdate //EventTypeExitAddToZone //EventTypeExitUpdate //EventTypeExitRemoveFromZone EventTypeObjectAddToZone = "object-add-to-zone" EventTypeObjectRemoveFromZone = "object-remove-from-zone" EventTypeObjectMove = "object-move" EventTypeObjectMoveSubcontainer = "object-move-subcontainers" EventTypeObjectAdminRelocate = "object-admin-relocate" //EventTypeObjectMigrateIn //EventTypeObjectMigrateOut //EventTypeZoneSetDefaultLocation EventTypeCombatMeleeDamage = "combat-melee-damage" EventTypeCombatDodge = "combat-dodge" )
View Source
const ( MessageTypeProcessingError = "processing-error" MessageTypeListActorsCommand = "list-actors" MessageTypeListActorsComplete = "actors-list" MessageTypeAttachActorCommand = "attach-actor" MessageTypeAttachActorComplete = "actor-attached" MessageTypeMoveActorCommand = "move-actor" MessageTypeMoveActorComplete = "move-actor-complete" MessageTypeLookAtOtherActorCommand = "look-at-other-actor" MessageTypeLookAtOtherActorComplete = "look-at-other-actor-complete" MessageTypeLookAtObjectCommand = "look-at-object" MessageTypeLookAtObjectComplete = "look-at-object-complete" MessageTypeMeleeCombatCommand = "combat-melee" MessageTypeMeleeCombatComplete = "combat-melee-complete" MessageTypeMoveObjectCommand = "move-object" MessageTypeMoveObjectComplete = "move-object-complete" MessageTypeMoveObjectSubcontainer = "move-object-subcontainer" MessageTypeEvent = "event" MessageTypeGetCurrentLocationInfoCommand = "get-current-location-info" MessageTypeCurrentLocationInfoComplete = "current-location-info" )
View Source
const ( DefaultMessageSendQueueLen = 4 DefaultListenAddr = ":4001" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorAddToZoneEventBody ¶
type ActorAddToZoneEventBody struct { ActorID uuid.UUID `json:"actorID"` Name string `json:"name"` StartingLocationID uuid.UUID `json:"startingLocationID"` }
type ActorAdminRelocateEventBody ¶
type ActorAdminRelocateEventBody struct { ActorID uuid.UUID `json:"actorID"` ToLocationID uuid.UUID `json:"toLocationID"` }
type ActorDeathEventBody ¶
type ActorDeathEventBody struct {
ActorID uuid.UUID `json:"actorID"`
}
type ActorMigrateInEventBody ¶
type ActorMigrateInEventBody struct { ActorID uuid.UUID `json:"actorID"` Name string `json:"name"` FromLocID uuid.UUID `json:"fromLocID"` FromZoneID uuid.UUID `json:"fromZoneID"` ToLocID uuid.UUID `json:"toLocID"` }
type ActorMigrateOutEventBody ¶
type ActorMigrateOutEventBody struct { ActorID uuid.UUID `json:"actorID"` FromLocID uuid.UUID `json:"fromLocID"` ToZoneID uuid.UUID `json:"toZoneID"` ToLocID uuid.UUID `json:"toLocID"` }
type ActorMoveEventBody ¶
type ActorMoveEventBody struct { FromLocationID uuid.UUID `json:"fromLocationID"` ToLocationID uuid.UUID `json:"toLocationID"` ActorID uuid.UUID `json:"actorID"` }
type ActorRemoveFromZoneEventBody ¶
type ActorRemoveFromZoneEventBody struct {
ActorID uuid.UUID `json:"actorID"`
}
type ActorSpeakEventBody ¶
type ActorSpeakEventBody struct { ActorID uuid.UUID `json:"actorID"` Speech string }
type AuthService ¶
type AuthService interface { DoLogin(user, pass string) (uuid.UUID, *auth.AuthZDescriptor, error) GetActorIDsForAccountID(accountID uuid.UUID) []uuid.UUID }
type CombatDodgeEventBody ¶
type CombatDodgeEventBody struct { DamageType string AttackerID uuid.UUID TargetID uuid.UUID }
type CommandAttachActor ¶
type CommandAttachActor struct {
ActorID uuid.UUID `json:"actorID"`
}
type CommandLookAtObject ¶
type CommandLookAtObject struct {
ObjectID uuid.UUID `json:"objectID"`
}
type CommandLookAtOtherActor ¶
type CommandLookAtOtherActor struct {
ActorID uuid.UUID `json:"actorID"`
}
type CommandMeleeCombat ¶
type CommandMeleeCombat struct { AttackType string `json:"attackType"` TargetID uuid.UUID `json:"targetID"` }
type CommandMoveActor ¶
type CommandMoveActor struct {
Direction string
}
type CommandMoveObject ¶
type CommandMoveObject struct { ObjectID uuid.UUID `json:"objectID"` FromLocationID uuid.UUID FromActorID uuid.UUID FromObjectID uuid.UUID ToLocationID uuid.UUID ToActorID uuid.UUID ToObjectID uuid.UUID ToSubcontainer string }
type CompleteAttachActor ¶
type CompleteAttachActor struct {
ActorID uuid.UUID `json:"actorID"`
}
type CompleteListActors ¶
type CompleteListActors struct {
ActorIDs []uuid.UUID `json:"actorIDs"`
}
type CurrentLocationInfo ¶
type CurrentLocationInfo commands.LocationInfo
type Event ¶
type Event struct { EventType string `json:"eventType"` Version int `json:"version"` ZoneID uuid.UUID `json:"zoneID"` Body json.RawMessage `json:"body"` }
type Message ¶
type Message struct { Type string MessageID uuid.UUID `json:"messageID"` Payload json.RawMessage }
type ObjectAddToZoneEventBody ¶
type ObjectAddToZoneEventBody struct { ObjectID uuid.UUID `json:"objectID"` Name string `json:"name"` LocationContainerID uuid.UUID `json:"locationContainerID"` ActorContainerID uuid.UUID `json:"actorContainerID"` ObjectContainerID uuid.UUID `json:"objectContainerID"` }
type ObjectAdminRelocateEventBody ¶
type ObjectAdminRelocateEventBody struct { ObjectID uuid.UUID `json:"objectID"` ToLocationContainerID uuid.UUID `json:"toLocationContainerID"` ToActorContainerID uuid.UUID `json:"toActorContainerID"` ToObjectContainerID uuid.UUID `json:"toObjectContainerID"` ToSubcontainer string `json:"toSubcontainer"` }
type ObjectMoveEventBody ¶
type ObjectMoveEventBody struct { ObjectID uuid.UUID `json:"objectID"` FromLocationContainerID uuid.UUID `json:"fromLocationContainerID"` FromActorContainerID uuid.UUID `json:"fromActorContainerID"` FromObjectContainerID uuid.UUID `json:"fromObjectContainerID"` ToLocationContainerID uuid.UUID `json:"toLocationContainerID"` ToActorContainerID uuid.UUID `json:"toActorContainerID"` ToObjectContainerID uuid.UUID `json:"toObjectContainerID"` }
type ObjectRemoveFromZoneEventBody ¶
type ObjectRemoveFromZoneEventBody struct { ObjectID uuid.UUID `json:"objectID"` Name string `json:"name"` }
type Server ¶
type Server struct { ListenAddrString string AuthService AuthService // This is the length of outstanding messages we're willing to queue to send // to a single client. If we back up farther than this, we will disconnect // the client to protect our core (which will be making blocking calls to // add items to our queue-channel). MessageSendQueueLen int World *core.World // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.