Clothings lots config rework

This commit is contained in:
olehhapuk
2026-05-26 23:24:53 +03:00
parent 75d1059e91
commit 2e8a4b2450
25 changed files with 159 additions and 279 deletions
@@ -89,21 +89,21 @@ void UEquipClothingRestriction::OnClothingUnequipped(const UClothingItemInstance
void UEquipClothingRestriction::CheckClothing()
{
for (const FClothingSlotData& ClothingSlot : Player->ClothingManager->ClothingSlots)
{
if (!ClothingSlot.ClothingItemInstance)
{
continue;
}
const bool IsTargetClothing = ClothingItems.FindByPredicate([&ClothingSlot](const UClothingItem* Item)
{
return Item && Item->Name.EqualTo(ClothingSlot.ClothingItemInstance->GetClothingItem()->Name);
}) != nullptr;
if (IsTargetClothing)
{
Complete();
return;
}
}
// for (const FClothingSlotData& ClothingSlot : Player->ClothingManager->ClothingSlots)
// {
// if (!ClothingSlot.ClothingItemInstance)
// {
// continue;
// }
//
// const bool IsTargetClothing = ClothingItems.FindByPredicate([&ClothingSlot](const UClothingItem* Item)
// {
// return Item && Item->Name.EqualTo(ClothingSlot.ClothingItemInstance->GetClothingItem()->Name);
// }) != nullptr;
// if (IsTargetClothing)
// {
// Complete();
// return;
// }
// }
}
@@ -74,22 +74,22 @@ void UExposeBodyPartRestriction::UnequipClothing(const UClothingItemInstance* Cl
void UExposeBodyPartRestriction::CheckClothing()
{
if (!Player || !Player->ClothingManager || Player->ClothingManager->ClothingSlots.IsEmpty())
{
return;
}
const FClothingSlotData* TargetClothingItem = Player->ClothingManager->ClothingSlots.FindByPredicate([this](const FClothingSlotData& ClothingSlot)
{
if (ClothingSlot.ClothingItemInstance)
{
return true; // TODO: Add exposed body part resolution
}
return false;
});
if (!TargetClothingItem)
{
Complete();
}
// if (!Player || !Player->ClothingManager || Player->ClothingManager->ClothingSlots.IsEmpty())
// {
// return;
// }
//
// const FClothingSlotData* TargetClothingItem = Player->ClothingManager->ClothingSlots.FindByPredicate([this](const FClothingSlotData& ClothingSlot)
// {
// if (ClothingSlot.ClothingItemInstance)
// {
// return true; // TODO: Add exposed body part resolution
// }
//
// return false;
// });
// if (!TargetClothingItem)
// {
// Complete();
// }
}