Skip to content

DoorEvent

A door changed state; the edge is named by its cell and direction.

Full documentation: DoorEvent. Wire type: door.

Default visibility: player

Message codes: exploration.door.closed, exploration.door.forced, exploration.door.opened, exploration.door.stuck, exploration.door.swung_shut, exploration.door.unlocked, exploration.door.wedged

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who may see an event.\n\nThe wire values are `\"player\"` and `\"referee\"` \u2014 lowercase, serialized into every\nevent; changing them is a `schema_version` bump.",
      "enum": [
        "player",
        "referee"
      ],
      "title": "Visibility",
      "type": "string"
    }
  },
  "description": "A door changed state; the edge is named by its cell and direction.",
  "properties": {
    "code": {
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "door",
      "default": "door",
      "title": "Event Type",
      "type": "string"
    },
    "x": {
      "title": "X",
      "type": "integer"
    },
    "y": {
      "title": "Y",
      "type": "integer"
    },
    "direction": {
      "title": "Direction",
      "type": "string"
    },
    "character_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Character Id"
    }
  },
  "required": [
    "code",
    "x",
    "y",
    "direction"
  ],
  "title": "DoorEvent",
  "type": "object"
}