budget: Fix for ship, plane, land unit building abroad
The budget command simulates an update by running selected parts of the update code. It skips parts that depend on hidden information such as guerrilla warfare. For speed, it also skips parts it doesn't need, such as distribution and foreign sectors, ships, planes and land units. Skipping foreign sectors is wrong when any of the player's ships, planes or land units will be repaired in foreign sectors, because it makes budget use old materials and work instead of new. Skipping foreign ships, planes and land units is wrong when they compete with the player's for materials and work. The bug goes back to Chainsaw's option BUDGET. See the previous commit for more detailed historical notes. The update test demonstrates it in several variations. Fix it with the sledgehammer: don't skip foreign sectors, ships, planes and land units. This makes budget almost twenty times slower in my testing. Probably tolerable on a reasonably beefy machine, but we can do better; the next few commits will claw back most of the lost performance. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
459dec0af0
commit
70f69640e1
8 changed files with 57 additions and 51 deletions
|
@ -1,12 +1,5 @@
|
|||
budget
|
||||
| Note: f1#100 not actually built (plague kills off mil)
|
||||
| BUG: missing cs#91
|
||||
| BUG: mispredicts f1#75..78
|
||||
| BUG: missing f1#91
|
||||
| BUG: missing f1#92
|
||||
| BUG: f1#100 not actually built
|
||||
| BUG: missing inf#91
|
||||
| BUG: missing inf#92
|
||||
| TODO is it accurate?
|
||||
neweff * ?newd#-
|
||||
production *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue