mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-07-26 18:36:23 +09:00
Fix milestone lint warning in rocket info gui
Narrow the milestone loop variable with a type check instead of an @cast, which tripped cast-type-mismatch because the milestones config mixes the show_milestones flag in with the numbers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0ead1a51f9
commit
8f6d6e1caa
@@ -155,7 +155,8 @@ local function compute_milestone_rows(force)
|
|||||||
local rows = {}
|
local rows = {}
|
||||||
|
|
||||||
for _, milestone in ipairs(config.milestones) do
|
for _, milestone in ipairs(config.milestones) do
|
||||||
--- @cast milestone number
|
-- The milestones config mixes the show_milestones flag with the milestone numbers
|
||||||
|
if type(milestone) == "number" then
|
||||||
if milestone <= force_rockets then
|
if milestone <= force_rockets then
|
||||||
local time = times[milestone] or 0
|
local time = times[milestone] or 0
|
||||||
rows[#rows + 1] = { milestone = milestone, value = time_formats.caption_hours(time), tooltip = time_formats.tooltip_hours(time) }
|
rows[#rows + 1] = { milestone = milestone, value = time_formats.caption_hours(time), tooltip = time_formats.tooltip_hours(time) }
|
||||||
@@ -164,6 +165,7 @@ local function compute_milestone_rows(force)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return rows
|
return rows
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user