// © 2025 Naked People Team. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "NakedDesire/Commissions/CommissionConstraint.h"
#include "ObservedConstraint.generated.h"

// Holds only while at least MinObservers NPCs are perceiving the player (the embarrassment observer set).
UCLASS(EditInlineNew, DisplayName = "While Observed By N NPCs")
class NAKEDDESIRE_API UObservedConstraint : 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, meta = (ClampMin = 1))
	int32 MinObservers = 1;

	UFUNCTION()
	void HandleObserversChanged();
};