diff --git a/evennia/contrib/rpg/rpsystem/rpsystem.py b/evennia/contrib/rpg/rpsystem/rpsystem.py index 6a34d39baf..cb2302b3fa 100644 --- a/evennia/contrib/rpg/rpsystem/rpsystem.py +++ b/evennia/contrib/rpg/rpsystem/rpsystem.py @@ -318,15 +318,15 @@ def regex_tuple_from_key_alias(obj): """ global _REGEX_TUPLE_CACHE - permutation_string = " ".join([obj.key] + obj.aliases.all()) - if permutation_string not in _REGEX_TUPLE_CACHE: + if obj.id not in _REGEX_TUPLE_CACHE: + permutation_string = " ".join([obj.key] + obj.aliases.all()) _REGEX_TUPLE_CACHE[permutation_string] = ( re.compile(ordered_permutation_regex(permutation_string), _RE_FLAGS), obj, obj.key, ) - return _REGEX_TUPLE_CACHE[permutation_string] + return _REGEX_TUPLE_CACHE[obj.id] def parse_language(speaker, emote):