debug: log tiles count at frame 10

This commit is contained in:
Natalie 2026-04-12 14:24:46 -07:00
parent 1f6263c819
commit 9d6d1e1da3

View file

@ -98,12 +98,13 @@ func _process(_delta: float) -> bool:
if _frame == 5:
_dismiss_popups()
if _frame == 10 and _turn_count == 0:
# Fix start positions on first turn (map is loaded by now)
var gs2: Node = root.get_node_or_null("/root/GameState")
if gs2 != null:
var gm2: RefCounted = gs2.get_game_map()
if gm2 != null and gm2.start_positions.size() == 0 and gm2.tiles.size() > 0:
_fix_start_positions(gm2, gs2)
if gm2 != null:
print(" frame10: tiles=%d start_pos=%d" % [gm2.tiles.size(), gm2.start_positions.size()])
if gm2.start_positions.size() == 0:
_fix_start_positions(gm2, gs2)
if _frame == 15:
_turn_count += 1
_play_turn()