mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Assert row lookups and narrow force and style reads
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -204,7 +204,7 @@ end
|
||||
--- @param row_index number
|
||||
--- @param row_data ExpGui_ResearchMilestones.elements.milestone_table.row_data
|
||||
function Elements.milestone_table.refresh_row(milestone_table, row_index, row_data)
|
||||
local row = Elements.milestone_table.data[milestone_table][row_index]
|
||||
local row = assert(Elements.milestone_table.data[milestone_table][row_index])
|
||||
row.name.caption = row_data.name
|
||||
row.target.caption = row_data.target
|
||||
row.achieved.caption = row_data.achieved
|
||||
|
||||
@@ -193,7 +193,7 @@ Elements.science_table = Gui.define("science_production/science_table")
|
||||
local science_table = Gui.elements.scroll_table(parent, 190, 4)
|
||||
local no_production_label = Elements.no_production_label(science_table)
|
||||
Elements.no_production_label.refresh(no_production_label)
|
||||
science_table.style.column_alignments[3] = "right"
|
||||
(science_table.style --[[@as LuaStyle]]).column_alignments[3] = "right"
|
||||
return science_table
|
||||
end)
|
||||
:element_data{} --[[@as any]]
|
||||
@@ -280,7 +280,7 @@ function Elements.science_table.add_row(science_table, row_data)
|
||||
column_count = 2,
|
||||
}
|
||||
delta_table.style.padding = 0
|
||||
delta_table.style.column_alignments[1] = "right"
|
||||
(delta_table.style --[[@as LuaStyle]]).column_alignments[1] = "right"
|
||||
|
||||
-- Draw the net production label
|
||||
local net = Elements.production_label(science_table, row_data.net)
|
||||
|
||||
Reference in New Issue
Block a user