Added the capability of evennia commands to consist of more than one word. So the examples.red_button parent can now be pressed with the command 'push button' instead of 'pushbutton' as before. The variable COMMAND_MAXLEN in the config defines how many words your commands may maximum contain (don't set it higher than needed for efficiency reasons).
The main drawback of multi-word commands are that they can not have any switches; they are intended for in-game use (in states and on objects). Use normal one-word commands for administration and more complex commands with many options. /Griatch
This commit is contained in:
parent
0c29d359f6
commit
a711e07b80
4 changed files with 115 additions and 53 deletions
|
|
@ -104,6 +104,6 @@ def class_factory(source_obj):
|
|||
"""
|
||||
button = RedButton(source_obj)
|
||||
# add the object-based commands to the button
|
||||
button.command_table.add_command("pushbutton", cmd_push_button)
|
||||
button.command_table.add_command("pullbutton", cmd_pull_button)
|
||||
button.command_table.add_command("push button", cmd_push_button)
|
||||
button.command_table.add_command("pull button", cmd_pull_button)
|
||||
return button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue