A five-slot hotbar with ammunition types, plus world pickups for picking up, dropping and swapping items.
Acceptance
All changes are server-authoritative, and tests cover full inventories, swaps, ammo stacks and drop on death.
Item definitions are data-driven resources.
**Depends on:** F5
A five-slot hotbar with ammunition types, plus world pickups for picking up, dropping and swapping items.
**Acceptance**
- All changes are server-authoritative, and tests cover full inventories, swaps, ammo stacks and drop on death.
- Item definitions are data-driven resources.
claude
added this to the v0.3 Building and Combat milestone 2026-11-09 05:27:01 +00:00
ItemDef (a Resource) and ItemCatalog, built from Tuning.WEAPONS, ITEMS and the new AMMO table, so adding an item is a data change only. The boathook stays outside the slots as selection 0.
Inventory: five slots (code, count, loaded rounds, tier), ammunition stocks with caps, pickup entities (ARCHETYPE_PICKUP) that rest on the floor under them, pick up / drop / swap, and drop_all on elimination.
PlayerCommand.BUTTON_DROP (bit 8). Interact and drop act once per press. A slot change costs SWAP_SECONDS.
The simulation marks a player eliminated when health reaches 0, emits an eliminated event naming the last attacker, drops everything, and ignores that player's commands. M3 builds on this.
All new player and pickup state is in state_hash().
Tests:test/sim/test_inventory.gd (18 tests): full inventories, swaps, ammo stacks and caps, stacking consumables, reach, nearest-first, once-per-press, swimmers can't pick up, drop on death, and hashing. make check passes: 211 tests at this commit, self-check and smoke.
Follow-ups: pickups have no visuals or HUD yet (A4, A9), and no client sends interact or drop yet (playable client work). Loot spawning is B9.
— tidewall-build
Done in e58d614.
**What changed**
- `ItemDef` (a `Resource`) and `ItemCatalog`, built from `Tuning.WEAPONS`, `ITEMS` and the new `AMMO` table, so adding an item is a data change only. The boathook stays outside the slots as selection 0.
- `Inventory`: five slots (code, count, loaded rounds, tier), ammunition stocks with caps, pickup entities (`ARCHETYPE_PICKUP`) that rest on the floor under them, pick up / drop / swap, and `drop_all` on elimination.
- `PlayerCommand.BUTTON_DROP` (bit 8). Interact and drop act once per press. A slot change costs `SWAP_SECONDS`.
- The simulation marks a player eliminated when health reaches 0, emits an `eliminated` event naming the last attacker, drops everything, and ignores that player's commands. M3 builds on this.
- All new player and pickup state is in `state_hash()`.
**Tests:** `test/sim/test_inventory.gd` (18 tests): full inventories, swaps, ammo stacks and caps, stacking consumables, reach, nearest-first, once-per-press, swimmers can't pick up, drop on death, and hashing. `make check` passes: 211 tests at this commit, self-check and smoke.
**Follow-ups:** pickups have no visuals or HUD yet (A4, A9), and no client sends interact or drop yet (playable client work). Loot spawning is B9.
— tidewall-build
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Depends on: F5
A five-slot hotbar with ammunition types, plus world pickups for picking up, dropping and swapping items.
Acceptance
Done in
e58d614.What changed
ItemDef(aResource) andItemCatalog, built fromTuning.WEAPONS,ITEMSand the newAMMOtable, so adding an item is a data change only. The boathook stays outside the slots as selection 0.Inventory: five slots (code, count, loaded rounds, tier), ammunition stocks with caps, pickup entities (ARCHETYPE_PICKUP) that rest on the floor under them, pick up / drop / swap, anddrop_allon elimination.PlayerCommand.BUTTON_DROP(bit 8). Interact and drop act once per press. A slot change costsSWAP_SECONDS.eliminatedevent naming the last attacker, drops everything, and ignores that player's commands. M3 builds on this.state_hash().Tests:
test/sim/test_inventory.gd(18 tests): full inventories, swaps, ammo stacks and caps, stacking consumables, reach, nearest-first, once-per-press, swimmers can't pick up, drop on death, and hashing.make checkpasses: 211 tests at this commit, self-check and smoke.Follow-ups: pickups have no visuals or HUD yet (A4, A9), and no client sends interact or drop yet (playable client work). Loot spawning is B9.
— tidewall-build