Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.2 Update & SaveSlot refactor #88

Merged
merged 8 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions SaveExtension.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"CreatedByURL": "https://piperift.com",
"DocsURL": "https://piperift.com/SaveExtension/",
"SupportURL": "[email protected]",
"EngineVersion": "4.26",
"EngineVersion": "5.2",
"EnabledByDefault": true,
"CanContainContent": false,
"IsBetaVersion": false,
Expand All @@ -21,13 +21,10 @@
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Win64",
"Win32",
"Linux",
"Mac",
"IOS",
"Android",
"PS5",
"XboxOne",
"Switch",
"Mac"
"Linux"
]
},
{
Expand All @@ -36,13 +33,10 @@
"LoadingPhase": "PostEngineInit",
"WhitelistPlatforms": [
"Win64",
"Win32",
"Linux",
"Mac",
"IOS",
"Android",
"PS5",
"XboxOne",
"Switch",
"Mac"
"Linux"
]
},
{
Expand All @@ -51,7 +45,6 @@
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Win64",
"Win32",
"Linux",
"Mac"
]
Expand Down
23 changes: 0 additions & 23 deletions Source/Editor/Private/Asset/AssetTypeAction_SavePreset.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions Source/Editor/Private/Asset/AssetTypeAction_SavePreset.h

This file was deleted.

23 changes: 23 additions & 0 deletions Source/Editor/Private/Asset/AssetTypeAction_SaveSlot.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2015-2024 Piperift. All Rights Reserved.

#include "AssetTypeAction_SaveSlot.h"

#define LOCTEXT_NAMESPACE "AssetTypeActions"


//////////////////////////////////////////////////////////////////////////
// FAssetTypeAction_SaveSlot

FText FAssetTypeAction_SaveSlot::GetName() const
{
return LOCTEXT("FAssetTypeAction_SaveSlotName", "Save Slot");
}

FColor FAssetTypeAction_SaveSlot::GetTypeColor() const
{
return FColor(63, 126, 255);
}

//////////////////////////////////////////////////////////////////////////

#undef LOCTEXT_NAMESPACE
28 changes: 28 additions & 0 deletions Source/Editor/Private/Asset/AssetTypeAction_SaveSlot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2015-2024 Piperift. All Rights Reserved.

#pragma once

#include "SaveExtensionEditor.h"

#include <AssetTypeActions_Base.h>
#include <SaveSlot.h>


class FAssetTypeAction_SaveSlot : public FAssetTypeActions_Base
{
public:
virtual uint32 GetCategories() override
{
return FSaveExtensionEditor::Get().AssetCategory;
}

virtual FText GetName() const override;
virtual FColor GetTypeColor() const override;

virtual UClass* GetSupportedClass() const override
{
return USaveSlot::StaticClass();
}
};

#undef LOCTEXT_NAMESPACE
23 changes: 23 additions & 0 deletions Source/Editor/Private/Asset/AssetTypeAction_SaveSlotData.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2015-2024 Piperift. All Rights Reserved.

#include "AssetTypeAction_SaveSlotData.h"

#define LOCTEXT_NAMESPACE "AssetTypeActions"


//////////////////////////////////////////////////////////////////////////
// FAssetTypeAction_SaveSlotData

FText FAssetTypeAction_SaveSlotData::GetName() const
{
return LOCTEXT("FAssetTypeAction_SaveSlotDataName", "Save Slot Data");
}

FColor FAssetTypeAction_SaveSlotData::GetTypeColor() const
{
return FColor(63, 126, 255);
}

//////////////////////////////////////////////////////////////////////////

#undef LOCTEXT_NAMESPACE
28 changes: 28 additions & 0 deletions Source/Editor/Private/Asset/AssetTypeAction_SaveSlotData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2015-2024 Piperift. All Rights Reserved.

#pragma once

#include "SaveExtensionEditor.h"

#include <AssetTypeActions_Base.h>
#include <SaveSlotData.h>


class FAssetTypeAction_SaveSlotData : public FAssetTypeActions_Base
{
public:
virtual uint32 GetCategories() override
{
return FSaveExtensionEditor::Get().AssetCategory;
}

virtual FText GetName() const override;
virtual FColor GetTypeColor() const override;

virtual UClass* GetSupportedClass() const override
{
return USaveSlotData::StaticClass();
}
};

#undef LOCTEXT_NAMESPACE
23 changes: 0 additions & 23 deletions Source/Editor/Private/Asset/AssetTypeAction_SlotData.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions Source/Editor/Private/Asset/AssetTypeAction_SlotData.h

This file was deleted.

23 changes: 0 additions & 23 deletions Source/Editor/Private/Asset/AssetTypeAction_SlotInfo.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions Source/Editor/Private/Asset/AssetTypeAction_SlotInfo.h

This file was deleted.

21 changes: 0 additions & 21 deletions Source/Editor/Private/Asset/SavePresetFactory.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions Source/Editor/Private/Asset/SavePresetFactory.h

This file was deleted.

26 changes: 26 additions & 0 deletions Source/Editor/Private/Asset/SaveSlotDataFactory.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2015-2024 Piperift. All Rights Reserved.

#include "Asset/SaveSlotDataFactory.h"

#include <Kismet2/KismetEditorUtilities.h>


USaveSaveSlotDataFactory::USaveSaveSlotDataFactory() : Super()
{
bCreateNew = true;
bEditAfterNew = true;
SupportedClass = USaveSlotData::StaticClass();
}

UObject* USaveSaveSlotDataFactory::FactoryCreateNew(UClass* Class, UObject* InParent, FName Name,
EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn)
{
check(Class->IsChildOf(USaveSlotData::StaticClass()));

if (!FKismetEditorUtilities::CanCreateBlueprintOfClass(Class))
{
return nullptr;
}
return FKismetEditorUtilities::CreateBlueprint(Class, InParent, Name, BPTYPE_Normal,
UBlueprint::StaticClass(), UBlueprintGeneratedClass::StaticClass(), TEXT("AssetTypeActions"));
}
Loading