From: NHOrus Date: Tue, 4 Jul 2017 08:37:30 +0000 (+0300) Subject: Unspk'd inventory lookup X-Git-Tag: takebird~49 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ffd08893dd14ee435e4fdb1df5fae6189de72c1f;p=open-adventure.git Unspk'd inventory lookup --- diff --git a/actions.c b/actions.c index 4099b22..f4633f5 100644 --- a/actions.c +++ b/actions.c @@ -778,19 +778,21 @@ static int fly(token_t verb, token_t obj) static int inven(void) /* Inventory. If object, treat same as find. Else report on current burden. */ { - int spk = NO_CARRY; + bool empty = true; for (int i = 1; i <= NOBJECTS; i++) { if (i == BEAR || !TOTING(i)) continue; - if (spk == NO_CARRY) + if (empty) { rspeak(NOW_HOLDING); + empty = false; + } pspeak(i, touch, -1, false); - spk = NO_MESSAGE; } if (TOTING(BEAR)) - spk = TAME_BEAR; - rspeak(spk); + rspeak(TAME_BEAR); + if (empty) + rspeak(NO_CARRY); return GO_CLEAROBJ; }