Finished phase 1

This commit is contained in:
olehhapuk
2026-05-29 18:57:20 +03:00
parent b0a0a89c44
commit b6b81caf4e
11 changed files with 152 additions and 59 deletions
@@ -5,9 +5,10 @@
#include "CoreMinimal.h"
#include "GameFramework/SaveGame.h"
#include "NakedDesire/Global/Constants.h"
#include "ItemSaveRecord.h"
#include "GlobalSaveGameData.generated.h"
struct FItemSaveRecord;
class UClothingItemInstance;
UCLASS()
class NAKEDDESIRE_API UGlobalSaveGameData : public USaveGame
@@ -24,19 +25,35 @@ public:
UPROPERTY(SaveGame)
float Money = 0;
UPROPERTY(SaveGame)
TArray<FItemSaveRecord> WardrobeItems;
UPROPERTY(SaveGame)
TArray<FItemSaveRecord> EquippedItems;
UPROPERTY(SaveGame)
TArray<FItemSaveRecord> WorldItems;
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;
};