Merge branch 'master' into acceptRomanNumerals

This commit is contained in:
Ryan Holmes
2018-02-23 01:01:07 -05:00
committed by GitHub
34 changed files with 286 additions and 29 deletions

View File

@@ -91,7 +91,10 @@ class FighterView(wx.Panel):
if fit:
for x in self.labels:
slot = getattr(Slot, "F_{}".format(x.upper()))
if fit.isStructure:
slot = getattr(Slot, "FS_{}".format(x.upper()))
else:
slot = getattr(Slot, "F_{}".format(x.upper()))
used = fit.getSlotsUsed(slot)
total = fit.getNumSlots(slot)
color = wx.Colour(204, 51, 51) if used > total else wx.SystemSettings_GetColour(

View File

@@ -242,6 +242,8 @@ class ItemParams(wx.Panel):
return "%s (%d)" % (group.name, value) if group is not None else str(value)
def attributeIDCallback():
if not value: # some attributes come through with a value of 0? See #1387
return "%d" % (value)
attribute = Attribute.getInstance().getAttributeInfo(value)
return "%s (%d)" % (attribute.name.capitalize(), value)