The Index isn’t exactly lying, but it’s a little misleading because the functionality is not enabled through normal action processing as you seem to be assuming.
As Draconis explains, this type of command input is not handled through normal action resolution and is built directly into low-level parser code.
Your redefinition of "l"
works because the Standard Rules contain the line:
Understand the command "l" as "look".
No similar modifiable assertions exist for the "[direction]"
pattern – it’s just I6 code.
The good news is that it’s pretty straightforward to disable this low-level functionality in 6M62. If you’re using 10.1.2, it should still be possible, but it will require a huge inclusion (the whole of the Parser__parse()
routine). I think that’s something to consider before abandoning Inform completely.
This is what the change looks like in a 6M62-compatible form (which allows replacement of parser routine sections):
Include (-
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter B
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef LanguageIsVerb;
if (verb_word == 0) {
i = wn; verb_word = LanguageIsVerb(buffer, parse, verb_wordnum);
wn = i;
}
#Endif; ! LanguageIsVerb
! If the first word is not listed as a verb, it must be a direction
! or the name of someone to talk to
if (verb_word == 0 || ((verb_word->#dict_par1) & 1) == 0) {
! So is the first word an object contained in the special object "compass"
! (i.e., a direction)? This needs use of NounDomain, a routine which
! does the object matching, returning the object number, or 0 if none found,
! or REPARSE_CODE if it has restructured the parse table so the whole parse
! must be begun again...
wn = verb_wordnum; indef_mode = false; token_filter = 0; parameters = 0;
@push actor; @push action; @push action_to_be;
actor = player; meta = false; action = ##Go; action_to_be = ##Go;
! l = NounDomain(compass, 0, 0); ! DISABLED
l = nothing; ! ADDED
@pull action_to_be; @pull action; @pull actor;
if (l == REPARSE_CODE) jump ReParse;
! If it is a direction, send back the results:
! action=GoSub, no of arguments=1, argument 1=the direction.
if ((l~=0) && (l ofclass K3_direction)) {
parser_results-->ACTION_PRES = ##Go;
parser_results-->NO_INPS_PRES = 1;
parser_results-->INP1_PRES = l;
inferred_go = true;
jump LookForMore;
}
} ! end of first-word-not-a-verb
-) instead of "Parser Letter B" in "Parser.i6t".
Note that the functionality can be re-enabled at the Inform 7 level via:
Understand "[direction]" as going.
In theory, this could be placed in the Standard Rules, taking direction-only commands out of the realm of special behavior. (I don’t know what the compiler would do with an ... as something new
directive in this case, though.)