update: Rearrange code to pay non-sector military

Split upd_slmilcosts() into prep_ships() and prep_lands().  Move the
sanity check for dead ships and land units from prod_ships() and
prod_lands() there.  Move their call from prepare_sects() to its
caller, along with pay_reserve().

Create prep_planes() for symmetry.  Pilots are now paid at the same
time as other military.  Can matter only when the country goes broke
during the update.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-22 20:49:57 +02:00
parent 7951e91e3f
commit 5df43a5b3f
7 changed files with 88 additions and 59 deletions

View file

@ -98,6 +98,7 @@ extern int feed_people(short *, int);
extern double food_needed(short *, int);
extern int famine_victims(short *, int);
/* land.c */
extern void prep_lands(int, natid);
extern void prod_land(int, int, struct bp *, int);
/* main.c */
/* in server.h */
@ -121,6 +122,7 @@ extern void do_plague(struct sctstr *, int);
extern int plague_people(struct natstr *, short *, int *, int *, int);
extern void plague_report(natid, int, int, int, int, char *, char *);
/* plane.c */
extern void prep_planes(int, natid);
extern void prod_plane(int, int, struct bp *, int);
/* populace.c */
extern void populace(struct sctstr *, int);
@ -128,7 +130,6 @@ extern int total_work(int, int, int, int, int, int);
/* prepare.c */
extern void prepare_sects(int);
extern void tax(struct sctstr *, int);
extern void upd_slmilcosts(int, natid);
extern void bank_income(struct sctstr *, int);
extern void pay_reserve(struct natstr *, int);
/* produce.c */
@ -149,6 +150,7 @@ extern void spread_fallout(struct sctstr *, int);
extern void decay_fallout(struct sctstr *, int);
extern void produce_sect(struct natstr *, int, struct bp *);
/* ship.c */
extern void prep_ships(int, natid);
extern void prod_ship(int, int, struct bp *, int);
#endif