extern int do_unit_move(struct emp_qelem *, int *, double *, double *);
extern int count_pop(int);
extern int scuttle_tradeship(struct shpstr *, int);
-extern void resnoise(struct sctstr *, int, char *, int, int);
+extern void resnoise(struct sctstr *, char *, int, int);
extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
extern char *prsub(struct shpstr *);
switch (char0) {
case 'i':
if (sect.sct_own != 0)
- resnoise(§, 1, "Iron ore content",
- (int)sect.sct_min, amt);
+ resnoise(§, "Iron ore content", sect.sct_min, amt);
sect.sct_min = (unsigned char)amt;
break;
case 'g':
if (sect.sct_own != 0)
- resnoise(§, 1, "Gold content",
- (int)sect.sct_gmin, amt);
+ resnoise(§, "Gold content", sect.sct_gmin, amt);
sect.sct_gmin = (unsigned char)amt;
break;
case 'o':
if (sect.sct_own != 0)
- resnoise(§, 1, "Oil content", (int)sect.sct_oil, amt);
+ resnoise(§, "Oil content", sect.sct_oil, amt);
sect.sct_oil = (unsigned char)amt;
break;
case 'f':
if (sect.sct_own != 0)
- resnoise(§, 1, "Fertility content",
- (int)sect.sct_fertil, amt);
+ resnoise(§, "Fertility content", sect.sct_fertil, amt);
sect.sct_fertil = (unsigned char)amt;
break;
case 'u':
if (sect.sct_own != 0)
- resnoise(§, 1, "Uranium content",
- (int)sect.sct_uran, amt);
+ resnoise(§, "Uranium content", sect.sct_uran, amt);
sect.sct_uran = (unsigned char)amt;
break;
default:
if (current > 100)
current = 100;
if (sect.sct_own != 0)
- resnoise(§, 1, "Iron ore content",
- (int)sect.sct_min, current);
+ resnoise(§, "Iron ore content", sect.sct_min, current);
sect.sct_min = (unsigned char)current;
break;
case 'g':
if (current > 100)
current = 100;
if (sect.sct_own != 0)
- resnoise(§, 1, "Gold content",
- (int)sect.sct_gmin, current);
+ resnoise(§, "Gold content", sect.sct_gmin, current);
sect.sct_gmin = (unsigned char)current;
break;
case 'o':
if (current > 100)
current = 100;
if (sect.sct_own != 0)
- resnoise(§, 1, "Oil content",
- (int)sect.sct_oil, current);
+ resnoise(§, "Oil content", sect.sct_oil, current);
sect.sct_oil = (unsigned char)current;
break;
case 'w':
if (current > MINES_MAX)
current = MINES_MAX;
if (sect.sct_own != 0 && sect.sct_own == sect.sct_oldown)
- resnoise(§, 1, "Mines", sect.sct_mines, current);
+ resnoise(§, "Mines", sect.sct_mines, current);
sect.sct_mines = current;
break;
case 'o':
if (current > 100)
current = 100;
if (sect.sct_own != 0)
- resnoise(§, 1, "Fertility content",
- (int)sect.sct_fertil, current);
+ resnoise(§, "Fertility content", sect.sct_fertil, current);
sect.sct_fertil = (unsigned char)current;
break;
case 'u':
if (current > 100)
current = 100;
if (sect.sct_own != 0)
- resnoise(§, 1, "Uranium content",
- (int)sect.sct_uran, current);
+ resnoise(§, "Uranium content", sect.sct_uran, current);
sect.sct_uran = (unsigned char)current;
break;
default:
}
void
-resnoise(struct sctstr *sptr, int public_amt, char *name, int old,
- int new)
+resnoise(struct sctstr *sptr, char *name, int old, int new)
{
- char p[100];
-
pr("%s of %s changed from %d to %d\n",
name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
- if (public_amt)
- (void)sprintf(p, "changed from %d to %d", old, new);
- else
- (void)sprintf(p, "%s", old < new ? "increased" : "decreased");
if (sptr->sct_own)
wu(0, sptr->sct_own,
- "%s in %s was %s by an act of %s\n",
+ "%s in %s was changed from %d to %d by an act of %s\n",
name, xyas(sptr->sct_x, sptr->sct_y, sptr->sct_own),
- p, cname(player->cnum));
+ old, new, cname(player->cnum));
resbenefit(sptr->sct_own, (old < new));
}