Add inventory system #1

Merged
notid merged 24 commits from sugary-panda into master 2026-04-28 22:05:12 -07:00
Owner
No description provided.
notid added 24 commits 2026-04-28 22:04:44 -07:00
- InventoryBackpack: Control-based FSM with IDLE/OPEN/SELECTED/ACQUIRE/REMOVE
  states, Tween-based animations, guard condition checks, signal connections
  to InventoryManager for item_acquired/item_removed reactions
- InventoryOverlay: Full-screen overlay with fade-in/out, item grid via
  GridContainer, drag-and-drop item selection, combination via drag-to-slot,
  hover labels, right-click inspect
- InventorySlot: Individual slot with colored box placeholder, hover highlight,
  click/right-click/hover signals
- ActionState: add ITEM action (value 4) to enum and get_action_name()
- MainGame: right-click cycles through all 5 actions including ITEM;
  skips ITEM if nothing selected; clears selection when cycling away
- Scene: guard _unhandled_input() against active inventory overlay;
  handle ITEM action for world-wide item use; add give_item(),
  remove_item(), strip_items() helper methods
- SetPiece: handle ITEM action by calling scene's _use_item_on_setpiece()
- GameScript: add GiveItem and GiveItemDeferred script step classes
  for item acquisition during cutscenes
- ItemDefinition.gd: Resource class with id, name, combination_category
- ItemDefinition.gd.uid: UID cache file
- InventoryManager.gd.uid: UID cache file (script was committed, UID was not)
- inventory-prd.md: Original product requirements document (791 lines)
- docs/plans/2026-04-26-001-feat-inventory-backpack-system-plan.md:
  Implementation plan with 6 units and 5 user-directed edits
- Add InventoryBackpack under HUD CanvasLayer (layer 5) in Game.tscn
- Add InventoryOverlay under InventoryOverlayLayer CanvasLayer (layer 10)
- Fix Tween.TRANS_SINE_IN -> .set_trans(TRANS_SINE).set_ease(EASE_IN) in
  InventoryBackpack.gd (Godot 4.6 split transition and easing APIs)
- Godot 4's CallbackTweener doesn't have .bind() — move .bind() call
  inside tween_callback() for 3 callback sites
- Shrink InventoryBackpack Control to 60x60 (offset_right -70) so click
  area matches the visible BackpackIcon square
- Connect overlay_show_requested/overlay_hide_requested signals in Game.tscn
  to new handlers in MainGame.gd that call show_overlay()/hide_overlay()
- Simplify backpack to fixed 70x70 position at top-left (layout_mode=0)
- Remove broken anchor overrides from Game.tscn that were anchoring to bottom
notid force-pushed sugary-panda from 9fc5a16ecd to 291d911a50 2026-04-28 22:04:44 -07:00 Compare
notid merged commit 639060fa7f into master 2026-04-28 22:05:12 -07:00
notid referenced this issue from a commit 2026-04-28 22:05:14 -07:00
notid changed title from sugary-panda to Add inventory system 2026-04-28 22:05:24 -07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: notid/ai-game-2#1