mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 03:57:17 +02:00
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()
|
||||
|
||||
# Reset the list.
|
||||
CMD_ALIAS_LIST = {}
|
||||
CMD_ALIAS_LIST.clear()
|
||||
|
||||
for alias in alias_list:
|
||||
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,
|
||||
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):
|
||||
"""
|
||||
Shut the server down gracefully.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue