Add the home command.
This commit is contained in:
parent
867fb47be7
commit
899136760e
2 changed files with 14 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ def load_cmd_aliases():
|
||||||
alias_list = CommandAlias.objects.all()
|
alias_list = CommandAlias.objects.all()
|
||||||
|
|
||||||
# Reset the list.
|
# Reset the list.
|
||||||
CMD_ALIAS_LIST = {}
|
CMD_ALIAS_LIST.clear()
|
||||||
|
|
||||||
for alias in alias_list:
|
for alias in alias_list:
|
||||||
CMD_ALIAS_LIST[alias.user_input] = alias.equiv_command
|
CMD_ALIAS_LIST[alias.user_input] = alias.equiv_command
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,19 @@ def cmd_newpassword(command):
|
||||||
GLOBAL_CMD_TABLE.add_command("@newpassword", cmd_newpassword,
|
GLOBAL_CMD_TABLE.add_command("@newpassword", cmd_newpassword,
|
||||||
priv_tuple=("genperms.manage_players"))
|
priv_tuple=("genperms.manage_players"))
|
||||||
|
|
||||||
|
def cmd_home(command):
|
||||||
|
"""
|
||||||
|
Teleport the player to their home.
|
||||||
|
"""
|
||||||
|
pobject = command.source_object
|
||||||
|
if pobject.home == None:
|
||||||
|
pobject.emit_to("You have no home set, @link yourself to somewhere.")
|
||||||
|
else:
|
||||||
|
pobject.emit_to("There's no place like home...")
|
||||||
|
pobject.move_to(pobject.get_home())
|
||||||
|
GLOBAL_CMD_TABLE.add_command("home", cmd_home,
|
||||||
|
priv_tuple=("genperms.tel_anywhere"))
|
||||||
|
|
||||||
def cmd_shutdown(command):
|
def cmd_shutdown(command):
|
||||||
"""
|
"""
|
||||||
Shut the server down gracefully.
|
Shut the server down gracefully.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue