def _packVehicles(self, vehs, discounts, event): return [ formatters.packContainer( self._makeLabelString(), isResizable=self._isResizableContainer(), subBlocks=[ formatters.packVehiclesBlock( formatters.makeUniqueTableID(event, self.getName()), formatters.VEH_ACTION_HEADER, vehs=_prepareVehData(vehs, discounts), disableChecker=lambda veh: not veh.isInInventory, showNotInHangarCB=True, isShowInHangarCBChecked=True) ]) ]
def format(self, event=None): vehs = [] discounts = {} for v, value in sorted(self.parse().iteritems(), key=operator.itemgetter(0)): discounts[v] = self._getDiscountParams(v, value) vehs.append(v) return [ formatters.packTopLevelContainer( QUESTS.DETAILS_MODIFIERS_TITLE_SELLING, subBlocks=[ formatters.packVehiclesBlock( formatters.makeUniqueTableID(event, self.getName()), formatters.VEH_ACTION_HEADER, vehs=_prepareVehData(vehs, discounts), disableChecker=lambda veh: not veh.isInInventory, showInHangarCB=True, isShowInHangarCBChecked=True) ]) ]
def format(self, event = None): vehs = [] discounts = {} for v, value in sorted(self.parse().iteritems(), key=operator.itemgetter(0)): discounts[v] = self._getDiscountParams(v, value) vehs.append(v) return [formatters.packTopLevelContainer(QUESTS.DETAILS_MODIFIERS_TITLE_SELLING, subBlocks=[formatters.packVehiclesBlock(formatters.makeUniqueTableID(event, self.getName()), formatters.VEH_ACTION_HEADER, vehs=_prepareVehData(vehs, discounts), disableChecker=lambda veh: not veh.isInInventory, showInHangarCB=True, isShowInHangarCBChecked=True)])]
def _packVehicles(self, vehs, discounts, event): return [formatters.packContainer(self._makeLabelString(), isResizable=self._isResizableContainer(), subBlocks=[formatters.packVehiclesBlock(formatters.makeUniqueTableID(event, self.getName()), formatters.VEH_ACTION_HEADER, vehs=_prepareVehData(vehs, discounts), disableChecker=lambda veh: not veh.isInInventory, showNotInHangarCB=True, isShowInHangarCBChecked=True)])]
def _makeUniqueTableID(cls, condition, event): return formatters.makeUniqueTableID(event, condition.getUniqueName())