如何更改命令的定义以引用不同的操作
How to change the definition of a command to refer to a different action
我想创建一个名为washing
的新动作,如下:
Understand "wash [something] with [something]" as washing.
Understand the command "clean" as "wash".
但是,Inform7 标准规则为 rub
定义了多个同义词,其中之一是 clean
:
Understand "rub [something]" as rubbing.
Understand the commands "shine", "polish", "sweep", "clean", "dust", "wipe" and "scrub" as "rub".
结果是我得到一个编译器错误:
Problem. You wrote 'Understand the command "clean" as "wash"': but 'understand the command ... as ...' is only allowed when the new command has no meaning already, so for instance 'understand "drop" as "throw"' is not allowed because "drop" already has a meaning.
我如何告诉 Inform 将 clean
命令的含义从 rub
切换为 wash
而完全不影响 rub
定义的其余部分?
从手册的第 17.3 节开始,您使用 as something new
:
Understand the command "clean" as something new.
这将从字典中删除单词,但保留旧的同义词,即不会影响摩擦操作。之后您可以将其定义为新洗涤动作的同义词。
但是,考虑到许多摩擦动词都适用于洗涤。您可以将摩擦动作重定向到某些物体的洗涤动作,而不是重新关联“清洁”动词:
Instead of rubbing the dishes:
try cleaning the dishes.
然后你就会得到所有的动词。其中一些可能没有完全意义,但玩家不太可能使用它们,并且解析器接受不太有意义的额外命令远没有解析器拒绝有意义的命令那么大。 .
我想创建一个名为washing
的新动作,如下:
Understand "wash [something] with [something]" as washing.
Understand the command "clean" as "wash".
但是,Inform7 标准规则为 rub
定义了多个同义词,其中之一是 clean
:
Understand "rub [something]" as rubbing.
Understand the commands "shine", "polish", "sweep", "clean", "dust", "wipe" and "scrub" as "rub".
结果是我得到一个编译器错误:
Problem. You wrote 'Understand the command "clean" as "wash"': but 'understand the command ... as ...' is only allowed when the new command has no meaning already, so for instance 'understand "drop" as "throw"' is not allowed because "drop" already has a meaning.
我如何告诉 Inform 将 clean
命令的含义从 rub
切换为 wash
而完全不影响 rub
定义的其余部分?
从手册的第 17.3 节开始,您使用 as something new
:
Understand the command "clean" as something new.
这将从字典中删除单词,但保留旧的同义词,即不会影响摩擦操作。之后您可以将其定义为新洗涤动作的同义词。
但是,考虑到许多摩擦动词都适用于洗涤。您可以将摩擦动作重定向到某些物体的洗涤动作,而不是重新关联“清洁”动词:
Instead of rubbing the dishes:
try cleaning the dishes.
然后你就会得到所有的动词。其中一些可能没有完全意义,但玩家不太可能使用它们,并且解析器接受不太有意义的额外命令远没有解析器拒绝有意义的命令那么大。 .