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

Method init

eos/saveddata/drone.py:58–77  ·  view source on GitHub ↗

Initialize a drone from the database and validate

(self)

Source from the content-addressed store, hash-verified

56
57 @reconstructor
58 def init(self):
59 """Initialize a drone from the database and validate"""
60 self._item = None
61
62 if self.itemID:
63 self._item = eos.db.getItem(self.itemID)
64 if self._item is None:
65 pyfalog.error("Item (id: {0}) does not exist", self.itemID)
66 return
67
68 try:
69 self._mutaReconstruct()
70 except MutaError:
71 return
72
73 if self.isInvalid:
74 pyfalog.error("Item (id: {0}) is not a Drone", self.itemID)
75 return
76
77 self.build()
78
79 def build(self):
80 """ Build object. Assumes proper and valid item already set """

Callers

nothing calls this directly

Calls 3

buildMethod · 0.95
getItemMethod · 0.80
_mutaReconstructMethod · 0.80

Tested by

no test coverage detected