From 7b62b2def97f99d724e28a03642a2e4c5412eaa2 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 20 Oct 2022 16:49:25 -0700 Subject: [PATCH] PR #896 tweak - ^X shows known container gold When not carrying any contained gold, or the only contained gold is inside container(s) whose contents aren't known, ^X writes one line about the hero's "wallet". When known contained gold is present, it writes two lines for gold, first one about wallet with the second one about contained gold being a continuation of the first. Move the conjunction that combines them from the start of the second line to the end of the first. So change |Your wallet contains M zorkmids, |and you have N more contained in your pack. to |Your wallet contains M zorkmids, and |you have N more contained in your pack. and |Your wallet is empty, |but you have N zorkmids contained in your pack. to |Your wallet is empty, but |you have N zorkmids contained in your pack. It evens out the line lengths a little bit and starting the second line with uncapitalized "you" seems slightly less jarring than with "and" or "but". --- src/insight.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/insight.c b/src/insight.c index 9ed83db57..8ae7b0b8d 100644 --- a/src/insight.c +++ b/src/insight.c @@ -729,14 +729,17 @@ basics_enlightenment(int mode UNUSED, int final) Sprintf(buf, " Your wallet contain%s %ld %s", !final ? "s" : "ed", umoney, currency(umoney)); } - Strcat(buf, hmoney ? "," : "."); + /* terminate the wallet line if appropriate, otherwise add an + introduction to subsequent continuation; output now either way */ + Strcat(buf, !hmoney ? "." : !umoney ? ", but" : ", and"); enlght_out(buf); + /* put contained gold on its own line to avoid excessive width; it's + phrased as a continuation of the wallet line so not capitalized */ if (hmoney) { Sprintf(buf, "%ld %s stashed away in your pack", hmoney, umoney ? "more" : currency(hmoney)); - enl_msg(umoney ? "and you " : "but you ", "have ", "had ", buf, - ""); + enl_msg("you ", "have ", "had ", buf, ""); } }