def GetCommodityVolume(self, commodities = None, excluded = None): volume = 0 for key, item in commodities.iteritems(): if excluded is None or key not in excluded: volume += GetTypeVolume(key[1], item.quantity) return volume
def GetSpaceportCapacityUsed(self): pin = self.planet.GetPin(self.spaceportPinID) if not pin: return 0 capacity = pin.capacityUsed for item in self.importContents.values(): capacity += GetTypeVolume(item.typeID, item.quantity) return capacity
def GetCustomsCapacityUsed(self): capacity = self.customsOffice.GetCapacity().used for item in self.exportContents.values(): capacity += GetTypeVolume(item.typeID, item.quantity) return capacity