Unspk'd inventory lookup
This commit is contained in:
parent
b8def22d24
commit
ffd08893dd
1 changed files with 7 additions and 5 deletions
12
actions.c
12
actions.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue