def _getAnchorVOs(self):
     slotId = C11nId(self.STYLE_SLOT.areaId, self.STYLE_SLOT.slotType,
                     self.STYLE_SLOT.regionIdx)
     uid = customizationSlotIdToUid(slotId)
     intCD = self.modifiedStyle.intCD if self.modifiedStyle is not None else 0
     anchorVO = CustomizationSlotUpdateVO(slotId=slotId._asdict(),
                                          itemIntCD=intCD,
                                          uid=uid)
     return [anchorVO._asdict()]
Esempio n. 2
0
 def _getAnchorVOs(self):
     if self.slotType in EDITABLE_STYLE_APPLY_TO_ALL_AREAS_TYPES:
         slotId = EDITABLE_STYLE_APPLY_TO_ALL_AREAS_TYPES[self.slotType]
         item = self.getItemFromSlot(slotId)
         intCD = item.intCD if item is not None else 0
         uid = customizationSlotIdToUid(slotId)
         anchorVO = CustomizationSlotUpdateVO(slotId=slotId._asdict(), itemIntCD=intCD, uid=uid)
         return [anchorVO._asdict()]
     else:
         return super(EditableStyleMode, self)._getAnchorVOs()
Esempio n. 3
0
    def _getAnchorVOs(self):
        anchorVOs = []
        if g_currentVehicle.isPresent():
            for areaId in Area.ALL:
                slot = self.currentOutfit.getContainer(areaId).slotFor(self.slotType)
                for regionIdx, anchor in g_currentVehicle.item.getAnchors(self.slotType, areaId):
                    if anchor.hiddenForUser:
                        continue
                    model = self.currentOutfit.modelsSet or SLOT_DEFAULT_ALLOWED_MODEL
                    if model not in anchor.compatibleModels:
                        continue
                    slotId = C11nId(areaId, self.slotType, regionIdx)
                    intCD = slot.getItemCD(regionIdx)
                    uid = customizationSlotIdToUid(slotId)
                    anchorVO = CustomizationSlotUpdateVO(slotId=slotId._asdict(), itemIntCD=intCD, uid=uid)
                    anchorVOs.append(anchorVO._asdict())

        return anchorVOs