Feature #553
closeddai_manage_unit(): Use utype advisor cache instead of checking UTYF_WORKERS
0%
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
Updated by Marko Lindqvist 7 months ago
- File 0074-AI-Use-ptype-adv.worker-in-dai_manage_unit.patch 0074-AI-Use-ptype-adv.worker-in-dai_manage_unit.patch added
- File 0053-AI-Use-ptype-adv.worker-in-dai_manage_unit.patch 0053-AI-Use-ptype-adv.worker-in-dai_manage_unit.patch added
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Updated by David Fernandez 6 months ago
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.
Updated by David Fernandez 6 months ago
Btw, my tests were with the head of S3_1 that also includes the patch AI-Cache-worker-by-unit-s-possible-actions.patch