CloseDoor
Close an open door on one side of the party's cell (takes no game time).
Full documentation: CloseDoor. Wire type: close_door.
Legal session modes: exploring
JSON Schema
{
"$defs": {
"Direction": {
"description": "The four grid directions the party faces and moves in.\n\nYou use these for the way `MoveParty` steps, the side of a\ncell `OpenDoor` works on, and the way a transition turns the\nparty on arrival. There is no up or down. A\n`TransitionSpec` moves the party between levels.\n\nThe values are lowercase strings, like `\"north\"`, and they appear in commands, events, and saves.",
"enum": [
"north",
"east",
"south",
"west"
],
"title": "Direction",
"type": "string"
}
},
"description": "Close an open door on one side of the party's cell (takes no game time).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). You rarely need this command,\nbecause a door the party opened swings shut by itself once the party walks away from it,\nunless it's wedged.\n\nModes:\n `exploring`\n\nRejections:\n - `session.command.wrong_mode` - the session is not exploring a dungeon.\n - `exploration.door.no_door` - no known door on that side of the cell.\n - `exploration.door.already_closed` - the door is already closed.\n - `exploration.door.wedged` - a wedged door cannot swing.\n\nEvents:\n `DoorEvent` with code\n `exploration.door.closed`.",
"properties": {
"command_type": {
"const": "close_door",
"default": "close_door",
"title": "Command Type",
"type": "string",
"description": "The name that identifies the command class in serialized data. Each command class fixes\nit to a distinct snake_case string, like `\"move_party\"` or `\"open_door\"`, and constructing\nthe class sets it, so you never pass it yourself.\n`parse_command` and the\n`AnyCommand` union use it to rebuild the right class\nfrom a serialized mapping. A class's value never changes between releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "Who or what issued the command on whose behalf: an authored trigger or quest id, or the\nname of one of your game's systems. The engine never reads it, so a command with a\n`source` does exactly what the same command without one does. The session logs and\nreplays it with the command, so the log alone shows why something happened. Leave it\n`None` when there's nothing to record. An empty string fails validation when the command\nis constructed."
},
"direction": {
"$ref": "#/$defs/Direction",
"description": "Which side of the party's cell the door is on. Only a door the party knows about counts,\nso this is one of the `door` edges in\n`ExploredLevelView.edges`. A wedged door\ncan't close, and the session refuses it with `exploration.door.wedged`."
}
},
"required": [
"direction"
],
"title": "CloseDoor",
"type": "object"
}