feat(items): add bound role control items

This commit is contained in:
dmg
2026-08-21 21:28:32 -04:00
parent ec7d50c2b5
commit 0b202f588d
24 changed files with 777 additions and 13 deletions
+20
View File
@@ -6,6 +6,26 @@ description: Chronological record of material decisions affecting the Spigot Tyr
# Spigot Tyrant Design Log
## 2026-08-21 — Bound role control items completed
- Completed US-017 and the reopened US-015 and US-016 criteria with configurable owner-bound Tyrant and Vigilante control items that open their respective panels.
- Role items are reconciled on login and periodically after role transitions, deduplicated, removed after role loss, and recoverable through `/tyrant item` or `/vigilante item` without dropping overflow.
- Drop, pickup, container, drag, hopper, placement, dispenser, item-frame, death, stale-owner, and stale-role paths prevent transfer or remove invalid items.
- Added default `Tyrant Control` Nether Star and `Vigilante Control` Compass settings and validation.
- Verified role policy, delayed reconciliation, panel interaction, command recovery, settings defaults, compiler warnings, tests, and packaging with `./gradlew clean check jar`.
## 2026-08-21 — Bound role control item implementation started
- US-015, US-016, and US-017 begin a test-first implementation of configurable owner-bound Tyrant and Vigilante control items.
- Delivery, command recovery, interaction, role validation, transfer prevention, role-loss cleanup, and duplicate resistance will build on the existing bound-item patterns.
## 2026-08-21 — Bound role control items planned
- Added US-017 for secure owner-bound Tyrant and Vigilante inventory items that open the corresponding control panels.
- The Tyrant item defaults to a Nether Star named `Tyrant Control`, and the Vigilante item defaults to a Compass named `Vigilante Control`; both material and name are configurable.
- Planned automatic role-assignment and login delivery, command recovery, full transfer prevention, removal on role loss or inventory departure, and duplicate resistance.
- Reopened US-015 and US-016 in the backlog to track control-panel access through the new role items.
## 2026-08-21 — Vigilante control panel completed
- Completed US-016 and the reopened US-008 criteria with resistance overview, recruitment, Follower management, and confirmed role-relinquishment screens.
+1
View File
@@ -16,3 +16,4 @@
14. [US-014: Use class ability items](us-014-use-class-ability-items.md)
15. [US-015: Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
16. [US-016: Manage Followers through the Vigilante control panel](us-016-manage-vigilante-control-panel.md)
17. [US-017: Use bound role control items](us-017-use-bound-role-control-items.md)
@@ -31,6 +31,7 @@ As the **Tyrant**, I want a control panel for my reign so that I can inspect pro
- [x] Stale, repeated, or concurrent panel interactions cannot duplicate purchases, bypass cooldowns, or create conflicting assignments.
- [x] Panel actions become unavailable immediately if the game pauses, the reign ends, or the player is no longer the Tyrant.
- [x] Existing `/tyrant choices`, `/tyrant buy`, `/tyrant assign`, and `/tyrant intelligence` commands remain available as alternatives.
- [x] The active Tyrant can open the control panel by using the bound Tyrant control item.
## Validation
@@ -42,3 +43,4 @@ Automated tests verify command entry points, active-Tyrant authorization, author
- [Assign unlocked classes](us-004-assign-unlocked-classes.md)
- [Purchase and use Tyrant abilities](us-009-use-tyrant-abilities.md)
- [Inform players and manage participation](us-011-inform-and-manage-participation.md)
- [Use bound role control items](us-017-use-bound-role-control-items.md)
@@ -33,6 +33,7 @@ As the **Vigilante**, I want a control panel for managing Followers so that I ca
- [x] Every action revalidates the running lifecycle and active Vigilante before changing state.
- [x] Stale or repeated control-panel interactions cannot invite an ineligible player, duplicate an invitation, or dismiss the wrong Follower.
- [x] Existing `/vigilante invite`, `/vigilante accept`, `/vigilante dismiss`, `/vigilante leave`, and `/tyrant relinquish confirm` commands remain available.
- [x] The active Vigilante can open the control panel by using the bound Vigilante control item.
## Validation
@@ -44,3 +45,4 @@ Automated tests verify default and explicit command entry points, active-Vigilan
- [Handle inactivity and pending selections](us-010-handle-inactivity-and-selection.md)
- [Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
- [Role and class model](../concepts/role-and-class-model.md)
- [Use bound role control items](us-017-use-bound-role-control-items.md)
@@ -0,0 +1,43 @@
---
type: User Story
title: "US-017: Use bound role control items"
description: Give the active Tyrant and Vigilante secure inventory items that open their control panels.
status: done
---
# US-017: Use bound role control items
As a **Tyrant or Vigilante**, I want a bound role item that opens my control panel so that I can access role controls without typing a command.
## Acceptance criteria
- [x] A player receives the appropriate control item when becoming the active Tyrant or Vigilante.
- [x] The Tyrant control item opens the Tyrant control panel when used.
- [x] The Vigilante control item opens the Vigilante control panel when used.
- [x] The Tyrant control item defaults to a Nether Star named `Tyrant Control`.
- [x] The Vigilante control item defaults to a Compass named `Vigilante Control`.
- [x] Each item's material and name are configurable, and hidden metadata identifies its owner, associated role, and the plugin.
- [x] Only the current role holder identified by the item's metadata can use the item.
- [x] A former role holder or another player cannot use or retain the item.
- [x] `/tyrant item` restores a missing Tyrant control item in addition to existing eligible class items.
- [x] `/vigilante item` restores a missing Vigilante control item.
- [x] Recovery commands cannot create duplicate control items.
- [x] Using a recovery command while the inventory is full does not drop the item and explains how to retry.
- [x] A role control item cannot be placed, crafted with, stored, framed, dispensed, transferred, or moved into another inventory.
- [x] Dropping a role control item removes it immediately rather than creating a transferable dropped item.
- [x] If a role control item leaves its owner's inventory during death or another inventory event, it is removed and may be recovered after respawn.
- [x] A missing role control item is restored automatically on login or role assignment when inventory space is available.
- [x] Every copy is removed immediately when the player loses the associated role.
- [x] Repeated commands, role transitions, death, logout, restart, and concurrent inventory events cannot duplicate role control items.
- [x] Existing `/tyrant`, `/tyrant menu`, `/vigilante`, and `/vigilante menu` control-panel access remains available.
## Validation
Automated tests verify role eligibility, paused-role retention, reconciliation and recovery, panel activation, role-specific commands, and configuration defaults. Inventory listeners cover transfer and departure paths, and the complete `./gradlew clean check jar` lifecycle passes.
## Related
- [Manage a reign through the Tyrant control panel](us-015-manage-tyrant-control-panel.md)
- [Manage Followers through the Vigilante control panel](us-016-manage-vigilante-control-panel.md)
- [Use class ability items](us-014-use-class-ability-items.md)
- [Configure and persist game state](us-012-configure-and-persist-state.md)