Revamp how commands are loaded. This will now allow for easy addition of custom commands and over-riding existing Evennia-supplied commands.
This commit is contained in:
parent
848c7da075
commit
4ca5a4a7bf
12 changed files with 165 additions and 107 deletions
|
|
@ -2,6 +2,7 @@
|
|||
Contains commands for managing script parents.
|
||||
"""
|
||||
from src import scripthandler
|
||||
from src.cmdtable import GLOBAL_CMD_TABLE
|
||||
|
||||
def clear_cached_scripts(command):
|
||||
"""
|
||||
|
|
@ -42,4 +43,6 @@ def cmd_parent(command):
|
|||
clear_cached_scripts(command)
|
||||
return
|
||||
|
||||
command.source_object.emit_to("Must be specified with one of the following switches: showcache, clearcache")
|
||||
command.source_object.emit_to("Must be specified with one of the following switches: showcache, clearcache")
|
||||
GLOBAL_CMD_TABLE.add_command("@parent", cmd_parent,
|
||||
priv_tuple=("genperms.builder")),
|
||||
Loading…
Add table
Add a link
Reference in a new issue