reverses turn order sort
All checks were successful
linting & formatting / build (push) Successful in 20s
itch.io publish action / build (web, html) (push) Successful in 3m31s

This commit is contained in:
duncgibbs 2026-04-29 15:30:19 -05:00
parent 688ffcbf47
commit 15c9fd812e

View File

@ -169,18 +169,6 @@ func cancel_placement() -> void:
func start_day() -> void: func start_day() -> void:
if (
current_board_state.day > 0
and current_board_state.state != BoardState.State.PLACING_SPAWNS
and current_board_state.state != BoardState.State.DESTROYING_BUILDINGS
):
current_board_state.players.sort_custom(
func(p1: Player, p2: Player) -> bool: return p1.money > p2.money
)
current_board_state.current_player = current_board_state.players[0]
await all_players_ready_for_day_start
if current_board_state.state == BoardState.State.DESTROYING_BUILDINGS: if current_board_state.state == BoardState.State.DESTROYING_BUILDINGS:
if current_board_state.buildings_to_destroy > 0: if current_board_state.buildings_to_destroy > 0:
if current_board_state.current_player.id == Globals.game.this_player.id: if current_board_state.current_player.id == Globals.game.this_player.id:
@ -196,6 +184,15 @@ func start_day() -> void:
) )
return return
current_board_state.state = BoardState.State.DRAFT current_board_state.state = BoardState.State.DRAFT
if current_board_state.day > 0:
current_board_state.players.sort_custom(
func(p1: Player, p2: Player) -> bool: return p1.money < p2.money
)
current_board_state.current_player = current_board_state.players[0]
await all_players_ready_for_day_start
current_board_state.day += 1 current_board_state.day += 1
current_board_state.turn = 1 current_board_state.turn = 1
current_board_state.state = BoardState.State.DRAFT current_board_state.state = BoardState.State.DRAFT