[MOD 0.16.x] Storage Energistics
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
As far as i know frequently enumarating large inventories does have somewhat of a performanc penalty. You might get around that by accessing/caching the LuaItemStacks ("Inventory Slots") directly instead of via the inventory. Just food for thought as i really don't know anything about your internal structure ;).
Re: [MOD 0.16.x] Storage Energistics
This will be my first message at this forum.
Hello and thanks for a wonderful mod but I found a bug and it is related to the extra GUI that a container has where you choose items to be retrieved from the network or where you set read-only in this case.
If a container GUI is open during save/auto-save, it will remain locked and unusable on screen and will not disappear and the remained GUI-part will be useless and that GUI will never show up in a usable form again. One way to get around this is to load a previous save but now I noticed this one to late and I have done a lot of stuff since this one got locked on screen. We should have a button the clears the screen from GUI-parts really but you should try to add a button or something that closes all your extra GUI parts if possible.
This is a must have mod and keep up the good work with it. Damn nice.
//Pekka
Hello and thanks for a wonderful mod but I found a bug and it is related to the extra GUI that a container has where you choose items to be retrieved from the network or where you set read-only in this case.
If a container GUI is open during save/auto-save, it will remain locked and unusable on screen and will not disappear and the remained GUI-part will be useless and that GUI will never show up in a usable form again. One way to get around this is to load a previous save but now I noticed this one to late and I have done a lot of stuff since this one got locked on screen. We should have a button the clears the screen from GUI-parts really but you should try to add a button or something that closes all your extra GUI parts if possible.
This is a must have mod and keep up the good work with it. Damn nice.
//Pekka
Re: [MOD 0.16.x] Storage Energistics
That bug annoys me. I actually have a routine that is supposed to look for and clean up orphaned windows, obviously its not working. Thanks for the report.Pekkape wrote:This will be my first message at this forum.
Hello and thanks for a wonderful mod but I found a bug and it is related to the extra GUI that a container has where you choose items to be retrieved from the network or where you set read-only in this case.
If a container GUI is open during save/auto-save, it will remain locked and unusable on screen and will not disappear and the remained GUI-part will be useless and that GUI will never show up in a usable form again. One way to get around this is to load a previous save but now I noticed this one to late and I have done a lot of stuff since this one got locked on screen. We should have a button the clears the screen from GUI-parts really but you should try to add a button or something that closes all your extra GUI parts if possible.
This is a must have mod and keep up the good work with it. Damn nice.
//Pekka
Re: [MOD 0.16.x] Storage Energistics
The inventories are walked in the following ways:eradicator wrote:As far as i know frequently enumarating large inventories does have somewhat of a performanc penalty. You might get around that by accessing/caching the LuaItemStacks ("Inventory Slots") directly instead of via the inventory. Just food for thought as i really don't know anything about your internal structure .
1) The player has the network overview open. Every 5ish seconds the full network is walked.
2) A transfer request occurs. Walking stops when a place for the item is found on deposits, and or when the item is found for extractions.
Unfortunately I can not trust any kind of inventory cache, as the contents of the chests can be changed outside the purview of the mod. For example an inserter could remove a stack of the item between network ticks, and there are no events related to items entering or leaving an inventory(that I can find).
The best I might be able to do is use a cache as a kind of best-guess-list, where searches or inserts review the guess-list inventories first, and if the list is outdated, do a full walk.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
Any gui assigned to Player.opened = LuaGuiElement will raise on_gui_closed if the player tries to cloes it (i.e. by opening another gui or pressing buttons). That makes handling them much easier. (In case you don't already do that)
Re: [MOD 0.16.x] Storage Energistics
Unfortunately the side windows can not be set to player.opened, as it closes the opened chest. And with no way to actually get to the LuaGuiElement that represents the opened chest, I cant make the config window a child of it.eradicator wrote:Any gui assigned to Player.opened = LuaGuiElement will raise on_gui_closed if the player tries to cloes it (i.e. by opening another gui or pressing buttons). That makes handling them much easier. (In case you don't already do that)
Edit: I just realized that the opened chest gui is player.opened.... So I DO have a way (potentially) to get at the element... Such oversight, Much silly
Edit2: No luck, player.opened points to the entity, not the gui element, when a chest is opened. And the on gui opened event does not pass in the element either. Sad day.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
Oh yea. The chest would set itself there. LuaPlayer.opened in that case will point at the chest LuaEntity, there is no way to get a handle of the chest gui (or any other base game gui element). I just checked though and both defines.events.on_gui_opened and defines.events.on_gui_closed fire just fine for vanilla entities. So you just need to watch both of them, and open/close the gui accordingly. The events also both provide the entity handle directly. And it should be impossible for _opened to fire without _closed being next. (I.e. anything that forces a different _opened will first result in a _closed of the previous chest).Nividica wrote:Edit: I just realized that the opened chest gui is player.opened.... So I DO have a way (potentially) to get at the element... Such oversight, Much silly
Edit: Why do you think you need the chest gui?
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
So..basically no clue of your internal structure, but it should be as simple as:
Code: Select all
script.on_event(on_gui_closed,function(e)
if e.entity.name == 'logistic-chest' then
close_logistic_gui() -- e.entity.unit_number?
end)
end)
-
- Burner Inserter
- Posts: 14
- Joined: Sat Aug 01, 2015 2:31 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
Have a question:what`s better, big network or couple of smaller?
Re: [MOD 0.16.x] Storage Energistics
I have everything in one big network, both stuff from Bioindustries and Youkis and almost every original matreriels if it helps and I do not know how many chests that I have. I do have 5 broken networks somewhere but it is not a big issue. I managed to have 2 chests on 2 broken networks but I managed yesterday to find those chests with a new mod called Beastfinder https://mods.factorio.com/mod/BeastFinder and I have been looking for those 2 chests during a couple of hours but with beastfinder, I found them and fixed them within 5 min.chernosliv wrote:Have a question:what`s better, big network or couple of smaller?
We could add a standalone network for lets say: Youki Industries but it also sometimes use standard subitems lite plates and steel so one network should be enough as otherwise, you have to transfer some basic materiels between the different networks with bots or inserters. To avoid lag, combine your factory with belts because this mod takes a lot of CPU to run and it will cause short constant lagspikes, every second, but it is worth it.
//Pekka
Re: [MOD 0.16.x] Storage Energistics
I played around a bit with this mod in 0.16 ... felt a bit cheaty but that’s ok.
Any chance of this being ported to 0.17 ?
Any chance of this being ported to 0.17 ?
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [MOD 0.16.x] Storage Energistics
You lose control of the horde of undead posts you just necro'ed. They attack you and destroy your post count.
(It's pretty obvious that the mod is abandoned.)
(It's pretty obvious that the mod is abandoned.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: [MOD 0.16.x] Storage Energistics
Wrong! Viva la necromanolution!eradicator wrote: ↑Thu Oct 03, 2019 8:28 pm You lose control of the horde of undead posts you just necro'ed. They attack you and destroy your post count.
(It's pretty obvious that the mod is abandoned.)
https://mods.factorio.com/mod/re_storage_energistics