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

Class CargoInfo

gui/fitCommands/helpers.py:324–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323
324class CargoInfo:
325
326 def __init__(self, itemID, amount):
327 self.itemID = itemID
328 self.amount = amount
329
330 @classmethod
331 def fromCargo(cls, cargo):
332 if cargo is None:
333 return None
334 info = cls(
335 itemID=cargo.itemID,
336 amount=cargo.amount)
337 return info
338
339 def toCargo(self):
340 item = Market.getInstance().getItem(self.itemID)
341 cargo = Cargo(item)
342 cargo.amount = self.amount
343 return cargo
344
345 def __repr__(self):
346 return makeReprStr(self, ['itemID', 'amount'])
347
348
349def activeStateLimit(itemIdentity):

Callers 9

DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
DoMethod · 0.90
UndoMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected