"Build_Building" city action
Posted: Tue Jul 01, 2025 9:38 am
If we are touching now non-unit-acted actions, we should think about an action of city changing production. It was one of the goals of creating AAK_* conception on the first hand: to provide several alternative requirement sets for a building. This action would be AAK_CITY, ATK_SELF, ASTK_IMPROVEMENT. But there is a problem: how current action enabler model works, the enablers don't consider the subtarget validity, leaving that to builtin subtarget reqs or other side mechanics. Thus, we are getting little moving this to enabler control. Local-ranged "Building" req for cities in the enablers stands for current production, but we run the enabler check before we switch it.
A solution I can see is just enriching the enabler structure with subtarget_reqs={...} part. That is usable in many more places though I have not dug this topic much enough to tell if it breaks some current generalized action logic anywhere. The builtin req vectors of buildings etc. may stay as periodically tested terms of that the thing survives in its place (but they currently do this thing not always), and also they remain hard reqs and-ed to any subtarget reqs.
A solution I can see is just enriching the enabler structure with subtarget_reqs={...} part. That is usable in many more places though I have not dug this topic much enough to tell if it breaks some current generalized action logic anywhere. The builtin req vectors of buildings etc. may stay as periodically tested terms of that the thing survives in its place (but they currently do this thing not always), and also they remain hard reqs and-ed to any subtarget reqs.