has_workers broken (affects AI when considering upgrade)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
TiborB |
Bug Description
While working on AI, I found that function ProductionSite:
AI is relying on it when considering if it has experienced worker for upgrade.
Also one important point is that array working_positions = {} in productionsites should start with highest needed worker, because has_workers checks explicitly for first worker (and only first one). Or is there better way how has_workers can say which worker is experienced and must be tested for presence and which can be directly created from working tool in warehouse?
Let me know.
Also I hope reordering in working_positions will not hurt anything. (If there is way how to distinguish experienced workers from novices, this will not be needed, of course)
Related branches
- GunChleoc: Approve
-
Diff: 75 lines (+38/-14)1 file modifiedsrc/logic/productionsite.cc (+38/-14)
Changed in widelands: | |
assignee: | nobody → TiborB (tiborb95) |
Changed in widelands: | |
importance: | Undecided → Low |
status: | New → Fix Committed |
Changed in widelands: | |
milestone: | none → build19-rc1 |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
worker has is_buildable() flag, so perhaps this can be used to filter out novices from experienced (upgraded) workers. I will test it...