feat: Introduce player input and movement managers to handle continuous, turn-based, and targeted grid interactions.
This commit is contained in:
@@ -11,7 +11,7 @@ func initialize(p_player: Node3D, p_movement_manager: Node, p_race_manager: Node
|
||||
|
||||
func _process(delta):
|
||||
# Early return conditions
|
||||
if not is_instance_valid(player) or not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots"):
|
||||
if not is_instance_valid(player) or not player.is_multiplayer_authority() or player.is_bot or player.is_in_group("Bots") or player.is_frozen or player.is_stop_frozen:
|
||||
return
|
||||
|
||||
if TurnManager.turn_based_mode:
|
||||
@@ -83,7 +83,7 @@ func handle_unhandled_input(event):
|
||||
return
|
||||
|
||||
# Turn-based mouse input (handled in unhandled_input)
|
||||
if not player.is_multiplayer_authority() or (TurnManager.turn_based_mode and (not player.is_my_turn or movement_manager.is_moving)):
|
||||
if not player.is_multiplayer_authority() or player.is_frozen or player.is_stop_frozen or (TurnManager.turn_based_mode and (not player.is_my_turn or movement_manager.is_moving)):
|
||||
return
|
||||
|
||||
# --- Keyboard Shortcuts (Event-based) ---
|
||||
@@ -162,7 +162,7 @@ func handle_unhandled_input(event):
|
||||
handle_grid_click(click_position)
|
||||
|
||||
func handle_grid_click(grid_position: Vector2i):
|
||||
if player.is_bot == true or player.is_in_group("Bots"):
|
||||
if player.is_frozen or player.is_stop_frozen or player.is_bot == true or player.is_in_group("Bots"):
|
||||
return
|
||||
var main = player.get_node("/root/Main")
|
||||
if not main:
|
||||
|
||||
Reference in New Issue
Block a user