Wow, thanks! That was just a guess as to the line.
If you still want to have the word “door” understood as the hut most of the time, you can restrict the Understand statement:
Understand "door" as the hut when the hut is in the location.
But now, if you try “discuss metal door” in the presence of the hut, it automatically chooses the hut (you don’t get a disambiguation loop because Inform chooses things in the location first if it can, I think). We can fix that with a Does The Player Mean rule:
Does the player mean discussing the metal hut when the player's command includes "door": it is unlikely.
And of course we have to test it, because DTPM rules rarely work the way I want them to on the first or fifth try:
[code]Discussing is an action applying to one visible thing.
Understand “Discuss [Any Thing]” as Discussing.
Repeat through the Table of Discussions:
if noun is subject entry:
say “[data entry]”;
stop the action;
say “Nothing to discuss about [noun]”.
Table of Discussions
metal door “Door!”
metal hut “Hut!”
Iron door “Another door!”
There is a rock. There is a metal door. There is a metal hut. There is an iron door. Understand “door” as the hut when the hut is in the location.
Lab is a room. Exterior is north of Lab. The metal hut is in Exterior.
Does the player mean discussing the metal hut when the player’s command includes “door”: it is unlikely.
test me with “discuss door/metal/n/x door/discuss door/metal/discuss door/metal door/discuss door/metal hut”.[/code]
And it’s one of those rare occasions! The “(the metal door}” after command 8 isn’t quite desirable but it’s better than things not working.