}
}
-static void
-benefit(natid who, int goodness)
-{
- if (opt_GODNEWS && getnatp(who)->nat_stat != STAT_GOD && goodness)
- nreport(player->cnum, goodness > 0 ? N_AIDS : N_HURTS, who, 1);
-}
-
static void
noise(struct sctstr *sptr, char *name, int old, int new)
{
case 'n':
if (!check_nat_name(p, nat))
return RET_SYN;
- pr("Country name changed from %s to %s\n", np->nat_cnam, p);
+ divine_nat_change(np, "Country name", strcmp(np->nat_cnam, p), 0,
+ "from %s to %s", np->nat_cnam, p);
+ if (opt_GODNEWS)
+ nreport(player->cnum, N_NAME_CHNG, 0, 1);
strcpy(np->nat_cnam, p);
break;
case 'r':
- pr("Country representative changed from %s to %s\n",
- np->nat_pnam, p);
+ divine_nat_change(np, "Country representative",
+ strncmp(p, np->nat_pnam, sizeof(np->nat_pnam) - 1), 0,
+ "from %s to %.*s",
+ np->nat_pnam, (int)sizeof(np->nat_pnam) - 1, p);
strncpy(np->nat_pnam, p, sizeof(np->nat_pnam) - 1);
break;
case 't':
break;
case 'b':
arg = LIMIT_TO(arg, 0, max_btus);
- pr("BTU's changed from %d to %d\n", np->nat_btu, arg);
+ divine_nat_change(np, "BTUs",
+ arg != np->nat_btu, arg - np->nat_btu,
+ "from %d to %d", np->nat_btu, arg);
np->nat_btu = arg;
break;
case 'm':
arg = LIMIT_TO(arg, 0, INT_MAX);
- benefit(nat, arg - np->nat_reserve);
- pr("Military reserves changed from %d to %d\n",
- np->nat_reserve, arg);
- if (arg == np->nat_reserve)
- break;
- if (nat != player->cnum)
- wu(0, nat,
- "Military reserves changed from %d to %d by an act of %s\n",
- np->nat_reserve, arg, cname(player->cnum));
+ divine_nat_change(np, "Military reserves",
+ arg != np->nat_reserve, arg - np->nat_reserve,
+ "from %d to %d", np->nat_reserve, arg);
np->nat_reserve = arg;
break;
case 'c':
if (!sarg_xy(p, &newx, &newy))
return RET_SYN;
- pr("Capital coordinates changed from %s to %s\n",
- xyas(np->nat_xcap, np->nat_ycap, player->cnum),
- xyas(newx, newy, player->cnum));
+ if (newx == np->nat_xcap && newy == np->nat_ycap)
+ pr("Capital unchanged\n");
+ else {
+ pr("Capital moved from %s to %s\n",
+ xyas(np->nat_xcap, np->nat_ycap, player->cnum),
+ xyas(newx, newy, player->cnum));
+ if (nat != player->cnum)
+ wu(0, nat,
+ "Capital moved from %s to %s by an act of %s!\n",
+ xyas(np->nat_xcap, np->nat_ycap, nat),
+ xyas(newx, newy, nat), cname(player->cnum));
+ }
np->nat_xcap = newx;
np->nat_ycap = newy;
break;
case 'o':
if (!sarg_xy(p, &newx, &newy))
return RET_SYN;
- pr("Origin coordinates changed from %s to %s\n",
- xyas(np->nat_xorg, np->nat_yorg, player->cnum),
- xyas(newx, newy, player->cnum));
+ if (newx == np->nat_xorg && newy == np->nat_yorg)
+ pr("Origin unchanged\n");
+ else {
+ pr("Origin moved from %s to %s\n",
+ xyas(np->nat_xorg, np->nat_yorg, player->cnum),
+ xyas(newx, newy, player->cnum));
+ if (nat != player->cnum)
+ wu(0, nat,
+ "Origin moved from %s to %s by an act of %s!\n",
+ xyas(np->nat_xorg, np->nat_yorg, nat),
+ xyas(newx, newy, nat), cname(player->cnum));
+ }
np->nat_xorg = newx;
np->nat_yorg = newy;
break;
break;
case 'u':
arg = LIMIT_TO(arg, 0, m_m_p_d * 60);
- pr("Number of seconds used changed from %d to %d.\n",
- np->nat_timeused, arg);
+ divine_nat_change(np, "Number of seconds used",
+ arg != np->nat_timeused, arg - np->nat_timeused,
+ "from %d to %d", np->nat_timeused, arg);
np->nat_timeused = arg;
break;
case 'M':
- pr("Money changed from %d to %d\n", np->nat_money, arg);
- if (arg == np->nat_money)
- break;
- if (nat != player->cnum)
- wu(0, nat, "Money changed from %d to %d by an act of %s\n",
- np->nat_money, arg, cname(player->cnum));
+ divine_nat_change(np, "Money",
+ arg != np->nat_money, arg - np->nat_money,
+ "from %d to %d", np->nat_money, arg);
np->nat_money = arg;
break;
case 'T':
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 b 0
Play#0 command edit
- Play#0 output Play#0 1 BTU's changed from 0 to 0
+ Play#0 output Play#0 1 BTUs of 1 (#1) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 b -1
Play#0 command edit
- Play#0 output Play#0 1 BTU's changed from 0 to 0
+ Play#0 output Play#0 1 BTUs of 2 (#2) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 3 b 640
Play#0 command edit
- Play#0 output Play#0 1 BTU's changed from 0 to 640
+ Play#0 output Play#0 1 BTUs of 3 (#3) changed from 0 to 640
Play#0 output Play#0 6 0 640
Play#0 input edit c 4 b 641
Play#0 command edit
- Play#0 output Play#0 1 BTU's changed from 0 to 640
+ Play#0 output Play#0 1 BTUs of 4 (#4) changed from 0 to 640
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 m 0
Play#0 command edit
- Play#0 output Play#0 1 Military reserves changed from 0 to 0
+ Play#0 output Play#0 1 Military reserves of 1 (#1) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 m -1
Play#0 command edit
- Play#0 output Play#0 1 Military reserves changed from 0 to 0
+ Play#0 output Play#0 1 Military reserves of 2 (#2) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 3 m 2147483647
Play#0 command edit
- Play#0 output Play#0 1 Military reserves changed from 0 to 2147483647
+ Play#0 output Play#0 1 Military reserves of 3 (#3) changed from 0 to 2147483647
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 u 0
Play#0 command edit
- Play#0 output Play#0 1 Number of seconds used changed from 0 to 0.
+ Play#0 output Play#0 1 Number of seconds used of 1 (#1) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 u -1
Play#0 command edit
- Play#0 output Play#0 1 Number of seconds used changed from 0 to 0.
+ Play#0 output Play#0 1 Number of seconds used of 2 (#2) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 3 u 86400
Play#0 command edit
- Play#0 output Play#0 1 Number of seconds used changed from 0 to 86400.
+ Play#0 output Play#0 1 Number of seconds used of 3 (#3) changed from 0 to 86400
Play#0 output Play#0 6 0 640
Play#0 input edit c 4 u 86401
Play#0 command edit
- Play#0 output Play#0 1 Number of seconds used changed from 0 to 86400.
+ Play#0 output Play#0 1 Number of seconds used of 4 (#4) changed from 0 to 86400
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 M -2147483648
Play#0 command edit
- Play#0 output Play#0 1 Money changed from 0 to -2147483648
+ Play#0 output Play#0 1 Money of 1 (#1) changed from 0 to -2147483648
Play#0 output Play#0 6 0 640
Play#0 input edit c 3 M 2147483647
Play#0 command edit
- Play#0 output Play#0 1 Money changed from 0 to 2147483647
+ Play#0 output Play#0 1 Money of 3 (#3) changed from 0 to 2147483647
Play#0 output Play#0 6 0 640
Play#0 input edit c 6 t -1
Play#0 command edit
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 n 2
Play#0 command edit
- Play#0 output Play#0 1 Country name changed from 2 to 2
+ Play#0 output Play#0 1 Country name of 2 (#2) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 3 n drei
Play#0 command edit
- Play#0 output Play#0 1 Country name changed from 3 to drei
+ Play#0 output Play#0 1 Country name of 3 (#3) changed from 3 to drei
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 r 1
Play#0 command edit
- Play#0 output Play#0 1 Country representative changed from 1 to 1
+ Play#0 output Play#0 1 Country representative of 1 (#1) unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 r 012345678901234567890123456789
Play#0 command edit
- Play#0 output Play#0 1 Country representative changed from 2 to 012345678901234567890123456789
+ Play#0 output Play#0 1 Country representative of 2 (#2) changed from 2 to 0123456789012345678
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 c 0,0
Play#0 command edit
- Play#0 output Play#0 1 Capital coordinates changed from 0,0 to 0,0
+ Play#0 output Play#0 1 Capital unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 c 2,0
Play#0 command edit
- Play#0 output Play#0 1 Capital coordinates changed from 0,0 to 2,0
+ Play#0 output Play#0 1 Capital moved from 0,0 to 2,0
Play#0 output Play#0 6 0 640
Play#0 input edit c 1 o 0,0
Play#0 command edit
- Play#0 output Play#0 1 Origin coordinates changed from 0,0 to 0,0
+ Play#0 output Play#0 1 Origin unchanged
Play#0 output Play#0 6 0 640
Play#0 input edit c 2 o 2,0
Play#0 command edit
- Play#0 output Play#0 1 Origin coordinates changed from 0,0 to 2,0
+ Play#0 output Play#0 1 Origin moved from 0,0 to 2,0
Play#0 output Play#0 6 0 640
Play#0 input edit c 6 s 0
Play#0 command edit
Play#0 output Play#0 1 Telegrams <t>: 0
Play#0 output Play#0 4 %c xxxxx -- thing value :
Play#0 input b 640
- Play#0 output Play#0 1 BTU's changed from 0 to 640
+ Play#0 output Play#0 1 BTUs of 5 (#5) changed from 0 to 640
Play#0 output Play#0 4 %c xxxxx -- thing value :
Play#0 input T 1
Play#0 output Play#0 1 Technology of 5 (#5) changed from 0.00 to 1.00
Play#0 output Play#0 1 POGO gave you 1 civilians in 8,6
Play#0 output Play#0 1 POGO gave you 9997 civilians in 6,6
Play#0 output Play#0 1 POGO stole 1 civilians from 8,6
- Play#0 output Play#0 1 Money changed from 0 to -2147483648 by an act of POGO
+ Play#0 output Play#0 1 Money changed from 0 to -2147483648 by an act of POGO!
Play#0 output Play#0 1 Technology changed from 0.00 to 3.14 by an act of POGO!
Play#0 output Play#0 1 Research changed from 0.00 to 3.14 by an act of POGO!
Play#0 output Play#0 1 Education changed from 0.00 to 3.14 by an act of POGO!
Play#0 output Play#0 1 Research changed from 0.00 to 100.00 by an act of POGO!
Play#0 output Play#0 1 Education changed from 0.00 to 100.00 by an act of POGO!
Play#0 output Play#0 1 Happiness changed from 0.00 to 100.00 by an act of POGO!
+ Play#0 output Play#0 1 Capital moved from 0,0 to 2,0 by an act of POGO!
+ Play#0 output Play#0 1 Origin moved from 0,0 to 2,0 by an act of POGO!
Play#0 output Play#0 6 0 640
Play#0 input read 3
Play#0 command read
Play#0 output Play#0 1 sup supply #4 loaded onto land #4 by an act of POGO!
Play#0 output Play#0 1 sup supply #4 unloaded from land #4 by an act of POGO!
Play#0 output Play#0 1 sup supply #4 loaded onto ship #2 by an act of POGO!
- Play#0 output Play#0 1 Military reserves changed from 0 to 2147483647 by an act of POGO
- Play#0 output Play#0 1 Money changed from 0 to 2147483647 by an act of POGO
+ Play#0 output Play#0 1 BTUs changed from 0 to 640 by an act of POGO!
+ Play#0 output Play#0 1 Military reserves changed from 0 to 2147483647 by an act of POGO!
+ Play#0 output Play#0 1 Number of seconds used changed from 0 to 86400 by an act of POGO!
+ Play#0 output Play#0 1 Money changed from 0 to 2147483647 by an act of POGO!
Play#0 output Play#0 6 0 640
Play#0 input read 4
Play#0 command read
- Play#0 output Play#0 1 No telegrams for 4 at the moment...
+ Play#0 output Play#0 1
+ Play#0 output Play#0 1 > BULLETIN from POGO, (#0) dated Thu Jan 1 00:00:00 1970
+ Play#0 output Play#0 1 BTUs changed from 0 to 640 by an act of POGO!
+ Play#0 output Play#0 1 Number of seconds used changed from 0 to 86400 by an act of POGO!
Play#0 output Play#0 6 0 640
Play#0 input read 5
Play#0 command read
Play#0 output Play#0 1
Play#0 output Play#0 1 > BULLETIN from POGO, (#0) dated Thu Jan 1 00:00:00 1970
+ Play#0 output Play#0 1 BTUs changed from 0 to 640 by an act of POGO!
Play#0 output Play#0 1 Technology changed from 0.00 to 1.00 by an act of POGO!
Play#0 output Play#0 6 0 640
Play#0 input read 98