budget: Track ship, plane, land unit expenses in nat_budget[]
Extend struct budget member bm[] to cover ships, planes and land units, too. Plane maintenance changes because pilot pay is now consistently rounded down. Before it was rounded down for broke countries, else up. The stock game's pilots earn a little less than $25, and solvent countries save $1 per plane. The rounding doesn't make much sense either way. To be be addressed in a later commit. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
16f9a393c4
commit
2eb08f40c7
10 changed files with 148 additions and 143 deletions
|
@ -123,6 +123,12 @@ update_main(void)
|
|||
prod_ship(etu, i, NULL, 1);
|
||||
prod_plane(etu, i, NULL, 1);
|
||||
prod_land(etu, i, NULL, 1);
|
||||
sea_money[i] += nat_budget[i].bm[BUDG_SHP_MAINT].money
|
||||
+ nat_budget[i].bm[BUDG_SHP_BUILD].money;
|
||||
air_money[i] += nat_budget[i].bm[BUDG_PLN_MAINT].money
|
||||
+ nat_budget[i].bm[BUDG_PLN_BUILD].money;
|
||||
lnd_money[i] += nat_budget[i].bm[BUDG_LND_MAINT].money
|
||||
+ nat_budget[i].bm[BUDG_LND_BUILD].money;
|
||||
}
|
||||
logerror("done producing for countries.");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue