Freecol version: 0.12.0 revision 751a5bbe5
Description:
In the save file attached, the colony of Elbing is about to complete a Lumbermill.
The Lumbermill is at 45/52 production, and the Carpenter is scheduled to add 8 more production.
Elbing has a stockpile of 85 Lumber.
I was curious as to whether finishing the project would consume 8 Lumber, or just 7 (because the Lumbermill needs only 7 production to finish), so I noted the Lumber levels.
The next turn, the Lumber stocks were down to 71 Lumber; 14 had been consumed!
To reproduce:
Load the attached save-game.
Note the Lumber stockpile in Elbing (85)
End the turn
Check Lumber in Elbing again (should be 71)
Thoughts
It seems as though the amount of wood consumed by the construction of the Lumbermill was boosted by the Mill itself? That seems like a bug.
I suspect an error in the order of events in the processing of the Production phase in a colony, since the amount of Lumber consumed is being determined by something that takes place after the Construction of the Lumbermill.
I suppose of course that this could just be faithfully reproducing a bug in the original Colonization (would need to double-check this)...but I thought I'd point it out, since it could potentially indicate a bug that affects other things as well.
Lingering question:
How much would SHOULD be consumed in this case?
8 Lumber because the colony was making 8 Production?
7 Lumber because the build task only used 7 Production?
That depends on game options.
Check Game Options > Colony Options > Save production overflow
In the attached game that is unset, so hammers are not saved.
I personally have it enabled always adn did not check the code, but I do expect 7 hammers to be produced equals 7 lumber used.
It'll be nice once FreeCol2 begins and actual decisions about game design can be made instead of endless check-boxes for "Use old buggy feature? (yes/no)"
The problem is that when the building upgrade fires it increases the production from 8 to 14 hammers and that this is still applied despite the build queue now being empty. I have probably never seen this due to rarely having an empty build queue in an early stage colony where it is noticeable. I believe that 7 lumber should be consumed.
There are actually two bugs here, and the end-of-turn-in-colony code is very tricky. In git.fcd04a5b the colony now consumes 8 lumber. I now believe I was wrong about 7, apparently production overflow is intended to happen, and yes, that is a good thing to fix in FreeCol2. The second bug is that after the turn ends, the new Lumber Mill is shown to be producing hammers although the colony is not building anything. Looking at that next.
Ticket moved from /p/freecol/bugs/3261/
...and I was wrong again. Producing hammers into an empty build queue is allowed. I think it should not happen, but it is easy to avoid so of minor impact. Therefore I am reclassifying this as an IR to remind someone (hopefully myself) to fix it.