示例#1
0
 def _setupPlugins(self, skipConfirm):
     shellsPrice = self.getShellsLayoutPrice()
     eqsPrice = self.getEqsLayoutPrice()
     isWalletValidatorEnabled = bool(shellsPrice.gold or eqsPrice.gold)
     self.addPlugins(
         (proc_plugs.VehicleLockValidator(self.vehicle),
          proc_plugs.WalletValidator(isWalletValidatorEnabled),
          proc_plugs.VehicleLayoutValidator(shellsPrice, eqsPrice)))
示例#2
0
 def __init__(self, vehicle, shellsLayout = None, eqsLayout = None):
     """
     Ctor.
     
     @param vehicle: vehicle
     @param shellsLayout: shells
     @param eqsLayout: equipments
     """
     super(VehicleLayoutProcessor, self).__init__()
     self.vehicle = vehicle
     self.shellsLayout = shellsLayout
     self.eqsLayout = eqsLayout
     shellsPrice = self.getShellsLayoutPrice()
     eqsPrice = self.getEqsLayoutPrice()
     isWalletValidatorEnabled = bool(shellsPrice[1] or eqsPrice[1])
     self.addPlugins((plugins.VehicleLockValidator(vehicle), plugins.WalletValidator(isWalletValidatorEnabled), plugins.VehicleLayoutValidator(shellsPrice, eqsPrice)))