best code so far
This commit is contained in:
parent
885ff2cbbe
commit
566e290f36
24
examine_en.h
24
examine_en.h
|
@ -1,23 +1,15 @@
|
|||
! Alternative way: with BeforeParsing
|
||||
Global thing_to_examine;
|
||||
|
||||
Global thing_to_examine = "";
|
||||
|
||||
[ ExamineScope thing;
|
||||
print thing_to_examine, " - ", thing, ": ", (a) thing, "^";
|
||||
if (thing == thing_to_examine) {
|
||||
buffer->0 = 'examine';
|
||||
buffer->1 = thing_to_examine;
|
||||
Tokenise__(buffer, parse);
|
||||
[ExamineScope thing;
|
||||
if (thing ofclass Object && WordInProperty(thing_to_examine, thing, name)) {
|
||||
<Examine thing_to_examine>;
|
||||
rtrue;
|
||||
}
|
||||
rfalse;
|
||||
];
|
||||
|
||||
[ BeforeParsing;
|
||||
if (num_words > 1) {
|
||||
rfalse;
|
||||
}
|
||||
thing_to_examine = NextWord();
|
||||
|
||||
! WARNING: will catch compass directions
|
||||
[ UnknownVerb word;
|
||||
thing_to_examine = word;
|
||||
LoopOverScope(ExamineScope);
|
||||
rfalse;
|
||||
];
|
||||
|
|
27
examine_ru.h
27
examine_ru.h
|
@ -1,15 +1,20 @@
|
|||
Global the_word_was = "";
|
||||
Global thing_to_examine;
|
||||
|
||||
[ UnknownVerb word i;
|
||||
objectloop (i in location) {
|
||||
if (
|
||||
!word == (i.&name) --> 0 &&
|
||||
i has scenery
|
||||
) {
|
||||
the_word_was = i;
|
||||
return 'осм';
|
||||
}
|
||||
rfalse;
|
||||
[ExamineScope thing;
|
||||
if (
|
||||
thing ofclass Object &&
|
||||
! WordInProperty(thing_to_examine, thing, name)
|
||||
thing_to_examine == (thing.&name) --> 0
|
||||
) {
|
||||
<Examine thing_to_examine>;
|
||||
rtrue;
|
||||
}
|
||||
rfalse;
|
||||
];
|
||||
|
||||
[ UnknownVerb word;
|
||||
thing_to_examine = word;
|
||||
LoopOverScope(ExamineScope);
|
||||
rfalse;
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue