I forked your mod (and credited and linked to your mod ofc). Only used it locally for a long time. But I decided to upload it recently. So thanks for the permissive licensing. I usually release under GPLv3, but decided to release under MIT since you did it. MIT would allow me to release under GPL if I wanted to but I decided to keep it MIT since my mod is just a tiny variation of this one and is mostly your code.
Got a bug report and started wondering why the slot count bonus is only considered "safe" to update while the gui is closed. Adding armor to your character does it while the inventory is open, seems like there's nothing actually stopping you from doing it. Haven't tested yet though.
So why is the mod shy and only works when you aren't checking that it is doing its job? ^^
I wasn't sure myself off hand, but I found this in the changelog from 0.0.3:
- Mod no longer changes inventory size while the inventory is open (to prevent the scrolling reset) (Thanks Ranakastrasz for the tip)
I'm not sure if that is still an issue (it was from Factorio 0.14), but you could check quickly by adding/removing armor, as I assume it would also reset the scroll also.