From b1de659e8bf7e577973b5f63b4956a911e2eeb40 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 25 Jun 2016 23:22:45 +0200 Subject: [PATCH] Migrate! Add nick-templating system, first version. This allows arg templating of nicks to allow a user to completely redefine how they enter commands. Still some bugs. --- evennia/commands/default/general.py | 127 +++++++++++++++----------- evennia/typeclasses/attributes.py | 137 +++++++++++++++++++++++++--- evennia/utils/inlinefuncs.py | 96 +++++++++++++++++++ 3 files changed, 297 insertions(+), 63 deletions(-) diff --git a/evennia/commands/default/general.py b/evennia/commands/default/general.py index 71e984738e..7f85552dfc 100644 --- a/evennia/commands/default/general.py +++ b/evennia/commands/default/general.py @@ -2,7 +2,8 @@ General Character commands usually availabe to all characters """ from django.conf import settings -from evennia.utils import utils, prettytable +from evennia.utils import utils, evtable +from evennia.typeclasses.attributes import NickTemplateInvalid COMMAND_DEFAULT_CLASS = utils.class_from_module(settings.COMMAND_DEFAULT_CLASS) @@ -75,33 +76,39 @@ class CmdNick(COMMAND_DEFAULT_CLASS): define a personal alias/nick Usage: - nick[/switches] [= []] - alias '' + nick[/switches] [= [replacement_string]] + nick[/switches]