LuaEntityPrototype - max_underground_distance
Posted: Fri Oct 21, 2016 2:13 am
When looking at pipe-to-ground ("p-t-g") LuaEntityPrototype in control.lua, the `max_underground_distance` doesn't seem to be exposed - any chance it could be added?
Context: I'm using these entities for bridges, and when a segment (simple-entity) between two p-t-g's gets destroyed I search X tiles along relevant axis to find the "parent" p-t-g. To keep that search area small as possible, I've currently hard-coded the distance, but am at a point (remote interface) where it would really be better to pull it from LuaEntityPrototype rather than have two definitions of the value which could go out of sync.
Context: I'm using these entities for bridges, and when a segment (simple-entity) between two p-t-g's gets destroyed I search X tiles along relevant axis to find the "parent" p-t-g. To keep that search area small as possible, I've currently hard-coded the distance, but am at a point (remote interface) where it would really be better to pull it from LuaEntityPrototype rather than have two definitions of the value which could go out of sync.