Exemplo n.º 1
0
 def _getDisplayParams(cls, curEq, compareEq, eqsRange, param):
     curShell = vehicles.getItemByCompactDescr(getattr(curEq, param))
     compShell = vehicles.getItemByCompactDescr(getattr(compareEq, param))
     shellsRange = (vehicles.getItemByCompactDescr(getattr(eq, param)) for eq in eqsRange)
     curValue = curShell.stun.stunDuration if curShell.hasStun else 0
     compValue = compShell.stun.stunDuration if compShell.hasStun else 0
     return (curValue, compValue - curValue, max(((shell.stun.stunDuration if shell.hasStun else 0) for shell in shellsRange)))
Exemplo n.º 2
0
    def __init__(self, strCompactDescr=None, component=None, vehicleCD='', vehicleType=None):
        super(Outfit, self).__init__(strCompactDescr)
        self._containers = {}
        self._vehicleCD = vehicleCD
        if strCompactDescr is not None and component is not None:
            raise SoftException("'strCompactDescr' and 'component' arguments are mutually exclusive!")
        if strCompactDescr:
            component = parseOutfitDescr(strCompactDescr)
        elif component is None:
            component = CustomizationOutfit()
        self._id = component.styleId
        self.__styleProgressionLevel = component.styleProgressionLevel
        self.__styleSerialNumber = component.serial_number
        self._styleDescr = None
        if self._id:
            intCD = makeIntCompactDescrByID('customizationItem', CustomizationType.STYLE, self._id)
            if not IS_EDITOR:
                self._styleDescr = getItemByCompactDescr(intCD)
            else:
                from items.vehicles import g_cache
                if g_cache.customization20(createNew=False):
                    self._styleDescr = getItemByCompactDescr(intCD)
        self._construct(vehicleType=vehicleType)
        for container in self._containers.itervalues():
            container.unpack(component)

        self.__itemsCounter = None
        self.invalidate()
        return
 def bind(self, componentIdx, componentSlot):
     params = self._data[componentIdx]
     slotIdx = len(params)
     if componentIdx in Insignia.Indexes.ALL:
         if IS_EDITOR:
             defaultParams = _TextureParams('', '', False)
             item = items.vehicles.g_cache.customization20().insignias.get(componentSlot.edResourceId)
             stickerParam = defaultParams if item is None else self._convertToInsignia(item)
         else:
             container = self._outfit.getContainer(TankPartIndexes.GUN)
             slot = container.slotFor(GUI_ITEM_TYPE.INSIGNIA)
             intCD = slot.getItemCD(slotIdx)
             if intCD:
                 item = getItemByCompactDescr(intCD)
                 stickerParam = self._convertToInsignia(item)
                 self._useCustomInsignia = True
             else:
                 stickerParam = self._getDefaultParams()
     else:
         container = self._outfit.getContainer(componentIdx)
         slot = container.slotFor(GUI_ITEM_TYPE.INSIGNIA)
         intCD = slot.getItemCD(slotIdx)
         if intCD:
             item = getItemByCompactDescr(intCD)
             stickerParam = self._convertToCounter(item)
             self._useOldInsignia = False
         else:
             stickerParam = None
     params.append(_StickerSlotPair(componentSlot, stickerParam))
     return
 def bind(self, componentIdx, componentSlot):
     params = self._data[componentIdx]
     slotIdx = len(params)
     if componentIdx in Insignia.Indexes.ALL:
         container = self._outfit.getContainer(TankPartIndexes.GUN)
         slot = container.slotFor(GUI_ITEM_TYPE.INSIGNIA)
         intCD = slot.getItemCD(slotIdx)
         if intCD:
             item = getItemByCompactDescr(intCD)
             stickerParam = self._convertToInsignia(item)
             self._useCustomInsignia = True
         else:
             stickerParam = self._getDefaultParams()
     else:
         container = self._outfit.getContainer(componentIdx)
         slot = container.slotFor(GUI_ITEM_TYPE.INSIGNIA)
         intCD = slot.getItemCD(slotIdx)
         if intCD:
             item = getItemByCompactDescr(intCD)
             stickerParam = self._convertToCounter(item)
             self._useOldInsignia = False
         else:
             stickerParam = None
     params.append(_StickerSlotPair(componentSlot, stickerParam))
     return
Exemplo n.º 5
0
 def __validateInvItem(self, itemTypeID, errorCode):
     for intCompactDescr, itemData in self.itemsCache.items.inventory.getItemsData(
             itemTypeID).iteritems():
         try:
             vehicles.getItemByCompactDescr(abs(intCompactDescr))
         except Exception as e:
             raise ValidateException(
                 e.message, errorCode,
                 self.__packItemData(itemTypeID, itemData))
def getRepaint(outfit, containerId, vDesc):
    enabled = False
    quality = fading = 0.0
    overlapMetallic = overlapGloss = None
    nationID = vDesc.type.customizationNationID
    colorId = vDesc.type.baseColorID
    defaultColor = 0
    if items.vehicles.g_cache.customization20(createNew=False):
        defaultColors = items.vehicles.g_cache.customization20().defaultColors
        defaultColor = defaultColors[nationID][colorId]
    intCD = outfit.misc.slotFor(GUI_ITEM_TYPE.MODIFICATION).getItemCD()
    if intCD:
        mod = getItemByCompactDescr(intCD)
        enabled = True
        quality = mod.getEffectValue(ModificationType.PAINT_AGE, quality)
        fading = mod.getEffectValue(ModificationType.PAINT_FADING, fading)
        overlapMetallic = mod.getEffectValue(ModificationType.METALLIC,
                                             overlapMetallic)
        overlapGloss = mod.getEffectValue(ModificationType.GLOSS, overlapGloss)
    container = outfit.getContainer(containerId)
    paintSlot = container.slotFor(GUI_ITEM_TYPE.PAINT)
    capacity = paintSlot.capacity()
    camoSlot = container.slotFor(GUI_ITEM_TYPE.CAMOUFLAGE)
    if camoSlot is not None:
        if camoSlot.getItemCD():
            enabled = True
    colors = [defaultColor] * capacity
    metallics = [overlapMetallic or DEFAULT_METALLIC] * (capacity + 1)
    glosses = [overlapGloss or DEFAULT_GLOSS] * (capacity + 1)
    for idx in range(capacity):
        intCD = paintSlot.getItemCD(idx)
        if intCD:
            paint = getItemByCompactDescr(intCD)
            enabled = True
            colors[idx] = paint.color
            metallics[idx] = overlapMetallic or paint.metallic
            glosses[idx] = overlapGloss or paint.gloss
        if not (containerId == TankPartIndexes.GUN
                and idx == C11N_MASK_REGION):
            colors[idx] = colors[0]
            metallics[idx] = overlapMetallic or metallics[0]
            glosses[idx] = overlapGloss or glosses[0]

    colors = tuple(colors)
    metallics = tuple(metallics)
    glosses = tuple(glosses)
    return RepaintParams(enabled, defaultColor, colors, metallics, glosses,
                         fading, quality) if enabled else RepaintParams(
                             enabled, defaultColor)
 def _getParamValue(cls, curEq, param):
     curValue = 0
     shellID = super(NestedShellStunValuesMixin, cls)._getParamValue(curEq, param)
     curShell = vehicles.getItemByCompactDescr(shellID)
     if curShell:
         curValue = curShell.stun.stunDuration if curShell.hasStun else 0
     return _getFormattedNum(curValue)
Exemplo n.º 8
0
 def createCustomization(self, intCompactDescr, proxy=None):
     """
     Creates customization items by the given arguments.
     
     :param intCompactDescr: item int compact descriptor
     :param proxy: instance of ItemsRequester
     
     :return: an instance of one of customizations
     """
     descriptor = vehicles.getItemByCompactDescr(intCompactDescr)
     if descriptor.itemType == CustomizationType.CAMOUFLAGE:
         cls = Camouflage
     elif descriptor.itemType == CustomizationType.PAINT:
         cls = Paint
     elif descriptor.itemType == CustomizationType.MODIFICATION:
         cls = Modification
     elif descriptor.itemType == CustomizationType.STYLE:
         cls = Style
     elif descriptor.itemType == CustomizationType.DECAL:
         if descriptor.type == DecalType.EMBLEM:
             cls = Emblem
         elif descriptor.type == DecalType.INSCRIPTION:
             cls = Inscription
         else:
             LOG_WARNING('Unknown decal type', descriptor.type)
             cls = Decal
     else:
         LOG_WARNING('Unknown customization type', descriptor.itemType)
         cls = Customization
     return cls(intCompactDescr, proxy)
    def __init__(self,
                 strCompactDescr=None,
                 component=None,
                 vehicleCD='',
                 vehicleType=None):
        super(Outfit, self).__init__(strCompactDescr)
        self._containers = {}
        self._vehicleCD = vehicleCD
        if strCompactDescr is not None and component is not None:
            raise SoftException(
                "'strCompactDescr' and 'component' arguments are mutually exclusive!"
            )
        if strCompactDescr:
            component = parseOutfitDescr(strCompactDescr)
        elif component is None:
            component = CustomizationOutfit()
        self._id = component.styleId
        if self._id:
            intCD = makeIntCompactDescrByID('customizationItem',
                                            CustomizationType.STYLE, self._id)
            self._styleDescr = getItemByCompactDescr(intCD)
        else:
            self._styleDescr = None
        self._construct(vehicleType=vehicleType)
        for container in self._containers.itervalues():
            container.unpack(component)

        self.__itemsCounter = None
        self.invalidate()
        return
Exemplo n.º 10
0
def getItemDescrByCompactDescr(compDescr):
    itemTypeID, _, _ = vehicles.parseIntCompactDescr(compDescr)
    if itemTypeID in vehicles.VEHICLE_ITEM_TYPES:
        descr = vehicles.getItemByCompactDescr(compDescr)
    else:
        descr = tankmen.getItemByCompactDescr(compDescr)
    return descr
Exemplo n.º 11
0
 def createCustomization(self, intCompactDescr, proxy=None):
     descriptor = vehicles.getItemByCompactDescr(intCompactDescr)
     if descriptor.itemType == CustomizationType.CAMOUFLAGE:
         cls = Camouflage
     elif descriptor.itemType == CustomizationType.PAINT:
         cls = Paint
     elif descriptor.itemType == CustomizationType.MODIFICATION:
         cls = Modification
     elif descriptor.itemType == CustomizationType.STYLE:
         cls = Style
     elif descriptor.itemType == CustomizationType.DECAL:
         if descriptor.type == DecalType.EMBLEM:
             cls = Emblem
         elif descriptor.type == DecalType.INSCRIPTION:
             cls = Inscription
         else:
             LOG_WARNING('Unknown decal type', descriptor.type)
             cls = Decal
     elif descriptor.itemType == CustomizationType.PERSONAL_NUMBER:
         cls = PersonalNumber
     elif descriptor.itemType == CustomizationType.PROJECTION_DECAL:
         cls = ProjectionDecal
     elif descriptor.itemType == CustomizationType.INSIGNIA:
         cls = Insignia
     elif descriptor.itemType == CustomizationType.SEQUENCE:
         cls = Sequence
     elif descriptor.itemType == CustomizationType.ATTACHMENT:
         cls = Attachment
     else:
         LOG_WARNING('Unknown customization type', descriptor.itemType)
         cls = Customization
     return cls(intCompactDescr, proxy)
Exemplo n.º 12
0
    def __init__(self,
                 strCompactDescr=None,
                 isEnabled=False,
                 isInstalled=False,
                 proxy=None):
        super(Outfit, self).__init__(strCompactDescr)
        self._containers = {}
        if strCompactDescr:
            component = parseCompDescr(strCompactDescr)
        else:
            component = CustomizationOutfit()
        self._id = component.styleId
        if self._id:
            intCD = makeIntCompactDescrByID('customizationItem',
                                            CustomizationType.STYLE, self._id)
            self._styleDescr = getItemByCompactDescr(intCD)
        else:
            self._styleDescr = None
        self._isEnabled = isEnabled
        self._isInstalled = isInstalled
        for container in scaffold():
            container.unpack(component, proxy)
            self._containers[container.getAreaID()] = container

        self.invalidate()
        return
Exemplo n.º 13
0
def getFormattedParamsList(descriptor, parameters, excludeRelative=False):
    if vehicles.isVehicleDescr(descriptor):
        compactDescr = descriptor.type.compactDescr
    else:
        compactDescr = descriptor.compactDescr
    itemTypeIdx = getTypeOfCompactDescr(compactDescr)
    if itemTypeIdx == ITEM_TYPES.equipment:
        eqDescr = vehicles.getItemByCompactDescr(compactDescr)
        paramsList = ITEMS_PARAMS_LIST[itemTypeIdx].get(type(eqDescr), [])
    else:
        paramsList = ITEMS_PARAMS_LIST[itemTypeIdx]
    params = []
    for paramName in paramsList:
        if excludeRelative and isRelativeParameter(paramName):
            continue
        paramValue = parameters.get(paramName)
        if paramValue:
            fmtValue = formatParameter(paramName, paramValue)
            if fmtValue:
                if paramName == 'autoReloadTime' and descriptor.gun.autoreloadHasBoost:
                    paramName = 'autoReloadTimeBoost'
                elif paramName == CHASSIS_REPAIR_TIME and descriptor.isTrackWithinTrack:
                    paramName = CHASSIS_REPAIR_TIME_YOH
                params.append((paramName, fmtValue))

    return params
def getCamo(appearance, outfit, containerId, vDesc, descId, isDamaged, default=None):
    result = default
    if not outfit:
        return result
    else:
        container = outfit.getContainer(containerId)
        slot = container.slotFor(GUI_ITEM_TYPE.CAMOUFLAGE)
        if not slot:
            return result
        intCD = slot.getItemCD()
        if intCD:
            camouflage = getItemByCompactDescr(intCD)
            component = slot.getComponent()
            try:
                palette = camouflage.palettes[component.palette]
            except IndexError:
                palette = camouflage.palettes[0]

            weights = Math.Vector4(*[ (c >> 24) / 255.0 for c in palette ])
            if isDamaged:
                weights *= _DEAD_VEH_WEIGHT_COEFF
            vehPartCompDesc = getattr(vDesc, descId, None)
            if not vehPartCompDesc:
                return result
            area = vehPartCompDesc.customizableVehicleAreas.get(lower(CustomizationTypeNames[CustomizationType.CAMOUFLAGE]), (0, None))[0]
            if not area:
                return result
            tiling, exclusionMap = processTiling(appearance, vDesc, descId, camouflage, component)
            camoAngle = camouflage.rotation[descId]
            result = CamoParams(camouflage.texture, exclusionMap or '', tiling, camoAngle, weights, palette[0], palette[1], palette[2], palette[3])
        return result
def getGenericProjectionDecals(outfit, vehDesc):
    decalsParams = []
    style = outfit.style
    model = style.modelsSet if style is not None and style.modelsSet else SLOT_DEFAULT_ALLOWED_MODEL
    for slotParams in __vehicleSlotsByType(
            vehDesc, SLOT_TYPE_NAMES.FIXED_PROJECTION_DECAL):
        if model in slotParams.compatibleModels:
            if IS_EDITOR and (slotParams.edResourceId <= 0
                              or not slotParams.slotWrapper.canDraw):
                continue
            fixedDecalParams = __getFixedProjectionDecalParams(slotParams)
            decalsParams.append(fixedDecalParams)

    if not IS_EDITOR:
        if decalsParams:
            return decalsParams
    slotsByIdMap, slotsByTagMap = __createVehSlotsMaps(vehDesc)
    projectionDecalsMultiSlot = outfit.misc.slotFor(
        GUI_ITEM_TYPE.PROJECTION_DECAL)
    if style is not None:
        succeeded = _matchTaggedProjectionDecalsToSlots(
            projectionDecalsMultiSlot, slotsByTagMap)
        if not succeeded:
            _logger.error(
                'Failed to match tagged projection decals of style: %(styleId)s to vehicle: %(vehName)s slots.',
                {
                    'styleId': outfit.id,
                    'vehName': vehDesc.type.name
                })
            return decalsParams
    projectionDecalsMultiSlot.sortByTags(slotsByIdMap)
    outfit.invalidateItemsCounter()
    for idx in projectionDecalsMultiSlot.order():
        slotData = projectionDecalsMultiSlot.getSlotData(idx)
        if slotData.isEmpty():
            continue
        item = getItemByCompactDescr(slotData.intCD)
        component = slotData.component
        slotId = component.slotId
        if slotId != ProjectionDecalPacker.STYLED_SLOT_ID:
            if slotId not in slotsByIdMap:
                _logger.error(
                    'Projection Decal slot mismatch. SlotId: %(slotId)s; Vehicle: %(vehName)s',
                    {
                        'slotId': slotId,
                        'vehName': vehDesc.type.name
                    })
                continue
            slotParams = slotsByIdMap[slotId]
        elif component.tags:
            continue
        else:
            slotParams = None
        decalParams = __getProjectionDecalParams(vehDesc, item, component,
                                                 slotParams)
        if decalParams is not None:
            decalsParams.append(decalParams)

    return decalsParams
def __getFixedProjectionDecalParams(slotParams):
    intCD = makeIntCompactDescrByID('customizationItem', CustomizationType.PROJECTION_DECAL, slotParams.itemId)
    item = getItemByCompactDescr(intCD)
    tintColor = __getProjectionDecalTintColor()
    mirroredHorizontally = slotParams.options & Options.MIRRORED_HORIZONTALLY
    mirroredVertically = slotParams.options & Options.MIRRORED_VERTICALLY
    params = ProjectionDecalGenericParams(tintColor=tintColor, position=Math.Vector3(slotParams.position), rotation=Math.Vector3(slotParams.rotation), scale=Math.Vector3(slotParams.scale), decalMap=item.texture, glossDecalMap=item.glossTexture, applyAreas=slotParams.showOn, clipAngle=slotParams.clipAngle, mirroredHorizontally=mirroredHorizontally, mirroredVertically=mirroredVertically, doubleSided=slotParams.doubleSided, scaleBySlotSize=True)
    return params
 def __validateInvItem(self, itemTypeID, errorCode):
     for intCompactDescr, itemData in self.itemsCache.items.inventory.getCacheValue(itemTypeID, {}).iteritems():
         try:
             item = vehicles.getItemByCompactDescr(abs(intCompactDescr))
             if item.typeID != itemTypeID:
                 raise SoftException('Expected {} to be of type {}, got {} instead'.format(intCompactDescr, itemTypeID, item.typeID))
         except Exception as e:
             raise ValidateException(e.message, errorCode, _packItemData(itemTypeID, itemData))
Exemplo n.º 18
0
 def pack(slot, component):
     for region, intCD, subcomp in slot.items():
         item = getItemByCompactDescr(intCD)
         component.camouflages.append(
             CamouflageComponent(id=item.id,
                                 patternSize=subcomp.patternSize,
                                 palette=subcomp.palette,
                                 appliedTo=region))
Exemplo n.º 19
0
 def __getItemsDescriptors(self, itemType, idx):
     iterator = CACHE_ITERATORS[itemType](idx)
     if itemType == ITEM_TYPES.vehicle:
         return [vehicles.VehicleDescr(typeID=(idx, cd)) for cd in iterator]
     return [
         vehicles.getItemByCompactDescr(data.compactDescr)
         for data in iterator
     ]
def getModelAnimatorsPrereqs(outfit, spaceId):
    multiSlot = outfit.misc.slotFor(GUI_ITEM_TYPE.SEQUENCE)
    prereqs = []
    for _, intCD, _ in multiSlot.items():
        item = getItemByCompactDescr(intCD)
        prereqs.append(AnimationSequence.Loader(item.sequenceName, spaceId))

    return prereqs
Exemplo n.º 21
0
 def pack(slot, component):
     for _, intCD, subcomp in slot.items():
         item = getItemByCompactDescr(intCD)
         component.attachments.append(
             AttachmentComponent(id=item.id,
                                 slotId=subcomp.slotId,
                                 position=subcomp.position,
                                 rotation=subcomp.rotation))
Exemplo n.º 22
0
 def pack(slot, component):
     for region, intCD, subcomp in slot.items(
         (CustomizationType.PERSONAL_NUMBER, )):
         item = getItemByCompactDescr(intCD)
         component.personal_numbers.append(
             PersonalNumberComponent(id=item.id,
                                     number=subcomp.number,
                                     appliedTo=region))
 def _checkSlotCompatibility(self, parsedCompDescr=None, descr=None):
     res, _ = super(EpicEquipmentSlot,
                    self)._checkSlotCompatibility(parsedCompDescr, descr)
     if not res:
         return (res, _)
     item = descr or getItemByCompactDescr(parsedCompDescr)
     return (self.tags.intersection(self.JOINING_TAGS).issubset(
         getattr(item, 'tags', ())), '')
Exemplo n.º 24
0
 def createEquipment(self, intCompactDescr, proxy=None, isBoughtForCredits=False):
     descriptor = vehicles.getItemByCompactDescr(intCompactDescr)
     if descriptor.equipmentType == EQUIPMENT_TYPES.battleBoosters:
         cls = BattleBooster
     elif descriptor.equipmentType == EQUIPMENT_TYPES.battleAbilities:
         cls = BattleAbility
     else:
         cls = Equipment
     return cls(intCompactDescr, proxy, isBoughtForCredits)
Exemplo n.º 25
0
    def getOrderedShellsLayout(self):
        result = []
        for intCD in self._order:
            descriptor = vehicles.getItemByCompactDescr(intCD)
            quantity, quantityInClip = self.__ammo[intCD]
            result.append((intCD, descriptor, quantity, quantityInClip,
                           self.__gunSettings))

        return result
Exemplo n.º 26
0
 def customizationDisplayType(self):
     if self._styleDescr:
         return self._styleDescr.customizationDisplayType
     itemsCustomizationDisplayType = [
         getItemByCompactDescr(intCD).customizationDisplayType
         for intCD in self.items()
     ]
     return max(
         itemsCustomizationDisplayType
     ) if itemsCustomizationDisplayType else CustomizationDisplayType.HISTORICAL
def getEquipmentParameters(eqpDescr):
    params = dict()
    eqDescrType = type(eqpDescr)
    if eqDescrType is artefacts.RageArtillery:
        shellDescr = vehicles.getItemByCompactDescr(eqpDescr.shellCompactDescr)
        params.update({'damage': (shellDescr.damage[0],) * 2,
         'piercingPower': eqpDescr.piercingPower,
         'caliber': shellDescr.caliber,
         'shotsNumberRange': eqpDescr.shotsNumber,
         'areaRadius': eqpDescr.areaRadius,
         'artDelayRange': eqpDescr.delay})
    elif eqDescrType is artefacts.RageBomber:
        shellDescr = vehicles.getItemByCompactDescr(eqpDescr.shellCompactDescr)
        params.update({'bombDamage': (shellDescr.damage[0],) * 2,
         'piercingPower': eqpDescr.piercingPower,
         'bombsNumberRange': eqpDescr.bombsNumber,
         'areaSquare': eqpDescr.areaLength * eqpDescr.areaWidth,
         'flyDelayRange': eqpDescr.delay})
    return params
Exemplo n.º 28
0
    def items(self, customizationTypes=None):
        if customizationTypes:
            for idx, pair in self._items.iteritems():
                item = getItemByCompactDescr(pair.intCD)
                if item.itemType in customizationTypes:
                    yield (self._regions[idx], pair.intCD, pair.component)

        else:
            for idx, pair in self._items.iteritems():
                yield (self._regions[idx], pair.intCD, pair.component)
Exemplo n.º 29
0
def getEquipmentParameters(eqpDescr):
    params = dict()
    eqDescrType = type(eqpDescr)
    if eqDescrType is artefacts.RageArtillery:
        shellDescr = vehicles.getItemByCompactDescr(eqpDescr.shellCompactDescr)
        params.update({
            'damage': (shellDescr.damage[0], ) * 2,
            'piercingPower': eqpDescr.piercingPower,
            'caliber': shellDescr.caliber,
            'shotsNumberRange': eqpDescr.shotsNumber,
            'areaRadius': eqpDescr.areaRadius,
            'artDelayRange': eqpDescr.delay
        })
    elif eqDescrType is artefacts.RageBomber:
        shellDescr = vehicles.getItemByCompactDescr(eqpDescr.shellCompactDescr)
        params.update({
            'bombDamage': (shellDescr.damage[0], ) * 2,
            'piercingPower': eqpDescr.piercingPower,
            'bombsNumberRange': eqpDescr.bombsNumber,
            'areaSquare': eqpDescr.areaLength * eqpDescr.areaWidth,
            'flyDelayRange': eqpDescr.delay
        })
    elif eqDescrType is artefacts.AttackArtilleryFortEquipment:
        params.update({
            'maxDamage': eqpDescr.maxDamage,
            'commonDelay': eqpDescr.delay,
            'areaRadius': eqpDescr.areaRadius,
            'duration': eqpDescr.duration
        })
    elif eqDescrType in (artefacts.FortConsumableInspire,
                         artefacts.ConsumableInspire):
        params.update({
            'crewRolesFactor':
            max(eqpDescr.increaseFactors['crewRolesFactor'] * 100 - 100, 0),
            'inactivationDelay':
            eqpDescr.inactivationDelay,
            'commonAreaRadius':
            eqpDescr.radius,
            'duration':
            eqpDescr.duration
        })
    return params
 def getAttachmentParams(slotParams, slotData, idx):
     item = getItemByCompactDescr(slotData.intCD)
     return AttachmentParams(
         transform=__createTransform(slotParams, slotData),
         attachNode=slotParams.attachNode,
         modelName=item.modelName,
         sequenceId=item.sequenceId,
         attachmentLogic=item.attachmentLogic,
         initialVisibility=item.initialVisibility,
         partNodeAlias='attachment' +
         str(idx) if item.attachmentLogic != 'prefab' else None)