Finished phase 1
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "NakedDesire/Clothing/ClothingManager.h"
|
||||
#include "NakedDesire/Player/NakedDesireCharacter.h"
|
||||
#include "NakedDesire/SaveGame/GlobalSaveGameData.h"
|
||||
#include "NakedDesire/SaveGame/ItemSaveRecord.h"
|
||||
#include "NakedDesire/SaveGame/SaveSubsystem.h"
|
||||
|
||||
AItemPickup::AItemPickup()
|
||||
@@ -33,10 +32,7 @@ void AItemPickup::Interact_Implementation(ANakedDesireCharacter* Player)
|
||||
{
|
||||
USaveSubsystem* SaveSubsystem = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<USaveSubsystem>();
|
||||
Player->ClothingManager->TakeClothing(ClothingItemInstance);
|
||||
SaveSubsystem->GetCurrentSave()->WorldItems.RemoveAll([this](const FItemSaveRecord& Item)
|
||||
{
|
||||
return ClothingItemInstance->GetInstanceId() == Item.InstanceId;
|
||||
});
|
||||
SaveSubsystem->GetCurrentSave()->RemoveWorldItem(ClothingItemInstance);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user