Fix @onready null crash: add_child before setup() across all scene rows

@onready vars are resolved when a node enters the scene tree. Calling setup()
before add_child() means all %NodeName refs are still null, causing
"Invalid assignment... on base object of type Nil" errors.

Fixed ordering in every affected screen:
- free_play_screen.gd: LobbyBrowserRow, ActiveGameRow, DeckPickerButton
- lobby_room_screen.gd: RulesEditorDialog
- matchmaking_screen.gd: DeckPickerButton
- card_detail_popup.gd: StatRow, AbilityRow
- starter_deck_screen.gd: StarterDeckCard
- account_screen.gd: NotificationRow
- leaderboard_screen.gd: LeaderboardRow

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-22 10:36:01 -04:00
co-authored by Claude Happy
parent 2c737458a8
commit 3894fbdd16
7 changed files with 13 additions and 13 deletions
@@ -93,8 +93,8 @@ func _populate_stats(def: Dictionary) -> void:
func _add_stat(key: String, value: String) -> void:
var row := _StatRow.instantiate()
row.setup(key, value)
stats_grid.add_child(row)
row.setup(key, value)
func _populate_abilities(def: Dictionary) -> void:
@@ -124,8 +124,8 @@ func _populate_abilities(def: Dictionary) -> void:
var desc := str(d.get("description", d.get("Description", "")))
var row := _AbilityRow.instantiate()
row.setup(name_, desc)
abilities_list.add_child(row)
row.setup(name_, desc)
func _on_overlay_input(event: InputEvent) -> void: