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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user