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

Method __init__

eos/saveddata/ship.py:47–61  ·  view source on GitHub ↗
(self, item, owner=None)

Source from the content-addressed store, hash-verified

45 }
46
47 def __init__(self, item, owner=None):
48 self.validate(item)
49
50 self.__item = item
51 self.__modeItems = self.__getModeItems()
52 self.__itemModifiedAttributes = ModifiedAttributeDict(parent=self)
53 self.__itemModifiedAttributes.original = dict(self.item.attributes)
54 self.__itemModifiedAttributes.original.update(self.EXTRA_ATTRIBUTES)
55 self.__itemModifiedAttributes.overrides = self.item.overrides
56
57 if "maximumRangeCap" in self.__itemModifiedAttributes.original:
58 maxLimitAttrKeyCache["maxTargetRange"] = "maximumRangeCap"
59
60 self.owner = owner
61 self.commandBonus = 0
62
63 def validate(self, item):
64 if item.category.name != "Ship":

Callers

nothing calls this directly

Calls 4

validateMethod · 0.95
__getModeItemsMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected