Merge pull request #2978 from InspectorCaracal/cmd-docfix
Update Command docstring
This commit is contained in:
commit
7ff30a5d17
1 changed files with 9 additions and 7 deletions
|
|
@ -146,17 +146,19 @@ class Command(metaclass=CommandMeta):
|
||||||
|
|
||||||
The cmdhandler makes the following variables available to the
|
The cmdhandler makes the following variables available to the
|
||||||
command methods (so you can always assume them to be there):
|
command methods (so you can always assume them to be there):
|
||||||
|
|
||||||
self.caller - the game object calling the command
|
self.caller - the game object calling the command
|
||||||
self.cmdstring - the command name used to trigger this command (allows
|
self.cmdstring - the command name used to trigger this command (allows
|
||||||
you to know which alias was used, for example)
|
you to know which alias was used, for example)
|
||||||
cmd.args - everything supplied to the command following the cmdstring
|
self.args - everything supplied to the command following the cmdstring
|
||||||
(this is usually what is parsed in self.parse())
|
(this is usually what is parsed in self.parse())
|
||||||
cmd.cmdset - the cmdset from which this command was matched (useful only
|
self.cmdset - the cmdset from which this command was matched (useful only
|
||||||
seldomly, notably for help-type commands, to create dynamic
|
seldomly, notably for help-type commands, to create dynamic
|
||||||
help entries and lists)
|
help entries and lists)
|
||||||
cmd.obj - the object on which this command is defined. If a default command,
|
self.obj - the object on which this command is defined. If a default command,
|
||||||
this is usually the same as caller.
|
this is usually the same as caller.
|
||||||
cmd.rawstring - the full raw string input, including any args and no parsing.
|
self.raw_string - the full raw string input, including the command name,
|
||||||
|
any args and no parsing.
|
||||||
|
|
||||||
The following class properties can/should be defined on your child class:
|
The following class properties can/should be defined on your child class:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue