From 18f3b84390e4b3331f59e97bcbbecb7b1f0f468d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 14 Sep 2017 16:08:22 +0200 Subject: [PATCH] tend: Fix the amount tended in bulletin to recipient 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 --- src/lib/commands/tend.c | 2 +- tests/load-tend/99-POGO | 2 -- tests/load-tend/journal.log | 12 ++++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index 71d339f6..bb50f4b6 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -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)); } } diff --git a/tests/load-tend/99-POGO b/tests/load-tend/99-POGO index 648e2e1a..f3ca8058 100644 --- a/tests/load-tend/99-POGO +++ b/tests/load-tend/99-POGO @@ -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 diff --git a/tests/load-tend/journal.log b/tests/load-tend/journal.log index 53791499..82658f9d 100644 --- a/tests/load-tend/journal.log +++ b/tests/load-tend/journal.log @@ -3517,11 +3517,11 @@ 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 @@ -3534,7 +3534,7 @@ 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