Fixed savegame
This commit is contained in:
@@ -20,19 +20,6 @@ bool USaveSubsystem::SaveGame(const FString& SlotName) const
|
||||
return UGlobalSaveGameData::SaveGame(CurrentSave, SlotName);
|
||||
}
|
||||
|
||||
void USaveSubsystem::AddItem(const FItemSaveRecord& Record)
|
||||
{
|
||||
Items.Add(Record);
|
||||
}
|
||||
|
||||
void USaveSubsystem::RemoveItem(const FGuid& InstanceId)
|
||||
{
|
||||
Items.RemoveAll([InstanceId](const FItemSaveRecord& Item)
|
||||
{
|
||||
return Item.InstanceId == InstanceId;
|
||||
});
|
||||
}
|
||||
|
||||
void USaveSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
||||
{
|
||||
Super::Initialize(Collection);
|
||||
@@ -56,6 +43,16 @@ UGlobalSaveGameData* USaveSubsystem::GetCurrentSave()
|
||||
return CurrentSave;
|
||||
}
|
||||
|
||||
void USaveSubsystem::BP_LoadGame()
|
||||
{
|
||||
LoadGame();
|
||||
}
|
||||
|
||||
void USaveSubsystem::BP_SaveGame()
|
||||
{
|
||||
SaveGame();
|
||||
}
|
||||
|
||||
void USaveSubsystem::PopulateStartingData(UGlobalSaveGameData* Save) const
|
||||
{
|
||||
if (!Save)
|
||||
@@ -77,4 +74,4 @@ void USaveSubsystem::PopulateStartingData(UGlobalSaveGameData* Save) const
|
||||
Record.Init(Instance);
|
||||
Save->EquippedItems.Add(Record);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user