Repository navigation
01 Prototype 08 Item Manager
Runtime layer behind 08-items.md. Role logic lives in tech/06-roles.md, fixtures in 08-fixtures.md, kit passive friendship in 08-kit.md, balls in 08-balls.md.
Dependencies: Effect System (07), Items (08-items.md), Venue (08-venue.md), Shop Drag-and-Drop (04-shop-drag-drop.md).
Ownership lives on ProgressionData.item_levels. Court placement is a second field; kit membership is derived.
# role (ball/court/equipment) -> ordered array of item keys
var on_court: Dictionary[StringName, Array] = {}
var destroyed_items: Array[String] = []
var kit_accumulated_points: float = 0.0 # see 08-kit.md
var kit_last_tick_unix: int = 0Destruction sets item_levels[key] = 0 and appends to destroyed_items.
func get_court_items() -> Array[String]
func get_kit_items() -> Array[String]
func is_on_court(item_key: String) -> bool
func role_occupants(role: StringName) -> Array[String]func activate(item_key: String) -> bool
func deactivate(item_key: String) -> boolBoth are called by drag-and-drop handlers (see 08-kit.md for the player-side flow per role).
- Reject if destroyed, not owned, or already on the court.
- Append to
on_court[role]. -
_effect_manager.register_source(item, level). - If
role == &"court",FixtureManagerspawns the prop (see08-fixtures.md). Forballandequipment, the parent scene (ball rack or paddle) hosts the prop directly; no fixture manager involvement. - Save. Emit
court_changed.
Activation has no friendship cost; the friction is the animation beat on equipment.
Applies to ball and equipment only. Reverse of activate: unregister effects, remove from on_court.
Court items never call deactivate. They leave the court only by entering the Tinkerer's queue (see 08-tinkerer.md); on return from a level-up commission, activate re-seats them.
-
purchase()writesitem_levelsonly. If the item is on the court, re-register its effects at the new level. -
take()stays inert. -
activateis the only path that registers effects.
Dev panel uses purchase_and_place(key) to preserve the one-click flow.
Closes when activate lands. TakeBox.accept stays inert by design; the player drags the item from BallRack or GearRack to activate it.
signal court_changed
Existing soul_balance_changed and item_level_changed are unchanged.
-
activate/deactivatestate transitions and friendship debits. - Role occupancy (append, remove, overflow stack).
- Kit passive friendship (see
08-kit.md). - Ball reconciliation (see
08-balls.md).
Not filing yet.
- Court/kit data model, derived queries, signals.
-
activate/deactivate,_set_levelrefactor, dev-panel update, SH-93 close-out.
Contributing
The game
The Cast
Process
Reference