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:
Markus Armbruster 2016-06-18 17:00:16 +02:00
parent 16f9a393c4
commit 2eb08f40c7
10 changed files with 148 additions and 143 deletions

View file

@ -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.");