Fixed savegame

This commit is contained in:
2026-05-27 23:21:23 +03:00
parent bc498d98a8
commit 891a0744a0
4 changed files with 21 additions and 24 deletions
+7 -7
View File
@@ -19,13 +19,16 @@ public:
void LoadGame(const FString& SlotName = DefaultSaveSlotName);
bool SaveGame(const FString& SlotName = DefaultSaveSlotName) const;
const TArray<FItemSaveRecord>& GetItems() const { return Items; }
void AddItem(const FItemSaveRecord& Record);
void RemoveItem(const FGuid& InstanceId);
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
UGlobalSaveGameData* GetCurrentSave();
protected:
UFUNCTION(BlueprintCallable)
void BP_LoadGame();
UFUNCTION(BlueprintCallable)
void BP_SaveGame();
private:
void PopulateStartingData(UGlobalSaveGameData* Save) const;
@@ -33,9 +36,6 @@ private:
UPROPERTY()
FString ActiveSlotName = DefaultSaveSlotName;
UPROPERTY()
TArray<FItemSaveRecord> Items;
UPROPERTY()
TObjectPtr<UGlobalSaveGameData> CurrentSave;
};