]> git.pond.sub.org Git - empserver/commitdiff
tend: Fix the amount tended in bulletin to recipient
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 14 Sep 2017 14:08:22 +0000 (16:08 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 06:25:17 +0000 (07:25 +0100)
The bulletin reports the total amount tended to all ships so far.
Broken in commit 1de48e53da (v4.3.0), not fixed in commit 7cc14a2c9a
(v4.3.1).  Fix the bulletin to report the amount tended to this ship.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/tend.c
tests/load-tend/99-POGO
tests/load-tend/journal.log

index 71d339f6977c66314533080f89d4c5634ab5920a..bb50f4b61c7cb27aee098df0c2bf5c9514a891e4 100644 (file)
@@ -173,7 +173,7 @@ tend(void)
                total += transfer;
                if (transfer && target.shp_own != player->cnum) {
                    wu(0, target.shp_own, "%s tended %d %s to %s\n",
-                      cname(player->cnum), total, ip->i_name,
+                      cname(player->cnum), transfer, ip->i_name,
                       prship(&target));
                }
            }
index 648e2e1a117369dd473af5a7cbb9f55c0250766c..f3ca80586dfcbc8ea22df418771f20465fabbd92 100644 (file)
@@ -13,8 +13,6 @@ read 1
 | BUG: POGO destroys linf#234 silently
 read 2
 read 3
-| BUG: reports 2f instead of 1f tended to cs#163 4 times
 read 4
 | BUG: POGO gives away sam#194/224 silently
 | BUG: POGO gives away linf#224/254 silently
-| BUG: reports 2f instead of 1f tended to cs#164
index 5379149965310ff7a24f8b4ae851e64d1d111d10..82658f9dd80ac40b85c01891c112ca59e941cc65 100644 (file)
     Play#0 output Play#0 1 1 linf light infantry #213 loaded on your ls   landing ship (#93) at 0,0
     Play#0 output Play#0 1 1 linf light infantry #182 unloaded in your harbor at 4,0
     Play#0 output Play#0 1 1 linf light infantry #197 unloaded in your city at 4,4
-    Play#0 output Play#0 1 1 tended 2 food to cs   cargo ship (#163)
-    Play#0 output Play#0 1 1 tended 2 food to cs   cargo ship (#163)
-    Play#0 output Play#0 1 1 tended 2 food to cs   cargo ship (#163)
-    Play#0 output Play#0 1 1 tended 2 food to cs   cargo ship (#163)
-    Play#0 output Play#0 1 1 tended 2 food to cs   cargo ship (#163)
+    Play#0 output Play#0 1 1 tended 1 food to cs   cargo ship (#163)
+    Play#0 output Play#0 1 1 tended 1 food to cs   cargo ship (#163)
+    Play#0 output Play#0 1 1 tended 1 food to cs   cargo ship (#163)
+    Play#0 output Play#0 1 1 tended 1 food to cs   cargo ship (#163)
+    Play#0 output Play#0 1 1 tended 1 food to cs   cargo ship (#163)
     Play#0 output Play#0 1 1 linf light infantry #331 loaded on your cs   cargo ship (#163) at 0,-2
     Play#0 output Play#0 6 0 640
     Play#0 input read 4
     Play#0 output Play#0 1 POGO sam  Sea Sparrow #214 loaded on tra  train #94 at 0,0
     Play#0 output Play#0 1 POGO linf light infantry #214 loaded on your ls   landing ship (#94) at 0,0
     Play#0 output Play#0 1 POGO linf light infantry #244 loaded on your tra  train #94 at 0,0
-    Play#0 output Play#0 1 POGO tended 2 food to cs   cargo ship (#164)
+    Play#0 output Play#0 1 POGO tended 1 food to cs   cargo ship (#164)
     Play#0 output Play#0 6 0 640
     Play#0 input ctld
     Play#0 output Play#0 1 Bye-bye