def __init__(self, nationID, vehTypeID, role, tmanCostTypeIdx):
     super(TankmanRecruit, self).__init__([
         plugins.VehicleCrewLockedValidator(
             self.itemsCache.items.getItemByCD(
                 makeIntCompactDescrByID('vehicle', nationID, vehTypeID))),
         plugins.MoneyValidator(self.__getRecruitPrice(tmanCostTypeIdx)),
         plugins.FreeTankmanValidator(isEnabled=tmanCostTypeIdx == 0),
         plugins.BarracksSlotsValidator(),
         plugins.IsLongDisconnectedFromCenter()
     ])
     self.nationID = nationID
     self.vehTypeID = vehTypeID
     self.role = role
     self.tmanCostTypeIdx = tmanCostTypeIdx
예제 #2
0
 def __init__(self, nationID, vehTypeID, role, tmanCostTypeIdx):
     super(TankmanRecruit, self).__init__([plugins.MoneyValidator(self.__getRecruitPrice(tmanCostTypeIdx)), plugins.FreeTankmanValidator(isEnabled=tmanCostTypeIdx == 0), plugins.BarracksSlotsValidator()])
     self.nationID = nationID
     self.vehTypeID = vehTypeID
     self.role = role
     self.tmanCostTypeIdx = tmanCostTypeIdx
예제 #3
0
 def __init__(self, vehicle, slot, tmanCostTypeIdx):
     super(TankmanRecruitAndEquip, self).__init__()
     self.vehicle = vehicle
     self.slot = slot
     self.tmanCostTypeIdx = tmanCostTypeIdx
     self.isReplace = dict(vehicle.crew).get(slot) is not None
     self.addPlugins([plugins.VehicleValidator(vehicle, False, prop={'isLocked': True}), plugins.MoneyValidator(self.__getRecruitPrice(tmanCostTypeIdx)), plugins.FreeTankmanValidator(isEnabled=tmanCostTypeIdx == 0)])
     return