Unspk'd inventory lookup

This commit is contained in:
NHOrus 2017-07-04 11:37:30 +03:00
parent b8def22d24
commit ffd08893dd

View file

@ -778,19 +778,21 @@ static int fly(token_t verb, token_t obj)
static int inven(void) static int inven(void)
/* Inventory. If object, treat same as find. Else report on current burden. */ /* 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++) { for (int i = 1; i <= NOBJECTS; i++) {
if (i == BEAR || if (i == BEAR ||
!TOTING(i)) !TOTING(i))
continue; continue;
if (spk == NO_CARRY) if (empty) {
rspeak(NOW_HOLDING); rspeak(NOW_HOLDING);
empty = false;
}
pspeak(i, touch, -1, false); pspeak(i, touch, -1, false);
spk = NO_MESSAGE;
} }
if (TOTING(BEAR)) if (TOTING(BEAR))
spk = TAME_BEAR; rspeak(TAME_BEAR);
rspeak(spk); if (empty)
rspeak(NO_CARRY);
return GO_CLEAROBJ; return GO_CLEAROBJ;
} }