Files
Naked-Desire/Source/NakedDesire/Commissions/Objectives/CoverageObjectiveBase.h
T
2026-06-03 15:17:02 +03:00

39 lines
1.3 KiB
C++

// © 2025 Naked People Team. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "NakedDesire/Clothing/BodyPart.h"
#include "ObserverObjectiveBase.h"
#include "CoverageObjectiveBase.generated.h"
class UClothingItemInstance;
// Shared base for objectives that read body coverage; re-evaluates on any equip / unequip. Inherits
// the observer subscription from UObserverObjectiveBase, so coverage objectives can also gate on the
// current observer count (e.g. "naked in front of N people") without extra wiring.
UCLASS(Abstract)
class NAKEDDESIRE_API UCoverageObjectiveBase : public UObserverObjectiveBase
{
GENERATED_BODY()
protected:
virtual void OnActivate() override;
virtual void OnDeactivate() override;
// Fully unclothed: no effective coverage on any of the three exposable regions.
bool IsFullyNaked() const;
// Part reads as "revealing" — below the player's observation reveal threshold.
bool IsPartRevealing(EBodyPart Part) const;
// Raw effective coverage [0,1] for a part — for objectives that name their own threshold.
float GetEffectiveCoverage(EBodyPart Part) const;
// Any of the three regions is revealing.
bool IsAnyPartRevealing() const;
private:
UFUNCTION()
void HandleClothingChanged(UClothingItemInstance* ClothingItemInstance);
};