]> git.pond.sub.org Git - empserver/commitdiff
Send bulletins only from POGO
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jan 2013 19:58:28 +0000 (20:58 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 6 Jun 2013 17:55:00 +0000 (19:55 +0200)
In the beginning, all bulletins came from POGO.  Chainsaw changed edit
and give to send them from the deity using the command.  Its new
command setresource sent from POGO regardless.  Its new command
setsector did both.

Go back to sending them only from POGO.

Some of the affected bulletins don't mention the acting deity.  Reword
them so they do.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/edit.c
src/lib/commands/give.c
src/lib/commands/setsect.c
tests/actofgod/journal.log

index b34cea255628568e47c452cd5f34968bc5ad31d5..85a876102c908039268050872b0a817749660f69 100644 (file)
@@ -245,7 +245,7 @@ noise(struct sctstr *sptr, char *name, int old, int new)
     pr("%s of %s changed from %d to %d\n",
        name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
     if (sptr->sct_own)
-       wu(player->cnum, sptr->sct_own,
+       wu(0, sptr->sct_own,
           "%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),
           old, new, cname(player->cnum));
@@ -438,16 +438,18 @@ edit_sect(struct sctstr *sect, char *key, int arg, char *p)
           xyas(sect->sct_x, sect->sct_y, player->cnum),
           prnatid(sect->sct_own), prnatid(arg));
        if (sect->sct_own) {
-           wu(player->cnum, sect->sct_own,
-              "Sector %s lost to deity intervention\n",
-              xyas(sect->sct_x, sect->sct_y, sect->sct_own));
+           wu(0, sect->sct_own,
+              "Sector %s taken from you by an act of %s!\n",
+              xyas(sect->sct_x, sect->sct_y, sect->sct_own),
+              cname(player->cnum));
        }
        benefit(sect->sct_own, 0);
        sect->sct_own = arg;
        if (arg) {
-           wu(player->cnum, arg,
-              "Sector %s gained from deity intervention\n",
-              xyas(sect->sct_x, sect->sct_y, arg));
+           wu(0, arg,
+              "Sector %s given to you by an act of %s!\n",
+              xyas(sect->sct_x, sect->sct_y, arg),
+              cname(player->cnum));
        }
        benefit(arg, 1);
        break;
@@ -645,9 +647,9 @@ edit_nat(struct natstr *np, char *key, int arg, char *p)
        benefit(nat, np->nat_reserve < arg);
        pr("Military reserves changed from %d to %d\n",
           np->nat_reserve, arg);
-       wu(player->cnum, nat,
-          "Military reserves changed from %d to %d by divine intervention.\n",
-          np->nat_reserve, arg);
+       wu(0, nat,
+          "Military reserves changed from %d to %d by an act of %s\n",
+          np->nat_reserve, arg, cname(player->cnum));
        np->nat_reserve = arg;
        break;
     case 'c':
@@ -679,9 +681,8 @@ edit_nat(struct natstr *np, char *key, int arg, char *p)
        break;
     case 'M':
        pr("Money changed from %d to %d\n", np->nat_money, arg);
-       wu(player->cnum, nat,
-          "Money changed from %d to %d by divine intervention.\n",
-          np->nat_money, arg);
+       wu(0, nat, "Money changed from %d to %d by an act of %s\n",
+          np->nat_money, arg, cname(player->cnum));
        np->nat_money = arg;
        break;
     case 'T':
@@ -746,11 +747,11 @@ edit_ship(struct shpstr *ship, char *key, int arg, char *p)
        if (arg < 0 || arg >= MAXNOC)
            return RET_SYN;
        if (ship->shp_own)
-           wu(player->cnum, ship->shp_own,
-              "%s taken from you by deity intervention!\n", prship(ship));
+           wu(0, ship->shp_own, "%s taken from you by an act of %s!\n",
+              prship(ship), cname(player->cnum));
        if (arg)
-           wu(player->cnum, (natid)arg,
-              "%s given to you by deity intervention!\n", prship(ship));
+           wu(0, arg, "%s given to you by an act of %s!\n",
+              prship(ship), cname(player->cnum));
        ship->shp_own = arg;
        break;
     case 'L':
@@ -827,11 +828,11 @@ edit_land(struct lndstr *land, char *key, int arg, char *p)
        if (arg < 0 || arg >= MAXNOC)
            return RET_SYN;
        if (land->lnd_own)
-           wu(player->cnum, land->lnd_own,
-              "%s taken from you by deity intervention!\n", prland(land));
+           wu(0, land->lnd_own, "%s taken from you by an act of %s!\n",
+              prland(land), cname(player->cnum));
        if (arg)
-           wu(player->cnum, (natid)arg,
-              "%s given to you by deity intervention!\n", prland(land));
+           wu(0, arg, "%s given to you by an act of %s!\n",
+              prland(land), cname(player->cnum));
        land->lnd_own = arg;
        break;
     case 'L':
@@ -925,12 +926,11 @@ edit_plane(struct plnstr *plane, char *key, int arg, char *p)
        if (arg < 0 || arg >= MAXNOC)
            return RET_SYN;
        if (plane->pln_own)
-           wu(player->cnum, plane->pln_own,
-              "%s taken from you by deity intervention!\n",
-              prplane(plane));
+           wu(0, plane->pln_own, "%s taken from you by an act of %s!\n",
+              prplane(plane), cname(player->cnum));
        if (arg)
-           wu(player->cnum, arg,
-              "%s given to you by deity intervention!\n", prplane(plane));
+           wu(0, arg, "%s given to you by an act of %s!\n",
+              prplane(plane), cname(player->cnum));
        plane->pln_own = arg;
        break;
     case 'e':
index 7883ca0ebeb066146477ed1534a4a2cb9aeb0626..f68affab47c161103ed2adaac3e306c7169a939a 100644 (file)
@@ -78,13 +78,13 @@ give(void)
            if (m > n) {
                if (opt_GODNEWS)
                    nreport(player->cnum, N_GIFT, sect.sct_own, 1);
-               wu(player->cnum, sect.sct_own, "%s gave you %d %s in %s\n",
+               wu(0, sect.sct_own, "%s gave you %d %s in %s\n",
                   cname(player->cnum), m - n, ip->i_name,
                   xyas(sect.sct_x, sect.sct_y, sect.sct_own));
            } else {
                if (opt_GODNEWS)
                    nreport(sect.sct_own, N_TAKE, player->cnum, 1);
-               wu(player->cnum, sect.sct_own, "%s stole %d %s from %s\n",
+               wu(0, sect.sct_own, "%s stole %d %s from %s\n",
                   cname(player->cnum), n - m, ip->i_name,
                   xyas(sect.sct_x, sect.sct_y, sect.sct_own));
            }
index db76d53235d813ed20de1c1cc215c1a402b82146..0a7dedc79ddcd52962df59c16a36926b5b35af5b 100644 (file)
@@ -104,14 +104,16 @@ setsector(void)
                   xyas(sect.sct_x, sect.sct_y, player->cnum),
                   prnatid(sect.sct_own), prnatid(amt));
                if (sect.sct_own) {
-                   wu(player->cnum, sect.sct_own,
-                      "Sector %s lost to deity intervention\n",
-                      xyas(sect.sct_x, sect.sct_y, sect.sct_own));
+                   wu(0, sect.sct_own,
+                      "Sector %s taken from you by an act of %s!\n",
+                      xyas(sect.sct_x, sect.sct_y, sect.sct_own),
+                      cname(player->cnum));
                }
                if (amt)
-                   wu(player->cnum, amt,
-                      "Sector %s gained from deity intervention\n",
-                      xyas(sect.sct_x, sect.sct_y, amt));
+                   wu(0, amt,
+                      "Sector %s given to you by an act of %s!\n",
+                      xyas(sect.sct_x, sect.sct_y, amt),
+                      cname(player->cnum));
                sect.sct_own = (natid)amt;
                break;
            case 'l':
index a0103d125fdbd9dfde6259f15b309928a1a8e218..f52ebade91a666acae8403326350dfad284b8f67 100644 (file)
     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 Sector 1,7 lost to deity intervention
-    Play#0 output Play#0 1 Sector 3,7 lost to deity intervention
-    Play#0 output Play#0 1 Sector 5,7 lost to deity intervention
-    Play#0 output Play#0 1 Sector 7,7 lost to deity intervention
-    Play#0 output Play#0 1 Sector 9,7 lost to deity intervention
-    Play#0 output Play#0 1 Sector 11,7 lost to deity intervention
+    Play#0 output Play#0 1 Sector 1,7 taken from you by an act of POGO!
+    Play#0 output Play#0 1 Sector 3,7 taken from you by an act of POGO!
+    Play#0 output Play#0 1 Sector 5,7 taken from you by an act of POGO!
+    Play#0 output Play#0 1 Sector 7,7 taken from you by an act of POGO!
+    Play#0 output Play#0 1 Sector 9,7 taken from you by an act of POGO!
+    Play#0 output Play#0 1 Sector 11,7 taken from you by an act of POGO!
     Play#0 output Play#0 1 Efficiency in 1,1 was changed from 0 to 0 by an act of POGO
     Play#0 output Play#0 1 Efficiency in 3,1 was changed from 0 to 0 by an act of POGO
     Play#0 output Play#0 1 Efficiency in 5,1 was changed from 0 to 100 by an act of POGO
     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 Military reserves changed from 0 to 0 by divine intervention.
-    Play#0 output Play#0 1 Money changed from 0 to -2147483648 by divine intervention.
+    Play#0 output Play#0 1 Military reserves changed from 0 to 0 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 6 0 640
     Play#0 input read 2
     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 Sector 5,7 gained from deity intervention
-    Play#0 output Play#0 1 Sector 11,7 gained from deity intervention
-    Play#0 output Play#0 1 cs   cargo ship (#2) given to you by deity intervention!
-    Play#0 output Play#0 1 f1   Sopwith Camel #2 given to you by deity intervention!
-    Play#0 output Play#0 1 sup  supply #2 given to you by deity intervention!
-    Play#0 output Play#0 1 Military reserves changed from 0 to 0 by divine intervention.
+    Play#0 output Play#0 1 Sector 5,7 given to you by an act of POGO!
+    Play#0 output Play#0 1 Sector 11,7 given to you by an act of POGO!
+    Play#0 output Play#0 1 cs   cargo ship (#2) given to you by an act of POGO!
+    Play#0 output Play#0 1 f1   Sopwith Camel #2 given to you by an act of POGO!
+    Play#0 output Play#0 1 sup  supply #2 given to you by an act of POGO!
+    Play#0 output Play#0 1 Military reserves changed from 0 to 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 
     Play#0 output Play#0 1 > BULLETIN from POGO, (#0)  dated Thu Jan  1 00:00:00 1970
-    Play#0 output Play#0 1 cs   cargo ship (#0) taken from you by deity intervention!
-    Play#0 output Play#0 1 cs   cargo ship (#1) taken from you by deity intervention!
-    Play#0 output Play#0 1 cs   cargo ship (#2) taken from you by deity intervention!
-    Play#0 output Play#0 1 f1   Sopwith Camel #0 taken from you by deity intervention!
-    Play#0 output Play#0 1 f1   Sopwith Camel #1 taken from you by deity intervention!
-    Play#0 output Play#0 1 f1   Sopwith Camel #2 taken from you by deity intervention!
-    Play#0 output Play#0 1 sup  supply #0 taken from you by deity intervention!
-    Play#0 output Play#0 1 sup  supply #1 taken from you by deity intervention!
-    Play#0 output Play#0 1 sup  supply #2 taken from you by deity intervention!
-    Play#0 output Play#0 1 Military reserves changed from 0 to 2147483647 by divine intervention.
-    Play#0 output Play#0 1 Money changed from 0 to 2147483647 by divine intervention.
+    Play#0 output Play#0 1 cs   cargo ship (#0) taken from you by an act of POGO!
+    Play#0 output Play#0 1 cs   cargo ship (#1) taken from you by an act of POGO!
+    Play#0 output Play#0 1 cs   cargo ship (#2) taken from you by an act of POGO!
+    Play#0 output Play#0 1 f1   Sopwith Camel #0 taken from you by an act of POGO!
+    Play#0 output Play#0 1 f1   Sopwith Camel #1 taken from you by an act of POGO!
+    Play#0 output Play#0 1 f1   Sopwith Camel #2 taken from you by an act of POGO!
+    Play#0 output Play#0 1 sup  supply #0 taken from you by an act of POGO!
+    Play#0 output Play#0 1 sup  supply #1 taken from you by an act of POGO!
+    Play#0 output Play#0 1 sup  supply #2 taken from you 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 6 0 640
     Play#0 input read 4
     Play#0 command read
     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 Sector 3,7 gained from deity intervention
-    Play#0 output Play#0 1 Sector 9,7 gained from deity intervention
-    Play#0 output Play#0 1 cs   cargo ship (#1) given to you by deity intervention!
-    Play#0 output Play#0 1 f1   Sopwith Camel #1 given to you by deity intervention!
-    Play#0 output Play#0 1 sup  supply #1 given to you by deity intervention!
+    Play#0 output Play#0 1 Sector 3,7 given to you by an act of POGO!
+    Play#0 output Play#0 1 Sector 9,7 given to you by an act of POGO!
+    Play#0 output Play#0 1 cs   cargo ship (#1) given to you by an act of POGO!
+    Play#0 output Play#0 1 f1   Sopwith Camel #1 given to you by an act of POGO!
+    Play#0 output Play#0 1 sup  supply #1 given to you by an act of POGO!
     Play#0 output Play#0 6 0 640
     Play#0 input ctld
     Play#0 output Play#0 1 Bye-bye