API for accessing the entity state (enabled/disabled)
Posted: Mon Aug 08, 2016 6:31 pm
So now, I am making an official request for an API for accessing the entity state, whether it is enabled or disabled, based on its logistic network condition, circuit network operation mode and circuit network condition. It will be useful for transport belts and inserters.
Long story short, I have asked about the same thing here: viewtopic.php?f=25&t=27724. I came up with a snippet and used it in Creative Mode. However, during my battle against the performance issue, I found out that "control.circuit_condition" has poor performance that you can really see the FPS difference when you have quite a number of Item Sources/Item Voids/Duplicators unwired vs wired.
78 Item Voids - unwired = 60 FPS vs wired = 52 FPS
Providing an API like "LuaEntity.enabled" can solve 2 problems:
1) no more custom snippets. Different mods can use the same piece of code. Elegant. Tiny. Clean and tidy.
2) performance should be much better.
Long story short, I have asked about the same thing here: viewtopic.php?f=25&t=27724. I came up with a snippet and used it in Creative Mode. However, during my battle against the performance issue, I found out that "control.circuit_condition" has poor performance that you can really see the FPS difference when you have quite a number of Item Sources/Item Voids/Duplicators unwired vs wired.
78 Item Voids - unwired = 60 FPS vs wired = 52 FPS
Providing an API like "LuaEntity.enabled" can solve 2 problems:
1) no more custom snippets. Different mods can use the same piece of code. Elegant. Tiny. Clean and tidy.
2) performance should be much better.