feat: integrate inventory with cursor system, scene input, and GameScript

- 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
This commit is contained in:
2026-04-26 21:10:39 -07:00
parent afcf92dbfd
commit fb8798a4ae
5 changed files with 114 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
extends Node
enum Action { WALK = 0, LOOK = 1, TOUCH = 2, TALK = 3 }
enum Action { WALK = 0, LOOK = 1, TOUCH = 2, TALK = 3, ITEM = 4 }
var current_action: int = Action.WALK:
set(value):
@@ -22,6 +22,7 @@ func get_action_name() -> String:
Action.LOOK: return "look"
Action.TOUCH: return "touch"
Action.TALK: return "talk"
Action.ITEM: return "item"
return "walk"
func get_action_enum() -> int: