feat: Add player action and input managers to handle player actions, movement, targeting, and visual feedback.

This commit is contained in:
Yogi Wiguna
2026-02-04 14:25:21 +08:00
parent 757051aca8
commit 77b8542896
5 changed files with 182 additions and 59 deletions
+5 -2
View File
@@ -1411,6 +1411,9 @@ func auto_put_item() -> bool:
@rpc("any_peer", "call_local", "reliable")
func force_action_state_none():
# This is called by the server on the client to reset the UI
if is_bot or is_in_group("Bots"):
return
var main = get_tree().get_root().get_node_or_null("Main")
if main and main.ui_manager:
main.ui_manager.current_action_state = main.ui_manager.ActionState.NONE
@@ -1524,8 +1527,8 @@ func has_items_in_playerboard() -> bool:
func playerboard_is_full() -> bool:
return playerboard.find(-1) == -1
func highlight_cells_if_authorized(cells_to_highlight: Array):
action_manager.highlight_cells_if_authorized(cells_to_highlight)
func highlight_cells_if_authorized(cells_to_highlight: Array, item_id: int = -1):
action_manager.highlight_cells_if_authorized(cells_to_highlight, item_id)
# Update highlight_movement_range to respect the expanded obstacle blocking
func highlight_movement_range():