mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
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:
@@ -25,8 +25,7 @@ Elements.online_player_dropdown = Gui.define("player_dropdown")
|
||||
} --[[ @as any ]]
|
||||
|
||||
--- To help with caching and avoid context changes the player list from the previous update is remembered
|
||||
--- @type (string?)[]
|
||||
do local _player_names = {}
|
||||
do local _player_names = {} --- @type (string?)[]
|
||||
--- Updates the player name list after a join or leave
|
||||
--- @return (string?)[]
|
||||
function Elements.online_player_dropdown._update_player_names()
|
||||
|
||||
@@ -47,8 +47,7 @@ Elements.bonus_used = Gui.define("player_bonus/bonus_used")
|
||||
:element_data(0) --[[ @as any ]]
|
||||
|
||||
--- Value is cached to save perf
|
||||
--- @type table<number, number>
|
||||
do local _points_limit = {}
|
||||
do local _points_limit = {} --- @type table<number, number>
|
||||
--- Clear the cache for points limit
|
||||
--- @param player LuaPlayer
|
||||
function Elements.bonus_used._clear_points_limit_cache(player)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user