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


#include "NakedDesireUserSettings.h"

void UNakedDesireUserSettings::SetGlobalVolume(float Value)
{
	GlobalVolume = FMath::Clamp(Value, 0.0f, 1.0f);
}

float UNakedDesireUserSettings::GetGlobalVolume() const
{
	return GlobalVolume;
}

void UNakedDesireUserSettings::SetMusicVolume(float Value)
{
	MusicVolume = FMath::Clamp(Value, 0.0f, 1.0f);
}

float UNakedDesireUserSettings::GetMusicVolume() const
{
	return MusicVolume;
}

void UNakedDesireUserSettings::SetSfxVolume(float Value)
{
	SfxVolume = FMath::Clamp(Value, 0.0f, 1.0f);
}

float UNakedDesireUserSettings::GetSfxVolume() const
{
	return SfxVolume;
}

void UNakedDesireUserSettings::SetIsCensorshipEnabled(bool Value)
{
	IsCensorshipEnabled = Value;
}

bool UNakedDesireUserSettings::GetIsCensorshipEnabled() const
{
	return IsCensorshipEnabled;
}

bool UNakedDesireUserSettings::GetHasAcceptedDisclaimer() const
{
	return HasAcceptedDisclaimer;
}

void UNakedDesireUserSettings::SetHasAcceptedDisclaimer(bool Value)
{
	HasAcceptedDisclaimer = Value;
}

void UNakedDesireUserSettings::SaveSettings()
{
	Super::SaveSettings();

	OnSettingsChanged.Broadcast(this);
}

void UNakedDesireUserSettings::ApplyNonResolutionSettings()
{
	Super::ApplyNonResolutionSettings();

	OnSettingsChanged.Broadcast(this);
}

void UNakedDesireUserSettings::ApplySettings(bool bCheckForCommandLineOverrides)
{
	Super::ApplySettings(bCheckForCommandLineOverrides);

	OnSettingsChanged.Broadcast(this);
}

UNakedDesireUserSettings* UNakedDesireUserSettings::GetNakedDesireUserSettings()
{
	return Cast<UNakedDesireUserSettings>(Super::GetGameUserSettings());
}
