Merge branch 'master' into ammo_graph

This commit is contained in:
DarkPhoenix
2019-12-07 03:34:26 +03:00
129 changed files with 17059 additions and 845 deletions

View File

@@ -48,7 +48,7 @@ class DmgPatternNameValidator(BaseValidator):
try:
if len(text) == 0:
raise ValueError("You must supply a name for your Damage Profile!")
elif text in [x.name for x in entityEditor.choices]:
elif text in [x.rawName for x in entityEditor.choices]:
raise ValueError("Damage Profile name already in use, please choose another.")
return True
@@ -66,8 +66,8 @@ class DmgPatternEntityEditor(EntityEditor):
def getEntitiesFromContext(self):
sDP = DamagePattern.getInstance()
choices = sorted(sDP.getDamagePatternList(), key=lambda p: p.name)
return [c for c in choices if c.name != "Selected Ammo"]
choices = sorted(sDP.getUserDamagePatternList(), key=lambda p: p.rawName)
return [c for c in choices if c.rawName != "Selected Ammo"]
def DoNew(self, name):
sDP = DamagePattern.getInstance()
@@ -237,7 +237,7 @@ class DmgPatternEditor(AuxiliaryFrame):
if p is None:
return
if p.name == "Uniform" or p.name == "Selected Ammo":
if p.rawName == "Uniform" or p.rawName == "Selected Ammo":
self.restrict()
else:
self.unrestrict()