X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=actions.c;h=f4633f58d617b9ab0fb4a3358a3daab618419005;hp=4099b22aec39bb283da5d8c1fe7ce5f7bb5bcd14;hb=ffd08893dd14ee435e4fdb1df5fae6189de72c1f;hpb=b8def22d242e48dff1f2eb712f6c14d6a01fb58a 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; }