59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
// © 2025 Naked People Team. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/SaveGame.h"
|
|
#include "NakedDesire/Global/Constants.h"
|
|
#include "ItemSaveRecord.h"
|
|
#include "GlobalSaveGameData.generated.h"
|
|
|
|
class UClothingItemInstance;
|
|
|
|
UCLASS()
|
|
class NAKEDDESIRE_API UGlobalSaveGameData : public USaveGame
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
static UGlobalSaveGameData* CreateNewSaveGame();
|
|
static UGlobalSaveGameData* LoadGame(const FString& SlotName = DefaultSaveSlotName);
|
|
static bool SaveGame(UGlobalSaveGameData* SaveGameData, const FString& SlotName = DefaultSaveSlotName);
|
|
|
|
UPROPERTY(SaveGame)
|
|
bool HaveSeenTutorial = false;
|
|
|
|
UPROPERTY(SaveGame)
|
|
float Money = 0;
|
|
|
|
FItemSaveRecord AddWardrobeItem(const UClothingItemInstance* ItemInstance);
|
|
bool UpdateWardrobeItem(UClothingItemInstance* ItemInstance);
|
|
bool RemoveWardrobeItem(UClothingItemInstance* ItemInstance);
|
|
TArray<FItemSaveRecord> GetWardrobeItems() const { return WardrobeItems; }
|
|
|
|
FItemSaveRecord AddEquippedItem(const UClothingItemInstance* ItemInstance);
|
|
bool UpdateEquippedItem(UClothingItemInstance* ItemInstance);
|
|
bool RemoveEquippedItem(UClothingItemInstance* ItemInstance);
|
|
TArray<FItemSaveRecord> GetEquippedItems() const { return EquippedItems; }
|
|
|
|
FItemSaveRecord AddWorldItem(const UClothingItemInstance* ItemInstance, FTransform Transform);
|
|
bool UpdateWorldItem(UClothingItemInstance* ItemInstance, FTransform Transform);
|
|
bool RemoveWorldItem(UClothingItemInstance* ItemInstance);
|
|
TArray<FItemSaveRecord> GetWorldItems() const { return WorldItems; }
|
|
|
|
UPROPERTY(SaveGame)
|
|
int32 DaysPassed = 0;
|
|
|
|
UPROPERTY(SaveGame)
|
|
float HourOfDay = 0.0f;
|
|
|
|
private:
|
|
UPROPERTY(SaveGame)
|
|
TArray<FItemSaveRecord> WardrobeItems;
|
|
|
|
UPROPERTY(SaveGame)
|
|
TArray<FItemSaveRecord> EquippedItems;
|
|
|
|
UPROPERTY(SaveGame)
|
|
TArray<FItemSaveRecord> WorldItems;
|
|
}; |