Use short name only if short mutaplasmid name is available

This commit is contained in:
DarkPhoenix
2021-10-26 12:49:27 +03:00
parent 4669b4813c
commit b2217bb6cd
2 changed files with 5 additions and 2 deletions

View File

@@ -570,7 +570,7 @@ class DynamicItem(EqBase):
@property
def shortName(self):
name = self.item.name
name = self.item.customName
keywords = ('Decayed', 'Gravid', 'Unstable', 'Radical')
for kw in keywords:
if name.startswith(f'{kw} '):

View File

@@ -47,7 +47,10 @@ class MutatedMixin:
@property
def fullName(self):
if self.isMutated:
return f'{self.mutaplasmid.shortName} {self.baseItem.customName}'
mutaShortName = self.mutaplasmid.shortName
mutaFullName = self.mutaplasmid.item.customName
if mutaShortName != mutaFullName:
return f'{self.mutaplasmid.shortName} {self.baseItem.customName}'
return self.item.customName
def _mutaInit(self, baseItem, mutaplasmid):