MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / init

Method init

eos/saveddata/fighter.py:79–93  ·  view source on GitHub ↗

Initialize a fighter from the database and validate

(self)

Source from the content-addressed store, hash-verified

77
78 @reconstructor
79 def init(self):
80 """Initialize a fighter from the database and validate"""
81 self.__item = None
82
83 if self.itemID:
84 self.__item = eos.db.getItem(self.itemID)
85 if self.__item is None:
86 pyfalog.error("Item (id: {0}) does not exist", self.itemID)
87 return
88
89 if self.isInvalid:
90 pyfalog.error("Item (id: {0}) is not a Fighter", self.itemID)
91 return
92
93 self.build()
94
95 def build(self):
96 """ Build object. Assumes proper and valid item already set """

Callers

nothing calls this directly

Calls 2

buildMethod · 0.95
getItemMethod · 0.80

Tested by

no test coverage detected