Fix duplicate class and annotation placement lint errors

Classes contributed to by more than one file now carry the `partial`
attribute. trains.lua declared its command as `ExpCommand_Artillery`,
which was a copy paste.

`Color.0` and `MapPosition.0` became `.struct` in fmtk 2.1.6.

emmylua rejects `@type` on a function statement or a `do` block, so
those are moved onto the local or replaced by `@param` and `@return`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassie
2026-08-07 15:31:18 +00:00
co-authored by Claude Opus 5
parent c6da1fd9ac
commit 90f32699c7
18 changed files with 29 additions and 30 deletions
@@ -326,8 +326,7 @@ function Elements.science_table.refresh_row(science_table, row_data)
Elements.production_label.refresh(row.used, row_data.used)
end
--- @type table<string, { [string]: ExpGui_ScienceProduction.elements.science_table.row_data }>
do local _row_data = {}
do local _row_data = {} --- @type table<string, { [string]: ExpGui_ScienceProduction.elements.science_table.row_data }>
--- Refresh the production tables for all online players
function Elements.science_table.refresh_online()
-- Refresh the row data for online forces
@@ -416,8 +415,7 @@ function Elements.eta_label.refresh(eta_label)
eta_label.tooltip = display_data.tooltip
end
--- @type Elements.eta_label.display_data
do local _display_data = {}
do local _display_data = {} --- @type Elements.eta_label.display_data
--- Refresh the eta label for all online players
function Elements.eta_label.refresh_online()
-- Refresh the row data for online forces
@@ -477,8 +475,7 @@ local _fp_one_hour = defines.flow_precision_index.one_hour
--- @field ten_minutes ExpGui_ScienceProduction._item_data
--- @field one_hour ExpGui_ScienceProduction._item_data
--- @type table<string, { [string]: ExpGui_ScienceProduction.item_production_data }>
do local _production_data = {}
do local _production_data = {} --- @type table<string, { [string]: ExpGui_ScienceProduction.item_production_data }>
--- Get the production stats for a force
--- @param flow_stats any