25 lines
647 B
C
25 lines
647 B
C
Global thing_to_examine;
|
|
|
|
[ BeforeParsing thing n i;
|
|
if (num_words > 1) {
|
|
rfalse;
|
|
}
|
|
thing_to_examine = NextWord();
|
|
! Check that such thing exists in scope, so that we don't catch
|
|
! compass directions or gibberish.
|
|
objectloop ( thing provides name) {
|
|
if (TestScope(thing, player)) {
|
|
n = thing.#name / WORDSIZE;
|
|
for(i = 0 : i < n : i++)
|
|
if (thing.&name-->i == thing_to_examine) {
|
|
! At least one such thing exists, we can alter the input
|
|
buffer->0 = 'examine';
|
|
buffer->1 = thing_to_examine;
|
|
Tokenise__(buffer, parse);
|
|
rtrue;
|
|
}
|
|
};
|
|
};
|
|
rfalse;
|
|
];
|