Add power switch to the LuaEntity::neighbours
Posted: Wed Aug 31, 2016 1:02 pm
I have started to implement some statistic features for electricity network (such as max. available power, max. consumption, stored energy and so on) and I need to get all entities connected to the one network. I can already get all poles in the network using LueEntity::neighbours unless there is a power switch - just because I can't get connected power switches via Lua script.
So in would be nice, if the power switch will be added to the LueEntity::neighbours structure.
And the another thing, there could be a new method/variable in the "pole type" LuaEnity, that returns all entities powered by that pole (or just make "supply_area_distance" from prototype accessible via Lua).
So in would be nice, if the power switch will be added to the LueEntity::neighbours structure.
And the another thing, there could be a new method/variable in the "pole type" LuaEnity, that returns all entities powered by that pole (or just make "supply_area_distance" from prototype accessible via Lua).