tuxemon.cli.commands.action module
- class tuxemon.cli.commands.action.ActionCommand[source]
Bases:
CLICommand
Subcommand used by
action
to invoke EventActions.- invoke(ctx, line)[source]
Execute action directly.
- Parameters:
ctx (InvokeContext) – Contains references to parts of the game and CLI interface.
line (str) – Input text after the command name.
- Return type:
None
- usable_from_root: ClassVar[bool] = False
- class tuxemon.cli.commands.action.ActionParentCommand[source]
Bases:
CLICommand
Command allows actions to be executed directly.
Actions are listed as options, but when invoked, return subcommands that will execute the action.
- description: ClassVar[str] = 'Execute action in the game.'
- example: ClassVar[str] = 'action add_item potion,10'
- get_subcommands(ctx)[source]
Return subcommands that will execute an EventAction.
- Parameters:
ctx (InvokeContext) – Contains references to parts of the game and CLI interface.
- Return type:
Iterable[CLICommand]
- invoke(ctx, line)[source]
Default when no arguments are entered.
- Parameters:
ctx (InvokeContext) – Contains references to parts of the game and CLI interface.
line (str) – Input text after the command name.
- Return type:
None
- name: ClassVar[str] = 'action'