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

i Please don't change setting when clicking button

6 months ago

Thanks for the great mod!
I noticed that I get messages from Fill4Me that it reloads its settings when I click on the inserter throughput button and so I noticed that you change the games settings everytime the button is clicked which triggers a "on_runtime_mod_setting_changed" for every mod in the game.
Would be great if this could be changed.

6 months ago

That's how that value is stored. You are suggesting that, instead of a single place, it should be stored in two places. And I will have to deal with two ways to change it instead of just one. A player clicking the button is not a time-critical portion of code to facilitate this extra complexity.

It is also normal and intended for mods to change their own settings. Many indeed do so. The event being raised for all mods is also the intended modding API behavior. If some mod assumes it will only get that event for its own settings, that's a bug in that mod.

Looking at the Fill4Me code, it does indeed not differentiate between its own and other mods' settings getting changed. It's a bug in Fill4Me.

6 months ago

I'm just not sure why you use a setting for storing internal data. If there is a convenient button I guess people will not go into settings to enable/disable.
Usually mods use the global variable for things like this: https://lua-api.factorio.com/latest/auxiliary/global.html
Obviously its your mod and you can do whatever you want, its just a suggestion.

And I agree, Fill4Me should handle things otherwise :-)

6 months ago

You can disable the button in the settings.

6 months ago

I modified my local copy of Fill4Me to get rid of those stupid spammy messages on the screen. I haven't tried using this mod after fixing Fill4Me yet.

New response