Added ClothingItemInstance and cleanup the project
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Internationalization/Text.h"
|
||||
#include "NakedDesire/Clothing/ClothingItemData.h"
|
||||
#include "NakedDesire/Clothing/ClothingItem.h"
|
||||
#include "NakedDesire/Clothing/ClothingItemInstance.h"
|
||||
#include "NakedDesire/Global/Constants.h"
|
||||
#include "NakedDesire/Global/NakedDesireUserSettings.h"
|
||||
#include "NakedDesire/SaveGame/GlobalSaveGameData.h"
|
||||
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
||||
#include "Perception/AISense_Sight.h"
|
||||
|
||||
@@ -152,12 +152,12 @@ void ANakedDesireCharacter::BeginPlay()
|
||||
StimuliSourceComponent->RegisterForSense(TSubclassOf<UAISense_Sight>());
|
||||
StimuliSourceComponent->RegisterWithPerceptionSystem();
|
||||
|
||||
UGlobalSaveGameData* SaveGameData = UGlobalSaveGameData::LoadOrCreateSaveGame(DefaultPlayerClothing, DefaultWardrobeClothing);
|
||||
// UGlobalSaveGameData* SaveGameData = UGlobalSaveGameData::LoadOrCreateSaveGame(DefaultPlayerClothing, DefaultWardrobeClothing);
|
||||
|
||||
if (SaveGameData)
|
||||
{
|
||||
Money = FMath::RoundToInt(SaveGameData->Money);
|
||||
}
|
||||
// if (SaveGameData)
|
||||
// {
|
||||
// Money = FMath::RoundToInt(SaveGameData->Money);
|
||||
// }
|
||||
|
||||
SetupClothingSlots();
|
||||
|
||||
@@ -166,7 +166,7 @@ void ANakedDesireCharacter::BeginPlay()
|
||||
|
||||
UNakedDesireUserSettings::GetNakedDesireUserSettings()->OnSettingsChanged.AddUniqueDynamic(this, &ANakedDesireCharacter::OnSettingsChanged);
|
||||
|
||||
ClothingManager->HydrateClothing(SaveGameData);
|
||||
// ClothingManager->HydrateClothing(SaveGameData);
|
||||
}
|
||||
|
||||
UAISense_Sight::EVisibilityResult ANakedDesireCharacter::CanBeSeenFrom(const FCanBeSeenFromContext& Context,
|
||||
@@ -257,29 +257,27 @@ void ANakedDesireCharacter::OnEndOverlap(UPrimitiveComponent* OverlappedComponen
|
||||
}
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::OnClothingEquip(const UClothingItemData* ClothingItemData)
|
||||
void ANakedDesireCharacter::OnClothingEquip(const UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
if (ClothingItemData->Info->CoveredBodyParts.Contains(EPrivateBodyPartType::BackBottom))
|
||||
if (ClothingItemInstance->GetClothingItem()->CoveredBodyParts.Contains(EPrivateBodyPartType::BackBottom))
|
||||
{
|
||||
BackBottomCensorship->SetVisibility(false);
|
||||
}
|
||||
if (ClothingItemData->Info->CoveredBodyParts.Contains(EPrivateBodyPartType::FrontBottom))
|
||||
if (ClothingItemInstance->GetClothingItem()->CoveredBodyParts.Contains(EPrivateBodyPartType::FrontBottom))
|
||||
{
|
||||
FrontBottomCensorship->SetVisibility(false);
|
||||
}
|
||||
if (ClothingItemData->Info->CoveredBodyParts.Contains(EPrivateBodyPartType::FrontTop))
|
||||
if (ClothingItemInstance->GetClothingItem()->CoveredBodyParts.Contains(EPrivateBodyPartType::FrontTop))
|
||||
{
|
||||
BoobLCensorship->SetVisibility(false);
|
||||
BoobRCensorship->SetVisibility(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::OnClothingUnequip(const UClothingItemData* ClothingItemData)
|
||||
void ANakedDesireCharacter::OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
if (!UNakedDesireUserSettings::GetNakedDesireUserSettings()->GetIsCensorshipEnabled() && !IS_DEMO)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ClothingManager->IsBodyTypeExposed(EPrivateBodyPartType::BackBottom))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user