Introduce OBJECT_STASHIFY.
This commit is contained in:
parent
0157e58668
commit
08f0351817
3 changed files with 3 additions and 3 deletions
1
advent.h
1
advent.h
|
@ -100,6 +100,7 @@
|
|||
#define OBJECT_IS_NOTFOUND2(g, o) (!g.objects[o].found)
|
||||
#define OBJECT_SET_SEEN(obj) game.objects[object].found = true
|
||||
#endif
|
||||
#define OBJECT_STASHIFY(obj, pval) game.objects[obj].prop = PROP_STASHIFY(pval)
|
||||
|
||||
#define PROMPT "> "
|
||||
|
||||
|
|
3
main.c
3
main.c
|
@ -1275,8 +1275,7 @@ static bool do_command(void) {
|
|||
if (TOTING(i) &&
|
||||
(OBJECT_IS_NOTFOUND(i) ||
|
||||
OBJECT_IS_STASHED(i))) {
|
||||
game.objects[i].prop =
|
||||
PROP_STASHIFY(game.objects[i].prop);
|
||||
OBJECT_STASHIFY(i, game.objects[i].prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
misc.c
2
misc.c
|
@ -625,7 +625,7 @@ void put(obj_t object, loc_t where, int pval) {
|
|||
/* put() is the same as move(), except the object is stashed and
|
||||
* can no longer be picked up. */
|
||||
move(object, where);
|
||||
game.objects[object].prop = PROP_STASHIFY(pval);
|
||||
OBJECT_STASHIFY(object, pval);
|
||||
#ifdef OBJECT_SET_SEEN
|
||||
OBJECT_SET_SEEN(object);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue