mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Made it so system cmdsets (_exitcmdset and _channelcmdset for example) don't replace the name of other cmdsets in a merger. These "invisible" cmdsets caused confusion for the key_mergetype dictionary (which should e.g. ignore the DefaultCharacter set instead of replace it, but since the system cmdsets were merged in, the DefaultCharacter set is no longer named that when it's time to merge in the new set). The fix ignores name replacing if the merging set has a key starting with _.
This commit is contained in:
parent
769e2a8744
commit
0ea57f33a9
1 changed files with 6 additions and 0 deletions
|
|
@ -278,6 +278,9 @@ class CmdSet(object):
|
|||
cmdset_c.no_channels = self.no_channels
|
||||
cmdset_c.no_exits = self.no_exits
|
||||
cmdset_c.no_objs = self.no_objs
|
||||
if self.key.startswith("_"):
|
||||
# don't rename new output if the merge set's name starts with _
|
||||
cmdset_c.key = cmdset_b.key
|
||||
|
||||
else:
|
||||
# B higher priority than A
|
||||
|
|
@ -297,6 +300,9 @@ class CmdSet(object):
|
|||
cmdset_c.no_channels = cmdset_b.no_channels
|
||||
cmdset_c.no_exits = cmdset_b.no_exits
|
||||
cmdset_c.no_objs = cmdset_b.no_objs
|
||||
if cmdset_b.key.startswith("_"):
|
||||
# don't rename new output if the merge set's name starts with _
|
||||
cmdset_c.key = self.key
|
||||
|
||||
# we store actual_mergetype since key_mergetypes
|
||||
# might be different from the main mergetype.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue