Factory entrances
Moderators: hoijui, Moderators
Factory entrances
How would I determine programmatically what edges of a footprint are factory exits?
Guess you should use a mini pathfinder over the YardMap (Dijkstra's algorithm over this small kind of area can be implemented in very little code I think). Just find a path / the paths from the middle to "the outside" for open YardMap state.
Though I don't think factories really *have* to create their units in their center, I dont recall seeing any factories in any mods which didn't, plus it's impossible to access the model data / COB stuff through the AI anyway, AFAIK. So starting at the center seems a good approximation.
Though I don't think factories really *have* to create their units in their center, I dont recall seeing any factories in any mods which didn't, plus it's impossible to access the model data / COB stuff through the AI anyway, AFAIK. So starting at the center seems a good approximation.