tlongstretch / freeserf-with-AI-plus

THIS PROJECT WAS MOVED TO 'Forkserf', GO THERE INSTEAD
https://github.com/forkserf/forkserf
GNU General Public License v3.0
1 stars 0 forks source link

AI logic - expand_borders taking WAY too long, I think only after warehouses built #62

Closed tlongstretch closed 3 years ago

tlongstretch commented 3 years ago

I think there is an issue connecting new buildings to the road system once a Warehouse/Stock is built, I see lots of failures to connect when clearly it should be able to connect.

tlongstretch commented 3 years ago

looks like the issue is that get_affinity uses straightline dist to find nearest building and ignores associated Inventory, but the road connection is forced to be closest to the currently selected Inventory so it disallows any road from that flag.

Solution is likely to change get_affinity to only return buildings that are associated with the current Inventory building

tlongstretch commented 3 years ago

fixed