Exemple #1
0
 def __init__(self, vehicle, module, allowableTypes):
     super(VehicleItemProcessor, self).__init__(module, [
         proc_plugs.VehicleValidator(
             vehicle, False, prop={
                 'isBroken': True,
                 'isLocked': True
             }),
         proc_plugs.ModuleValidator(module),
         proc_plugs.ModuleTypeValidator(module, allowableTypes)
     ])
     self.vehicle = vehicle
     self.allowableTypes = allowableTypes
Exemple #2
0
 def __init__(self, vehicle, module, allowableTypes):
     """
     Ctor.
     
     @param vehicle: vehicle
     @param module: module to be installed
     @param allowableTypes: module allowable types
     """
     super(VehicleItemProcessor, self).__init__(module, [plugins.VehicleValidator(vehicle, False, prop={'isBroken': True,
       'isLocked': True}), plugins.ModuleValidator(module), plugins.ModuleTypeValidator(module, allowableTypes)])
     self.vehicle = vehicle
     self.allowableTypes = allowableTypes
Exemple #3
0
 def __init__(self, tankman, vehicle, slot):
     super(TankmanEquip, self).__init__()
     self.tankman = tankman
     self.vehicle = vehicle
     self.slot = slot
     self.isReequip = False
     anotherTankman = dict(vehicle.crew).get(slot)
     if tankman is not None and anotherTankman is not None and anotherTankman.invID != tankman.invID:
         self.isReequip = True
     self.addPlugins([
         plugins.VehicleValidator(vehicle, False, prop={'isLocked': True}),
         plugins.ModuleValidator(tankman),
         plugins.ModuleTypeValidator(tankman, (GUI_ITEM_TYPE.TANKMAN, ))
     ])