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 - measures to stop accumulating resources don't work when straightline-closest-stock is not flag-closest stock #57

Closed tlongstretch closed 3 years ago

tlongstretch commented 3 years ago

When castle or a warehouse reaches XXX_max AI tuning param, the AI will destroy excess producers attached to that stock to avoid clogging roads. However, because each stock is handled independently, and "nearest stock" by straightline distance is used to determine which stock a producer building is attached to, when the closest stock by FLAGSEARCH distance is not the same stock, the produce will never be throttled and will keep piling resources up in a stock that may already be over max.

A way to avoid this might be to change the throttling checks to use flagsearch distance instead of straight line dist?

tlongstretch commented 3 years ago

changed all these checks to use closest by flag instead