MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / DmgPatternEntityEditor

Class DmgPatternEntityEditor

gui/patternEditor.py:63–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63class DmgPatternEntityEditor(EntityEditor):
64 def __init__(self, parent):
65 EntityEditor.__init__(self, parent, _t("Damage Profile"))
66 self.SetEditorValidator(DmgPatternNameValidator)
67
68 def getEntitiesFromContext(self):
69 sDP = DamagePattern.getInstance()
70 choices = sorted(sDP.getUserDamagePatternList(), key=lambda p: p.rawName)
71 choices = [c for c in choices if c.rawName != "Selected Ammo"]
72 return choices
73
74 def DoNew(self, name):
75 sDP = DamagePattern.getInstance()
76 return sDP.newPattern(name)
77
78 def DoRename(self, entity, name):
79 sDP = DamagePattern.getInstance()
80 sDP.renamePattern(entity, name)
81
82 def DoCopy(self, entity, name):
83 sDP = DamagePattern.getInstance()
84 copy = sDP.copyPattern(entity)
85 sDP.renamePattern(copy, name)
86 return copy
87
88 def DoDelete(self, entity):
89 sDP = DamagePattern.getInstance()
90 sDP.deletePattern(entity)
91
92
93class DmgPatternEditor(AuxiliaryFrame):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected