aboutsummaryrefslogtreecommitdiff
path: root/building_guide
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide')
-rw-r--r--building_guide/admin.md37
1 files changed, 34 insertions, 3 deletions
diff --git a/building_guide/admin.md b/building_guide/admin.md
index 023fae1..fe940e3 100644
--- a/building_guide/admin.md
+++ b/building_guide/admin.md
@@ -105,6 +105,7 @@ to see all available actions:
| `addspawn` | `room addspawn <item_id> [qty] [respawn]` | Add an item spawn (must exist in data/items/) |
| `remspawn` | `room remspawn <item_id>` | Remove an item spawn |
| `insert` | `room insert <direction> [name]` | Insert a new room into an exit, pushing rooms further out |
+| `remove` | `room remove <direction>` | Delete the inserted room and pull the far end back |
All room commands are admin-only. Referenced objects, mobs, and items are validated
before being added.
@@ -117,7 +118,37 @@ twist. For up/down, no grid check is needed — the new room simply becomes an
intermediate floor. The new room inherits the current room's outward-facing
exit properties (conditions, blocked messages, flags), while the far room's
reciprocal exit properties are preserved on its side. You are teleported into
-the new room, just like `dig`.
+the new room, just like `dig`. Diagonal directions (NE/NW/SE/SW) are supported.
+
+`room remove` is the inverse of `room insert`: it deletes the room reached via
+the current room's `<direction>` exit (the "inserted" room) and "pulls" the
+far end of the map back one step — the room that was beyond the deleted room
+becomes adjacent to the current room, and everything reachable beyond it shifts
+one step toward you. The current room's `<direction>` exit is repointed at the
+far room (preserving the current room's exit properties), and the far room's
+reciprocal exit is repointed back at the current room (preserving the far
+room's own exit properties). You stay where you are; any other player standing
+in the deleted room is relocated to the current room.
+
+`room remove` fails (and prints a message, changing nothing) when:
+
+- the `<direction>` exit's room does not lead back to the current room via the
+ opposite direction (it's not an insert chain),
+- the deleted room has no room beyond it to pull (a dead end — use `undig`
+ instead),
+- the deleted room has any exit other than the back-exit and the forward-exit,
+- the far room's opposite exit does not lead back to the deleted room,
+- some other room points into the deleted room (it was modified since
+ insertion), or
+- the pull would cause a map overlap or twist.
+
+Both `room insert` and `room remove` are also available from the admin web
+GUI's Map page: right-click a room and choose **Insert Room…** or
+**Remove Room…**, then pick a direction from the submenu. The GUI endpoints
+perform the same grid validation and exit-property preservation as the
+in-game commands. The GUI cannot relocate live players standing in a removed
+room (the same limitation as the existing Delete Room action); ensure no one
+is in the target room before removing it from the GUI.
#### god
```
@@ -250,9 +281,9 @@ The map page (`/`) is the main navigation hub:
The typical admin worldbuilding workflow:
-1. **Lay out rooms:** Use `dig` to create connected rooms quickly, or use the web map to create and link rooms visually. If `dig` would create a grid overlap, a two-way link is created instead — no duplicate rooms. Use `room insert` to place a new room between two already-connected rooms without breaking the map grid.
+1. **Lay out rooms:** Use `dig` to create connected rooms quickly, or use the web map to create and link rooms visually. If `dig` would create a grid overlap, a two-way link is created instead — no duplicate rooms. Use `room insert` to place a new room between two already-connected rooms without breaking the map grid, and `room remove` to delete an inserted room and pull the far end back.
2. **Flesh out rooms:** Use `room` commands to set names, descriptions, add objects/mobs/spawns directly from inside the game. Use the web admin editors for richer CRUD with undo/redo. For deeper edits, edit the YAML files directly in `data/rooms/` to add on-enter scripts, triggers, hazards, etc.
-3. **Rearrange:** Use `swapid` to renumber rooms and `undig` to delete rooms you no longer want (with full exit cleanup). Use `close` to remove individual exits.
+3. **Rearrange:** Use `swapid` to renumber rooms and `undig` to delete rooms you no longer want (with full exit cleanup). Use `room remove` to cleanly undo a `room insert` (it pulls the far end back and rejects edits that would break the grid). Use `close` to remove individual exits.
4. **Reload:** Run `reload` to pick up YAML changes without restarting (rooms auto-reload).
5. **Test:** Use `goto` to jump around while debugging room connections and content.
6. **God mode:** Use `god` to test dangerous areas safely — full stats, no aggro, pass through blocked exits. `ungod` restores normal state.