Inserter Throughput


Displays the throughput of the selected inserter (under ideal conditions). Now with a measuring tool for live testing.

Utilities
a month ago
0.18 - 2.0
30.4K
Logistics

g Disabling GUI element

a month ago

Ticking the option for disabling the GUI to show / hide troughput leaves an empty box. Shouldnt it remove the element completely?, like other mods do, for example; facotry planner has that option and it actually removes the thing (box included). This one does not, for some reason?

a month ago

That's because it adjusts visibility. But even if the button was deleted outright, the box would still remain because the core Factorio library responsible for it doesn't handle this case in any way. And Factory Planner interferes with the library to remove the box, which I think is wrong.

a month ago

That's because it adjusts visibility. But even if the button was deleted outright, the box would still remain because the core Factorio library responsible for it doesn't handle this case in any way. And Factory Planner interferes with the library to remove the box, which I think is wrong.

Fair enough, thank you for the response though.

a month ago

But even if the button was deleted outright, the box would still remain because the core Factorio library responsible for it doesn't handle this case in any way. And Factory Planner interferes with the library to remove the box, which I think is wrong.

Since the core Factorio library didn't fix that for years and the fix in Factory Planner just works fine for years, I would highly propose to just do the same. Leaving a empty box is really annoying and it's easy to fix.

Out of Factory Planner util/gui.lua:
local function check_empty_flow(player)
local button_flow = mod_gui.get_button_flow(player)
-- parent.parent is to check that I'm not deleting a top level element. Now, I have no idea how that
-- could ever be a top level element, but oh well, can't know everything now can we?
if #button_flow.children_names == 0 and button_flow.parent.parent then
button_flow.parent.destroy()
end
end

New response