budget: Fix level prod. forecast when required level is too low
When the required level is too low for production, produce() returns early. Except when simulating. Messed up when Empire 3 made the update code work for budget. This can make budget show level production even when it's not actually possible. In the stock game, this can happen for tech and research, which require education > 5.0. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
fdde783278
commit
55dcbaa8da
3 changed files with 8 additions and 9 deletions
|
@ -96,10 +96,11 @@ produce(struct natstr *np, struct sctstr *sp, int *cost)
|
|||
return 0;
|
||||
|
||||
prodeff = prod_eff(sp->sct_type, np->nat_level[product->p_nlndx]);
|
||||
if (prodeff <= 0.0 && !player->simulation) {
|
||||
wu(0, sp->sct_own,
|
||||
"%s level too low to produce in %s (need %d)\n",
|
||||
levelnames[product->p_nlndx], ownxy(sp), product->p_nlmin);
|
||||
if (prodeff <= 0.0) {
|
||||
if (!player->simulation)
|
||||
wu(0, sp->sct_own,
|
||||
"%s level too low to produce in %s (need %d)\n",
|
||||
levelnames[product->p_nlndx], ownxy(sp), product->p_nlmin);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue