From 9d4b799db4868bcab291b83599ff088763cd4ed6 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 24 Jun 2026 20:58:25 -0400 Subject: feat: new type of non-violent 'combat': work --- worldbuilding_guide/bank.md | 68 --------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 worldbuilding_guide/bank.md (limited to 'worldbuilding_guide/bank.md') diff --git a/worldbuilding_guide/bank.md b/worldbuilding_guide/bank.md deleted file mode 100644 index 0a5ec88..0000000 --- a/worldbuilding_guide/bank.md +++ /dev/null @@ -1,68 +0,0 @@ -# Bank System - -The bank system allows players to store items permanently, freeing up inventory space. - -## Objects - -### bank_booth - -A bank terminal that players can interact with. Has no special behavior — the `bank` command checks for any `bank_booth` object in the room. - -```yaml -id: bank_booth -name: bank booth -color: "226" -description: "..." -inroom_description: "A bank booth is set into the wall." -``` - -To place a bank booth in a room, add it to the room's `objects:` list: - -```yaml -objects: - - id: bank_booth -``` - -## Commands - -| Command | Description | -|---------|-------------| -| `bank` | Opens bank interface (requires bank booth in room) | -| `use bank` | Same as `bank` | - -### Bank Interface Commands - -| Command | Description | -|---------|-------------| -| `deposit ` | Move item from inventory to bank | -| `deposit all` | Deposit entire inventory | -| `withdraw ` | Move item from bank to inventory | -| `browse` / `list` | Show bank contents | -| `leave` | Exit bank interface | - -## Implementation - -### Session State - -`StateBank` (defined in `internal/net/server.go`) is the session state for the bank interface. Input is routed through `handleBankInput` in `internal/game/cmd_bank.go`. - -### Player Storage - -Bank items are stored in the `Player.Bank` field (`map[int]*InventorySlot`), saved in character YAML. Bank slots are sequential and reuse freed slots. There is no slot limit. - -### Command Dispatch - -- `bank` is classified as `ClassActive` in `classifyCommand()` -- `bank` case in `executeCommand()` calls `doBank(sess)` -- `doUse()` checks for `"bank"` or `"bank booth"` targets and routes to `doBank()` -- `doBank()` checks for a `bank_booth` object in the current room -- `handleBankInput()` dispatches deposit/withdraw/browse/leave commands - -### Data Files - -| File | Purpose | -|------|---------| -| `data/objects/bank_booth.yaml` | Bank booth object definition | -| `data/help/bank.yaml` | Help topic for the bank system | - -Default bank booth locations: Town Square (room 1), Forge (room 12). -- cgit v1.2.3