36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
// © 2025 Naked People Team. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "NakedDesire/Clothing/ClothingSlotType.h"
|
|
#include "NakedDesire/Commissions/CommissionConstraint.h"
|
|
#include "WearingSlotConstraint.generated.h"
|
|
|
|
class UClothingItemInstance;
|
|
|
|
// Holds while the chosen slot is occupied (bMustBeWorn) or empty (!bMustBeWorn). Covers both
|
|
// "while wearing a coat" (Outerwear occupied) and "while not wearing a top" (Top empty).
|
|
UCLASS(EditInlineNew, DisplayName = "While Wearing / Not Wearing Slot")
|
|
class NAKEDDESIRE_API UWearingSlotConstraint : public UCommissionConstraint
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual bool IsMet() const override;
|
|
virtual FText GetDescription() const override;
|
|
|
|
protected:
|
|
virtual void OnActivate() override;
|
|
virtual void OnDeactivate() override;
|
|
|
|
private:
|
|
UPROPERTY(EditDefaultsOnly)
|
|
EClothingSlotType Slot = EClothingSlotType::Outerwear;
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
|
bool bMustBeWorn = true;
|
|
|
|
UFUNCTION()
|
|
void HandleClothingChanged(UClothingItemInstance* ClothingItemInstance);
|
|
}; |