Type forward declared handlers and assert element parents

The player list action setter runs during control setup, before any of
the callbacks that use it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassie
2026-08-07 15:31:43 +00:00
co-authored by Claude Opus 5
parent aca8bc79ae
commit 0b31a70801
3 changed files with 18 additions and 16 deletions
@@ -15,7 +15,8 @@ local Colors = require("modules/exp_util/include/color")
local format_player_name = ExpUtil.format_player_name_locale
--- Accessors injected by the gui so the actions can read the selected player and set the selected action
local get_selected_player, set_selected_action
local get_selected_player --- @type fun(player: LuaPlayer): LuaPlayer
local set_selected_action --- @type fun(player: LuaPlayer, action: string?)
local function set_accessors(player_getter, action_setter)
get_selected_player, set_selected_action = player_getter, action_setter
end