From 61ffe5f9fae5c43d6a95316110ec5e6857d843dd Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 12 Feb 2017 10:52:51 +0100 Subject: [PATCH] Rename ADDITIONA_ANSI_MAPPING to COLOR_ANSI_EXTRA_MAP to better match the settings naming scheme. --- evennia/settings_default.py | 10 ++++++---- evennia/utils/ansi.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/evennia/settings_default.py b/evennia/settings_default.py index 12284ddf4..87b4995c0 100644 --- a/evennia/settings_default.py +++ b/evennia/settings_default.py @@ -319,10 +319,12 @@ PROTOTYPE_MODULES = ["world.prototypes"] # Module holding settings/actions for the dummyrunner program (see the # dummyrunner for more information) DUMMYRUNNER_SETTINGS_MODULE = "evennia.server.profiling.dummyrunner_settings" -# Additional mappings used to extend the existing Evennia ANSI mappings. -# All mappings should be a tuple of a string to one of the constants provided -# in ansi.py. For example, (r'%r', "\r\n") -ADDITIONAL_ANSI_MAPPINGS = [] +# Mapping to extend Evennia's normal ANSI color tags. The mapping is a list of +# tuples mapping the tag to the ANSI convertion, like `("%c%r", ansi.ANSI_RED)` +# (the evennia.utils.ansi module contains all ANSI escape sequences). This is +# mainly supplied for support of legacy codebase tag formats. +COLOR_ANSI_EXTRA_MAP = [] + ###################################################################### # Default command sets ###################################################################### diff --git a/evennia/utils/ansi.py b/evennia/utils/ansi.py index f7b0fa7d7..f3f34de79 100644 --- a/evennia/utils/ansi.py +++ b/evennia/utils/ansi.py @@ -417,7 +417,7 @@ class ANSIParser(object): (r'|[W', ANSI_BACK_WHITE), # light grey background (r'|[X', ANSI_BACK_BLACK) # pure black background ] - ext_ansi_map += settings.ADDITIONAL_ANSI_MAPPINGS + ext_ansi_map += settings.COLOR_ANSI_EXTRA_MAP ansi_bright_bgs = [ # "bright" ANSI backgrounds using xterm256 since ANSI