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
+7 -27
View File
@@ -4,7 +4,7 @@
#include "CoreMinimal.h"
#include "BodyPart.h"
#include "ClothingSlotData.h"
#include "ClothingSlotType.h"
#include "Components/ActorComponent.h"
#include "ClothingManager.generated.h"
@@ -26,9 +26,6 @@ public:
UPROPERTY(BlueprintReadWrite, Category = "Clothing Manager|Clothing")
USkeletalMeshComponent* RootMesh = nullptr;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing Manager|Clothing")
TArray<FClothingSlotData> ClothingSlots;
UPROPERTY(BlueprintAssignable)
FOnClothingChangeSignature OnClothingEquip;
@@ -39,35 +36,15 @@ public:
UPROPERTY(BlueprintAssignable)
FOnClothingChangeSignature OnClothingDropped;
UFUNCTION(BlueprintCallable)
void PutOnClothing(UClothingItemInstance* ClothingItemInstance);
UFUNCTION(BlueprintCallable)
void DropClothing(const EClothingSlotType ClothingType);
UFUNCTION(BlueprintCallable)
bool IsClothingTypeOn(const EClothingSlotType ClothingType);
UFUNCTION(BlueprintCallable)
bool IsPartiallyNaked();
UFUNCTION(BlueprintCallable)
bool IsBodyTypeExposed(EBodyPart BodyPart);
UFUNCTION(BlueprintCallable)
void TakeClothing(UClothingItemInstance* ClothingItemInstance);
UFUNCTION(BlueprintCallable)
UClothingItemInstance* RemoveClothing(EClothingSlotType ClothingSlotType);
UFUNCTION(BlueprintCallable)
bool GetClothingSlotData(EClothingSlotType ClothingSlotType, FClothingSlotData& OutClothingSlotData);
UFUNCTION(BlueprintCallable)
void SetClothingSlotItem(const EClothingSlotType ClothingSlotType, UClothingItemInstance* ClothingItemInstance);
UFUNCTION(BlueprintCallable)
TArray<UClothingItemInstance*> GetEquippedClothing();
TArray<UClothingItemInstance*> GetEquippedClothing() const;
UClothingItemInstance* GetSlotClothing(EClothingSlotType SlotType);
bool IsBodyPartExposed(EBodyPart BodyPart);
void HydrateClothing();
@@ -76,4 +53,7 @@ public:
private:
USkeletalMeshComponent* GetMeshComponent(EClothingSlotType SlotType) const;
UPROPERTY()
TMap<EClothingSlotType, TObjectPtr<UClothingItemInstance>> EquippedClothing;
};