Feature #553
closed
dai_manage_unit(): Use utype advisor cache instead of checking UTYF_WORKERS
Added by Marko Lindqvist 7 months ago.
Updated 6 months ago.
Description
Use utype->adv.worker instead of checking UTYF_WORKERS directly in dai_manage_unit(). It will do the right thing also in the future when workerness is not exactly same as UTYF_WORKERS flag.
Files
- Status changed from In Review to Closed
First, thank you for solving my registration issue.
I have been testing this patch and it seems to allow AI to handle properly infantry units with Settlers flag.
But I think AI builds those units (infantry with Settlers flag) thinking they are workers, and it hardly builds actual workers/engineers.
In my tests it can be fixed by editing units.ruleset, moving the entries of workers/engineers to the bottom of the file (below the infantry that can build bases). But I'm still not sure if the resultant AI behavior is exactly the same as when I simply patch freeciv to allow infantry to build bases without needing the Settlers flag.
Btw, my tests were with the head of S3_1 that also includes the patch AI-Cache-worker-by-unit-s-possible-actions.patch
Also available in: Atom
PDF