Upgraded workers not requested properly in productionsites
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Reported on the forum:
Recently I noticed that a workers place in a new built mine will only be occupied by exactly a miner with the requested level. This means that a mine where for example a level 2 miner is missing is not occupied although there are some level 3 miners available in the warehouse. In the past a free level 3 miner did occupy any "employment" possible. A level 2 miner did occupy any open level 1 or level 2 working place. Again my questin is this intentional. If yes I'd like to suggest to go back to the old behaviour, because currently you collect level 3 miners in your warehouse. (in my game I had 18 level 3 miners in the warehouses and 5 mines not occupied).
https:/
Related branches
- GunChleoc: Disapprove
-
Diff: 159 lines (+14/-14)11 files modifieddata/tribes/buildings/productionsites/barbarians/coalmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/barbarians/coalmine_deeper/init.lua (+2/-2)
data/tribes/buildings/productionsites/barbarians/goldmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/barbarians/goldmine_deeper/init.lua (+2/-2)
data/tribes/buildings/productionsites/barbarians/ironmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/barbarians/ironmine_deeper/init.lua (+2/-2)
data/tribes/buildings/productionsites/barbarians/warmill/init.lua (+1/-1)
data/tribes/buildings/productionsites/empire/coalmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/empire/goldmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/empire/ironmine_deep/init.lua (+1/-1)
data/tribes/buildings/productionsites/empire/marblemine_deep/init.lua (+1/-1)
- TiborB: Approve
-
Diff: 87 lines (+37/-8)3 files modifiedsrc/logic/map_objects/tribes/warehouse.cc (+7/-7)
src/logic/map_objects/tribes/warehouse.h (+1/-1)
test/maps/plain.wmf/scripting/test_upgraded_workers.lua (+29/-0)
Changed in widelands: | |
status: | In Progress → Confirmed |
description: | updated |
Changed in widelands: | |
milestone: | none → build20-rc1 |
Changed in widelands: | |
status: | Confirmed → Fix Committed |
Requesting exactly correct "type" of miner is sometimes justified.
What if the mine would first request a miner (level=x), and set a timeout. If the request is still not fulfilled, in the sense that the economy has not allocated a miner for that slot when the timeout expires, then the request would be canceled and the mine would request a (level>=x) worker instead.
If a player is upgrading more than one mine at a time, the old way has its share of problems as well.
Downside is that there would be yet another magic number (=timeout value) around.