コード例 #1
0
 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)
             ])
     ]
コード例 #2
0
    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)
                ])
        ]
コード例 #3
0
ファイル: modifiers.py プロジェクト: webiumsk/WOT-0.9.14-CT
    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)])]
コード例 #4
0
ファイル: modifiers.py プロジェクト: webiumsk/WOT-0.9.14-CT
 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)])]
コード例 #5
0
ファイル: __init__.py プロジェクト: mahmoudimus/WOT-0.9.20.0
 def _makeUniqueTableID(cls, condition, event):
     return formatters.makeUniqueTableID(event, condition.getUniqueName())