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


#include "StayBelowCoverageObjective.h"

#include "NakedDesire/Clothing/BodyPart.h"

#define LOCTEXT_NAMESPACE "Commissions.Objectives.StayBelowCoverage"

bool UStayBelowCoverageObjective::IsConditionMet() const
{
	return GetEffectiveCoverage(EBodyPart::Boobs) <= CoverageThreshold
		&& GetEffectiveCoverage(EBodyPart::Ass) <= CoverageThreshold
		&& GetEffectiveCoverage(EBodyPart::Genitals) <= CoverageThreshold;
}

FText UStayBelowCoverageObjective::GetDescription() const
{
	if (RequiredHoldSeconds > 0.0f)
	{
		return FText::Format(LOCTEXT("Timed", "Keep every part under {0} covered for {1} seconds"),
			FText::AsPercent(CoverageThreshold), FText::AsNumber(FMath::RoundToInt(RequiredHoldSeconds)));
	}

	return FText::Format(LOCTEXT("Instant", "Bare yourself until every part is under {0} covered"),
		FText::AsPercent(CoverageThreshold));
}

#undef LOCTEXT_NAMESPACE