Use int instead of long for money
Code dealing with money mixes int and long pretty haphazardly. Harmless, because practical amounts of money fit into int on any machine capable of running the server. Clean up anyway.
This commit is contained in:
parent
5ed02791f5
commit
5f46ced826
24 changed files with 73 additions and 73 deletions
|
@ -51,11 +51,11 @@ void bp_put_avail(struct bp *, struct sctstr *, int);
|
|||
|
||||
int get_materials(struct sctstr *, struct bp *, int *, int);
|
||||
|
||||
extern long money[MAXNOC];
|
||||
extern int money[MAXNOC];
|
||||
extern int pops[MAXNOC];
|
||||
extern long sea_money[MAXNOC];
|
||||
extern long lnd_money[MAXNOC];
|
||||
extern long air_money[MAXNOC];
|
||||
extern int sea_money[MAXNOC];
|
||||
extern int lnd_money[MAXNOC];
|
||||
extern int air_money[MAXNOC];
|
||||
extern int tpops[MAXNOC];
|
||||
extern float levels[MAXNOC][4];
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* Known contributors to this file:
|
||||
* Marc Olzheim, 2004
|
||||
* Markus Armbruster, 2004-2012
|
||||
* Markus Armbruster, 2004-2013
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -208,7 +208,7 @@ EMPCFBOTH("players_at_00", players_at_00, int, NSC_INT, 0,
|
|||
"Players have their coordinate system at deity 0,0 (0 - no, 1 - yes)")
|
||||
EMPCFBOTH("at_least_one_100", at_least_one_100, int, NSC_INT, KM_INTERNAL,
|
||||
"Initialize new countries with at least one sector with 100 of all resource")
|
||||
EMPCFBOTH("start_cash", start_cash, long, NSC_LONG, KM_INTERNAL,
|
||||
EMPCFBOTH("start_cash", start_cash, int, NSC_INT, KM_INTERNAL,
|
||||
"Starting cash for new countries")
|
||||
|
||||
EMPCF_COMMENT("\n\n### Technology/Research/Education/Happiness")
|
||||
|
|
|
@ -52,8 +52,8 @@ struct lonstr {
|
|||
signed char l_status; /* loan status */
|
||||
int l_irate; /* interest rate */
|
||||
int l_ldur; /* intended duration */
|
||||
long l_amtpaid; /* amount paid so far */
|
||||
long l_amtdue; /* amount still owed */
|
||||
int l_amtpaid; /* amount paid so far */
|
||||
int l_amtdue; /* amount still owed */
|
||||
time_t l_lastpay; /* date of most recent payment */
|
||||
time_t l_duedate; /* date after which interest doubles, etc */
|
||||
};
|
||||
|
|
|
@ -106,7 +106,7 @@ struct natstr {
|
|||
short nat_btu; /* bureaucratic time units */
|
||||
short nat_access; /* The tick when BTUs were last updated */
|
||||
int nat_reserve; /* military reserves */
|
||||
long nat_money; /* moola */
|
||||
int nat_money; /* moola */
|
||||
time_t nat_last_login; /* time of last login, 0 menas never */
|
||||
time_t nat_last_logout; /* time of last logout, 0 means never */
|
||||
time_t nat_newstim; /* date news last read */
|
||||
|
|
|
@ -728,7 +728,7 @@ extern void sail_ship(natid);
|
|||
extern void do_fallout(struct sctstr *, int);
|
||||
extern void spread_fallout(struct sctstr *, int);
|
||||
extern void decay_fallout(struct sctstr *, int);
|
||||
extern void produce_sect(int, int, struct bp *, long [][2]);
|
||||
extern void produce_sect(int, int, struct bp *, int[][2]);
|
||||
/* ship.c */
|
||||
extern int prod_ship(int, int, struct bp *, int);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ struct trdstr {
|
|||
/* end of part matching struct empobj */
|
||||
short trd_type;
|
||||
int trd_unitid;
|
||||
long trd_price;
|
||||
int trd_price;
|
||||
int trd_maxbidder;
|
||||
time_t trd_markettime;
|
||||
coord trd_x; /* destination for teleporting trade */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue