projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b8def22
)
Unspk'd inventory lookup
author
NHOrus
<jy6x2b32pie9@yahoo.com>
Tue, 4 Jul 2017 08:37:30 +0000
(11:37 +0300)
committer
NHOrus
<jy6x2b32pie9@yahoo.com>
Tue, 4 Jul 2017 12:18:49 +0000
(15:18 +0300)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index 4099b22aec39bb283da5d8c1fe7ce5f7bb5bcd14..f4633f58d617b9ab0fb4a3358a3daab618419005 100644
(file)
--- 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. */
{
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;
for (int i = 1; i <= NOBJECTS; i++) {
if (i == BEAR ||
!TOTING(i))
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(spk);
+ rspeak(TAME_BEAR);
+ if (empty)
+ rspeak(NO_CARRY);
return GO_CLEAROBJ;
}
return GO_CLEAROBJ;
}