feat: fix some bug
This commit is contained in:
@@ -11,29 +11,9 @@ func initialize(p_player: Node3D, p_gridmap: Node):
|
||||
player = p_player
|
||||
enhanced_gridmap = p_gridmap
|
||||
|
||||
# =============================================================================
|
||||
# Action Point Management
|
||||
# =============================================================================
|
||||
|
||||
func consume_action_points(points: int):
|
||||
if not is_instance_valid(player) or not player.is_multiplayer_authority():
|
||||
return
|
||||
|
||||
var main = player.get_tree().get_root().get_node_or_null("Main")
|
||||
if not main:
|
||||
return
|
||||
|
||||
# Non-turn-based mode: unlimited action points for real-time fast-paced gameplay
|
||||
if not TurnManager.turn_based_mode:
|
||||
after_action_completed()
|
||||
return
|
||||
|
||||
# Turn-based mode: consume action points normally
|
||||
player.action_points -= points
|
||||
|
||||
if player.action_points <= 0:
|
||||
main.request_next_turn()
|
||||
|
||||
func consume_action_points(_points: int):
|
||||
# Action points are no longer used (real-time mode only).
|
||||
# Kept as a no-op stub so call sites don't need mass refactoring.
|
||||
after_action_completed()
|
||||
|
||||
func after_action_completed():
|
||||
|
||||
Reference in New Issue
Block a user