Type the last of the forward declarations

Locals declared ahead of an assignment inside a callback were inferred
as nil at every use site.

The role event handlers are given a class so the table is not unified
with the other module handler tables.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5 committed 2026-08-07 15:31:18 +00:00
1 parent 5aeafa0e11
commit f39da0c585
7 files changed
+16 -7

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ function Search.on_player_locale_changed(event)
local ids = player.request_translations(required_translations)
assert(ids, "Translation ids was nil")
for i, command_name in ipairs(command_names) do
pending[ids[i]] = { locale, command_name }
pending[assert(ids[i])] = { locale, command_name }
end
end
end