Updates
This commit is contained in:
@@ -27,7 +27,23 @@ void UFlashGoal::Complete()
|
||||
|
||||
FText UFlashGoal::GetDescription() const
|
||||
{
|
||||
const FText BodyTypeString = UPrivateBodyPartType::GetString(BodyType);
|
||||
FText BodyTypeString;
|
||||
|
||||
switch (BodyType)
|
||||
{
|
||||
case EBodyPart::Ass:
|
||||
BodyTypeString = FText::FromString("Ass");
|
||||
break;
|
||||
case EBodyPart::Boobs:
|
||||
BodyTypeString = FText::FromString("Boobs");
|
||||
break;
|
||||
case EBodyPart::Genitals:
|
||||
BodyTypeString = FText::FromString("Genitals");
|
||||
break;
|
||||
default:
|
||||
BodyTypeString = FText::FromString("None");
|
||||
break;
|
||||
}
|
||||
|
||||
if (RequiredFlashCount == 1)
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "NakedDesire/Clothing/BodyPart.h"
|
||||
#include "NakedDesire/MissionBuilder/MissionGoal.h"
|
||||
#include "NakedDesire/Player/PrivateBodyPartType.h"
|
||||
#include "FlashGoal.generated.h"
|
||||
|
||||
class ANPCAIController;
|
||||
@@ -20,7 +20,7 @@ class NAKEDDESIRE_API UFlashGoal : public UMissionGoal
|
||||
int RequiredFlashCount = 1;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
EPrivateBodyPartType BodyType;
|
||||
EBodyPart BodyType;
|
||||
|
||||
FDelegateHandle PlayerNoticedHandle;
|
||||
|
||||
|
||||
@@ -32,24 +32,6 @@ void UMissionsManager::CompleteMission(UMission* Mission)
|
||||
OnMissionCompleted.Broadcast(Mission);
|
||||
}
|
||||
|
||||
void UMissionsManager::CollectRewards()
|
||||
{
|
||||
if (CompletedMissions.IsEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int TotalReward = 0;
|
||||
for (const UMission* Mission : CompletedMissions)
|
||||
{
|
||||
TotalReward += Mission->GetMoneyReward();
|
||||
}
|
||||
|
||||
Player->Money += TotalReward;
|
||||
CompletedMissions.Empty();
|
||||
OnRewardsCollected.Broadcast(TotalReward);
|
||||
}
|
||||
|
||||
void UMissionsManager::RefreshDailyMissions(const TArray<UMission*>& NewMissions)
|
||||
{
|
||||
for (UMission* Mission : AvailableMissions)
|
||||
|
||||
@@ -37,13 +37,9 @@ public:
|
||||
FOnRewardsCollected OnRewardsCollected;
|
||||
|
||||
void CompleteMission(UMission* Mission);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void CollectRewards();
|
||||
|
||||
UFUNCTION()
|
||||
void RefreshDailyMissions(const TArray<UMission*>& NewMissions);
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
};
|
||||
|
||||
@@ -32,18 +32,33 @@ void UExposeBodyPartRestriction::Stop()
|
||||
|
||||
FText UExposeBodyPartRestriction::GetDescription() const
|
||||
{
|
||||
FText Part = UPrivateBodyPartType::GetString(BodyPart);
|
||||
FText BodyPartString;
|
||||
switch (BodyPart)
|
||||
{
|
||||
case EBodyPart::Ass:
|
||||
BodyPartString = FText::FromString("Ass");
|
||||
break;
|
||||
case EBodyPart::Boobs:
|
||||
BodyPartString = FText::FromString("Boobs");
|
||||
break;
|
||||
case EBodyPart::Genitals:
|
||||
BodyPartString = FText::FromString("Genitals");
|
||||
break;
|
||||
default:
|
||||
BodyPartString = FText::FromString("None");
|
||||
break;
|
||||
}
|
||||
|
||||
return FText::Format(RestrictionsExposeBodyPartDescription,
|
||||
FFormatNamedArguments
|
||||
{
|
||||
{TEXT("BodyPart"), Part}
|
||||
{TEXT("BodyPart"), BodyPartString}
|
||||
});
|
||||
}
|
||||
|
||||
void UExposeBodyPartRestriction::EquipClothing(const UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
if (IsSuccess && ClothingItemInstance->GetClothingItem()->CoveredBodyParts.Contains(BodyPart))
|
||||
if (IsSuccess) // TODO: Add covered body part resolution
|
||||
{
|
||||
Init(Player);
|
||||
}
|
||||
@@ -68,7 +83,7 @@ void UExposeBodyPartRestriction::CheckClothing()
|
||||
{
|
||||
if (ClothingSlot.ClothingItemInstance)
|
||||
{
|
||||
return ClothingSlot.ClothingItemInstance->GetClothingItem()->CoveredBodyParts.Contains(BodyPart);
|
||||
return true; // TODO: Add exposed body part resolution
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "NakedDesire/Player/PrivateBodyPartType.h"
|
||||
#include "NakedDesire/Clothing/BodyPart.h"
|
||||
#include "NakedDesire/MissionBuilder/GoalRestriction.h"
|
||||
#include "ExposeBodyPartRestriction.generated.h"
|
||||
|
||||
@@ -18,7 +18,7 @@ class NAKEDDESIRE_API UExposeBodyPartRestriction : public UGoalRestriction
|
||||
FDelegateHandle UnequipClothingHandle;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
EPrivateBodyPartType BodyPart;
|
||||
EBodyPart BodyPart;
|
||||
|
||||
protected:
|
||||
virtual void Init(ANakedDesireCharacter* PlayerCharacter) override;
|
||||
|
||||
Reference in New Issue
Block a user