You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a crash happening if you select a recipe with same input doubled (in pyanodon's mods there is a building called Jig that requires two separate water inputs for example)
Error while running event helmod::on_gui_click (ID 1)
Gui element with name cell_water already present in the parent element.
stack traceback: helmod/core/ElementGui.lua:842: in function 'addGuiTable' helmod/core/ElementGui.lua:856: in function 'addCell' helmod/core/ElementGui.lua:977: in function 'addCellElement' helmod/tab/ProductionBlockTab.lua:396: in function 'addTableRow' helmod/tab/ProductionBlockTab.lua:256: in function 'updateData' helmod/tab/MainTab.lua:644: in function 'update' helmod/tab/MainTab.lua:210: in function 'buildPanel' helmod/core/MainPanel.lua:83: in function 'main' helmod/controller/Controller.lua:182: in function 'onGuiClick' helmod/core/Event.lua:195: in function <helmod/core/Event.lua:186
as a quick and dirty fix i hacked this together (this is my first time with lua so im sure this is incorrect, but at least it fixes the issue for me) in the addGuiTable function:
function ElementGui.addGuiTable(parent, key, column_count, style)
local options = {}
options.type = "table"
options.column_count = column_count
local isDuplicate = false
for i, key_name in ipairs(parent.children_names) do
if key_name == key then
isDuplicate = true
end
end
if isDuplicate then
options.name = "double_"..key
else
options.name = key
end
if style ~= nil then
options.style = style
end
return parent.add(options)
end
The text was updated successfully, but these errors were encountered:
There is a crash happening if you select a recipe with same input doubled (in pyanodon's mods there is a building called Jig that requires two separate water inputs for example)
Error while running event helmod::on_gui_click (ID 1)
Gui element with name cell_water already present in the parent element.
stack traceback:
helmod/core/ElementGui.lua:842: in function 'addGuiTable'
helmod/core/ElementGui.lua:856: in function 'addCell'
helmod/core/ElementGui.lua:977: in function 'addCellElement'
helmod/tab/ProductionBlockTab.lua:396: in function 'addTableRow'
helmod/tab/ProductionBlockTab.lua:256: in function 'updateData'
helmod/tab/MainTab.lua:644: in function 'update'
helmod/tab/MainTab.lua:210: in function 'buildPanel'
helmod/core/MainPanel.lua:83: in function 'main'
helmod/controller/Controller.lua:182: in function 'onGuiClick'
helmod/core/Event.lua:195: in function <helmod/core/Event.lua:186
as a quick and dirty fix i hacked this together (this is my first time with lua so im sure this is incorrect, but at least it fixes the issue for me) in the addGuiTable function:
The text was updated successfully, but these errors were encountered: