Repair Turret 2

by tiko13

A fork of Klonan's Repair Turret mod. It aims for repair turrets to be a complete replacement of construction bots (Logistic over time as well)

Content
3 days ago
2.0
845
Logistics Logistic network

b Interaction with Loaders Modernized

5 days ago

So I have noticed a new bug. If the repair turret system takes items too fast out of a logistic chest, any loaders connected to that chest by circuit don't update what it can see of the contents until you delete/undo them.

If you have it set to only turn on if under a certain number, and it starts off disabled, sometimes it won't start, and the chest empties completely.

I went through the belt section of my mall, and replaced them all with fast inserters, and wired them up the same, and could not repeat the issue.

4 days ago
(updated 4 days ago)

The issue is that the 'original' 1x1 loader which has been present in the game for like forever, does not interact with logistics correctly (I am not sure why, it's an engine thing - it seems it is not polling the network the same way as other entities do). Also I am using direct inventory manipulation instead of logistic network calls, which might contribute to the issue (I will try changing the logic to use native network and see how it performs)

By the way I have been cooking next big version for the past couple days, intended for massive builds, even if it seems a little OP

4 days ago
(updated 4 days ago)

OOoooo! can't wait. I currently have over 8k turrets in my base on Nauvis.

Last night I had been playing all day (my day off) and I noticed performance was crashing. It got to the point where I would place 1 inserter or belt, and the FPS/UPS would drop down to as low as 35 sometimes. However adding 1000 belts would have same impact. I tried restarting my whole computer, but it seemed to persist. This morning, I checked it, and it seems to be resolved. Who knows

Something I noticed, that may or may not be related, is that sometimes a chest will, for example, say 40/48 when you know there is only 20. If you open the chest, then close it, it updates properly. This may be base game bug, or AAI Warehouse issue, not sure yet.

4 days ago

I have pushed the new version today, with the new advanced turret you should be able to greatly reduce the number especially for big bases. I think the change to use network instead of inventory increased ups dramatically with insanely large builds (200k+), which I did not really expect, but well Factorio dev's optimization is in a league of its own (and its direct c++ which also helps :D )

4 days ago

12509 turrets rescanned!!! that took a few minutes to load. cant wait to try it out!

Update: Still getting a little lag, but since it builds so fast, the lag only last a few seconds before it's back up to speed.

BTW: There is a small bug I have forgotten to mention before, when using large containers like AAI Warehouses. Since they are 512 stacks, when you deconstruct a full one using your mod, it empties about half of it, then freezes. (old mod had same problem) If I deconstruct some empty chests one at a time, after 3 or 4 deconstructs it finishes. Hopefully without losing any items (which it sometimes does too)

4 days ago
(updated 4 days ago)

It seems to move exactly 200 stacks. With quality, those warehouses can be potentially upwards of 1280

4 days ago

I am actually using AAI warehouses and never experienced this lol :D, but its true I also never deconstructed them :D I will look at this today hopefully. Regarding quality I decided to go with advanced as a separate entity (I tried hard to scale it up to advanced levels using quality, but the engine just doesn't support changing stats that quality can apply to, so it's a nightmare trying to work around it)

3 days ago

The turret mod (original as well) creates the temp LuaInventory at a fixed 200 size, that's why it always removed 200 stacks, then got stuck, since this inventory never gets cleared.
I have added a check which increases the proxy inventory size if the number of stacks is bigger than 200 to whichever size is necessary (theoretically unlimited)

New response