1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-01 13:08:05 +02:00

Mtn v3 - fix gui weirdness

This commit is contained in:
Gerkiz 2023-09-22 00:30:52 +02:00
parent 8f5be84346
commit 2fdd60b830

View File

@ -488,31 +488,31 @@ local function main_frame(player)
buff_right_flow.style.horizontal_align = 'right'
buff_right_flow.style.horizontally_stretchable = true
local buffs = {'', 'Starting items:\n'}
local buffs = {''}
if stateful.buffs_collected and next(stateful.buffs_collected) then
for _, item_data in pairs(stateful.buffs_collected) do
if type(item_data) == 'table' then
for item_name, item_count in pairs(item_data) do
buffs[#buffs + 1] = item_name .. ': ' .. item_count
buffs[#buffs + 1] = '\n'
if stateful.buffs_collected.starting_items then
buffs[#buffs + 1] = 'Starting items:\n'
for _, item_data in pairs(stateful.buffs_collected) do
if type(item_data) == 'table' then
for item_name, item_count in pairs(item_data) do
buffs[#buffs + 1] = item_name .. ': ' .. item_count
buffs[#buffs + 1] = '\n'
end
end
end
buffs[#buffs + 1] = '\n'
end
buffs[#buffs + 1] = '\n'
end
buffs[#buffs + 1] = 'Force buffs:\n'
if stateful.buffs_collected and next(stateful.buffs_collected) then
buffs[#buffs + 1] = 'Force buffs:\n'
for name, count in pairs(stateful.buffs_collected) do
if type(count) ~= 'table' then
buffs[#buffs + 1] = Public.stateful.buff_to_string[name] .. ': ' .. (count * 100) .. '%'
buffs[#buffs + 1] = '\n'
end
end
table.remove(buffs, #buffs)
end
table.remove(buffs, #buffs)
buff_right_flow.add({type = 'label', caption = '[img=utility/center]', tooltip = buffs})
local buff_label = buff_left_flow.add({type = 'label', caption = {'stateful.buffs'}, tooltip = {'stateful.buff_tooltip'}})