Added wardrobe

This commit is contained in:
2026-05-31 21:00:55 +03:00
parent a0c91c81fa
commit 9a57f87d02
39 changed files with 787 additions and 111 deletions
+29 -6
View File
@@ -4,22 +4,45 @@
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "NakedDesire/Interaction/Interactable.h"
#include "Wardrobe.generated.h"
class UBoxComponent;
class UWidgetComponent;
class UClothingItemInstance;
// Apartment wardrobe fixture. The stored items live in UInventorySubsystem (the durable store is
// UGlobalSaveGameData::WardrobeItems); this actor is just the interaction point and forwards to it.
UCLASS(Blueprintable)
class NAKEDDESIRE_API AWardrobe : public AActor
class NAKEDDESIRE_API AWardrobe : public AActor, public IInteractable
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
TArray<TObjectPtr<UClothingItemInstance>> ClothingItems;
AWardrobe();
virtual void Interact_Implementation(ANakedDesireCharacter* Player) override;
virtual bool CanInteract_Implementation(ANakedDesireCharacter* Player) const override;
virtual FText GetInteractionPrompt_Implementation() const override;
virtual void HideInteractionHint_Implementation() override;
virtual void ShowInteractionFocusHint_Implementation() override;
virtual void ShowInteractionProximityHint_Implementation() override;
void AddItem(UClothingItemInstance* ClothingItemInstance);
void RemoveItem(UClothingItemInstance* ClothingItemInstance) const;
void RemoveItem(UClothingItemInstance* ClothingItemInstance);
protected:
virtual void BeginPlay() override;
};
private:
void ApplyOutline(bool bEnabled, int32 StencilValue);
UPROPERTY(EditDefaultsOnly)
TObjectPtr<UStaticMeshComponent> MeshComponent;
UPROPERTY(EditDefaultsOnly)
TObjectPtr<UBoxComponent> ColliderComponent;
UPROPERTY(EditDefaultsOnly)
TObjectPtr<UWidgetComponent> InteractionHint;
};