]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/actofgod.c
Update copyright notice
[empserver] / src / lib / subs / actofgod.c
index b94ee296b73f57643cec4808988e5dd274040e15..1299d6b940eb625e1d2b80326715b2cf8f238861 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
  *  actofgod.c: Deity meddling subroutines
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2013-2015
+ *     Markus Armbruster, 2013-2016
  */
 
 #include <config.h>
 
 #include <stdarg.h>
 #include "actofgod.h"
-#include "file.h"
 #include "news.h"
 #include "optlist.h"
 #include "player.h"
@@ -70,17 +69,17 @@ report_god_gives(char *prefix, char *what, natid to)
 }
 
 /*
- * Report deity meddling with sector SP.
+ * Report deity meddling with sector @sp.
  * Print a message (always), send a bulletin to the sector owner and
  * report news (sometimes).
- * NAME names what is being changed in the sector.
- * If CHANGE is zero, the meddling is a no-op (bulletin suppressed).
- * If CHANGE is negative, it's secret (bulletin suppressed).
- * If a bulletin is sent, report N_AIDS news for positive GOODNESS,
- * N_HURTS news for negative GOODNESS
- * The bulletin's text is like "NAME of sector X,Y changed <how> by an
+ * @name names what is being changed in the sector.
+ * If @change is zero, the meddling is a no-op (bulletin suppressed).
+ * If @change is negative, it's secret (bulletin suppressed).
+ * If a bulletin is sent, report N_AIDS news for positive @goodness,
+ * N_HURTS news for negative @goodness
+ * The bulletin's text is like "@name of sector X,Y changed <how> by an
  * act of <deity>, where <deity> is the deity's name, and <how> comes
- * from formatting printf-style FMT with optional arguments.
+ * from formatting printf-style @fmt with optional arguments.
  */
 void
 divine_sct_change(struct sctstr *sp, char *name,
@@ -110,7 +109,7 @@ divine_sct_change(struct sctstr *sp, char *name,
 }
 
 /*
- * Report deity meddling with NP.
+ * Report deity meddling with @np.
  * Just like divine_sct_change(), only for nations.
  */
 void
@@ -138,7 +137,7 @@ divine_nat_change(struct natstr *np, char *name,
 }
 
 /*
- * Report deity meddling with UNIT.
+ * Report deity meddling with @unit.
  * Just like divine_sct_change(), only for ships, planes, land units,
  * nukes.
  */
@@ -190,7 +189,7 @@ divine_load(struct empobj *unit, int type, int uid)
     divine_load_unload(unit, type, uid, "loaded onto");
     if (get_empobj(type, uid, &carrier)
        && (unit->x != carrier.gen.x || unit->y != carrier.gen.y)) {
-       pr("%s teleported from %s to %s!",
+       pr("%s teleported from %s to %s!\n",
           unit_nameof(unit), xyas(unit->x, unit->y, player->cnum),
           xyas(carrier.gen.x, carrier.gen.y, player->cnum));
        unit_teleport(unit, carrier.gen.x, carrier.gen.y);
@@ -214,16 +213,16 @@ divine_flag_change(struct empobj *unit, char *name,
        return;
     }
 
-    symbol_set_fmt(set, sizeof(set), new & ~old, sym, 1);
-    symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, 1);
+    symbol_set_fmt(set, sizeof(set), new & ~old, sym, ", ", 1);
+    symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, ", ", 1);
     pr("%s of %s changed: %s%s%s%s%s\n",
        name, unit_nameof(unit),
        set, set[0] ? " set" : "",
        set[0] && clr[0] ? ", and " : "",
        clr, clr[0] ? " cleared" : "");
 
-    if (symbol_set_fmt(set, sizeof(set), new & ~old, sym, 0)
-       + symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, 0))
+    if (symbol_set_fmt(set, sizeof(set), new & ~old, sym, ", ", 0)
+       + symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, ", ", 0))
        wu(0, unit->own, "%s of %s changed by an act of %s: %s%s%s%s%s\n",
           name, unit_nameof(unit), cname(player->cnum),
           set, set[0] ? " set" : "",
@@ -232,8 +231,8 @@ divine_flag_change(struct empobj *unit, char *name,
 }
 
 /*
- * Report deity giving/taking commodities to/from WHOM.
- * Give AMT of IP in PLACE.
+ * Report deity giving/taking commodities to/from @whom.
+ * Give @amt of @ip in @place.
  */
 void
 report_divine_gift(natid whom, struct ichrstr *ip, int amt, char *place)