Team 5 Controls and Integration Contracts - UQcsse3200/2026-studio-4 GitHub Wiki

Team 5 controls and integration contracts

Baseline: remote items 9eb2186, checked 17 September 2026. These Team 5 controls are integrated on items and are not yet a claim about main 9625e56. This page covers the controls needed to use and integrate Team 5 features; it does not define every other team's ability bindings.

Player controls

Key Action
E Existing room interaction and a separate itemPickup request; one nearby item entity is collected per request
7 Use Health Potion immediately
8 Use inventory Shield immediately
9 Use Speed Potion immediately
0 Use Strength Potion immediately
I Open/close the existing inventory book
1 / 2 / 3 Existing sword / dagger / bow selection
J / K Existing normal / heavy weapon attack
WASD / Space Existing movement / dash

There is no select-then-U step, selected-consumable highlight, configurable quick-slot button or minus-key consumable binding in this integration. The inventory book's consumable grid is not yet connected to real quantities; use the right-hand combat HUD for stock and the number keys for use. Input dispatch respects higher-priority handlers such as the open terminal.

Requests, notifications and data ownership

Contract Producer / caller Consumer / owner Meaning
ItemDropSpec(ItemType, quantity) Drop policy / caller ItemFactory Positive quantity and caller-selected type
Item.pickUp(player) ItemPickupComponent Concrete Item Route picked-up item into the real inventory
addConsumable(type, quantity) TypedItem InventoryComponent Add stock without applying an effect
getConsumableCount(type), hasConsumable(type) HUD / effects / future book integration InventoryComponent Query shared stock
consumableInventoryChanged(type, count) InventoryComponent Team5CombatHudDisplay / future UI Quantity notification after a mutation
useSlot(index) Keyboard input ConsumableLoadoutComponent Four fixed zero-based slots: Health, Shield, Speed, Strength
tryUse(type) / useConsumable(type) Loadout / requesting component ConsumableEffectComponent Request use; validate, remove one, apply effect
itemUsed(type) ConsumableEffectComponent Interested observers Success notification after effect application, never a second use request
getGold() HUD / future book integration InventoryComponent Read Gold; no goldChanged event exists in this baseline

Only the effects component owns the successful-use transaction; inventory performs the actual remove operation. Input/HUD must not remove another copy. Invalid type, no stock, dead/disposed player, or Health at maximum HP cause no consumption. Temporary effects also require the shared controller and time source.

The HUD listens for consumable inventory changes, refreshes Shield progress on itemUsed, and polls Gold and actual Shield duration during updates. Local 4b5e7c2 extends the remaining-duration API/UI to Speed and Strength; do not require that local-only extension when integrating against remote 9eb2186.

Two different shield mechanisms

Property Team 5 consumable Shield Shared rechargeable Shield
Resource Inventory count Separate shield-point pool
Team 5 binding 8 No 9/0 activation binding in the checked main/items keyboard handler
Effect Shared damage pipeline blocks damage for 8 seconds Separate Absorb / Timed activation API
Reuse Removes one more item and refreshes duration Uses the shared shield's activation/recharge rules
Display Team 5 duration bar in the top-right panel Shared PlayerStatsDisplay shield bar

Do not deduct shield points to use a Team 5 consumable or treat its duration bar as absorb points. See Shield Status Effect for that separate API.

Cross-team boundaries

  • Team 5: types, factory/drop policy, stock, pickup/use integration, consumable effects and compact HUD.
  • Team 2: shared player HUD and combat/status interfaces. The compact HUD neither restores the removed Charm-count control nor replaces shared Health/Shield displays.
  • Team 3: weapons and damage. Strength Potion uses effective attack; raw Strength Charm changes survive temporary-effect expiry.
  • Team 4: full inventory book and room lifecycle. Its future book integration should read the same InventoryComponent rather than duplicate stock. Unmerged inventory UI work is not described as delivered here.
  • Team 1 / room tracking: rewards are based on active tracked entities, including separate Cerberus heads and the guarded Final Boss completion path; no special boss-phase reward has been promised.

For code and evidence, see Sprint 2 overview and verification. Prepared with Codex assistance under Yuezhou's direction; original member contributions remain credited in the overview.