update budget: Fix civ counting for happiness and education
Per-civilian happiness and education production is raw production divided by the number of old-owned civilians. The update reports the number of old-owned civilians ("total pop was %d"). This number of civilians is also used by budget to predict cost of tech when option TECH_POP is enabled, but that doesn't match how the update computes the cost. To be fixed next. Civilians loaded on ships are only counted by the update, not by budget. Harmless, as budget doesn't compute happiness and education. Civilians loaded on land units are ignored by both. None of the stock game's land units can load civilians. Civilians in sectors are counted before plague deaths, and in ships afterwards. Fix upd_ship() and upd_land() to count civilians the same way as prepare_sects() does for sectors. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
6eb4fd3cbf
commit
14f3bd9717
4 changed files with 5 additions and 4 deletions
|
@ -102,6 +102,7 @@ upd_land(struct lndstr *lp, int etus, struct bp *bp, int build)
|
|||
if (!player->simulation)
|
||||
lp->lnd_off = 0;
|
||||
} else {
|
||||
budget->oldowned_civs += lp->lnd_item[I_CIVIL];
|
||||
mult = 1;
|
||||
if (np->nat_level[NAT_TLEV] < lp->lnd_tech * 0.85)
|
||||
mult = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue