├── StarfireAssets ├── Config │ └── Placeholder.txt ├── Content │ └── Placeholder.txt ├── Resources │ └── Icon128.png ├── Source │ ├── StarfireAssets │ │ ├── Private │ │ │ ├── AssetValidation │ │ │ │ └── VerifiableContent.cpp │ │ │ ├── DataDefinitions │ │ │ │ ├── DataDefinitionSource.cpp │ │ │ │ ├── DefinitionExtension.cpp │ │ │ │ ├── Exec_DataDefinition.cpp │ │ │ │ └── DataDefinition.hpp │ │ │ ├── Module │ │ │ │ └── StarfireAssets.cpp │ │ │ └── GameFeatures │ │ │ │ ├── StarfireGameFeaturePolicy.cpp │ │ │ │ └── StarfireFeatureData.cpp │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── StarfireAssets.h │ │ │ ├── DataDefinitions │ │ │ │ ├── Exec_DataDefinition.h │ │ │ │ ├── DataDefinitionSource.h │ │ │ │ └── DefinitionExtension.h │ │ │ ├── GameFeatures │ │ │ │ ├── StarfireGameFeaturePolicy.h │ │ │ │ └── StarfireFeatureData.h │ │ │ └── AssetValidation │ │ │ │ └── AssetChecks.h │ │ └── StarfireAssets.Build.cs │ ├── StarfireAssetsDeveloper │ │ ├── Public │ │ │ └── Module │ │ │ │ └── StarfireAssetsDeveloper.h │ │ ├── Private │ │ │ └── Module │ │ │ │ └── StarfireAssetsDeveloper.cpp │ │ └── StarfireAssetsDeveloper.Build.cs │ └── StarfireAssetsEditor │ │ ├── Public │ │ ├── Module │ │ │ └── StarfireAssetsEditor.h │ │ └── DataDefinition_AssetDefinition.h │ │ ├── StarfireAssetsEditor.Build.cs │ │ └── Private │ │ └── Module │ │ └── StarfireAssetsEditor.cpp ├── LICENSE └── StarfireAssets.uplugin ├── StarfireMessenger ├── Config │ ├── Placeholder.txt │ └── FilterPlugin.ini ├── Content │ └── Placeholder.txt ├── Resources │ ├── Icon128.png │ ├── readme_Broadcast.png │ ├── readme_MessageCast.png │ ├── readme_Messenger.png │ ├── readme_MessageListen.png │ ├── readme_RegisterList.png │ ├── readme_BroadcastListing.png │ ├── readme_MessageRegister.png │ ├── readme_ProjectSettings.png │ ├── readme_BroadcastBlueprint.png │ ├── readme_MessageProperties.png │ ├── readme_BlueprintMessageTypes.png │ ├── MDMetaData │ │ ├── readme_MetaDataKeys.png │ │ ├── readme_CustomMetaData.gif │ │ ├── readme_CustomMetaData.png │ │ ├── readme_EditCondition.gif │ │ ├── readme_ForceInlineRow.gif │ │ └── readme_GameplayTagFilter.gif │ └── PlaceholderButtonIcon.svg ├── Source │ ├── StarfireMessenger │ │ ├── Private │ │ │ ├── Messenger │ │ │ │ ├── MessengerTypes.cpp │ │ │ │ └── MessengerProjectSettings.cpp │ │ │ └── Module │ │ │ │ └── StarfireMessenger.cpp │ │ ├── Public │ │ │ └── Module │ │ │ │ └── StarfireMessenger.h │ │ └── StarfireMessenger.Build.cs │ ├── MDMetaDataEditor │ │ ├── Private │ │ │ ├── Config │ │ │ │ ├── MDMetaDataEditorUserConfig.cpp │ │ │ │ └── MDMetaDataEditorUserConfig.h │ │ │ ├── Customizations │ │ │ │ ├── MDMetaDataEditorPropertyTypeCustomization.h │ │ │ │ ├── MDMetaDataEditorVariableCustomization.h │ │ │ │ ├── MDMetaDataEditorFunctionCustomization.h │ │ │ │ ├── MDMetaDataEditorStructChangeHandler.h │ │ │ │ ├── MDMetaDataEditorStructCustomization.h │ │ │ │ ├── MDMetaDataEditorCustomizationBase.h │ │ │ │ ├── MDMetaDataEditorCustomizationBase.cpp │ │ │ │ ├── MDMetaDataEditorStructChangeHandler.cpp │ │ │ │ └── MDMetaDataEditorStructCustomization.cpp │ │ │ ├── MDMetaDataEditorModule.h │ │ │ ├── Widgets │ │ │ │ ├── SMDMetaDataStringComboBox.h │ │ │ │ ├── SMDMetaDataGameplayTagPicker.h │ │ │ │ └── SMDMetaDataStringComboBox.cpp │ │ │ └── Types │ │ │ │ └── MDMetaDataKey.cpp │ │ └── MDMetaDataEditor.Build.cs │ ├── StarfireMessengerDeveloper │ │ ├── Private │ │ │ ├── MessengerPinFactory.h │ │ │ ├── Module │ │ │ │ └── StarfireMessengerDeveloper.cpp │ │ │ ├── MessengerPinFactory.cpp │ │ │ ├── Epic │ │ │ │ ├── PushModelHelpers.h │ │ │ │ ├── StructMemberNodeHandlers_Copy.h │ │ │ │ ├── MakeStructHandler_Copy.h │ │ │ │ └── VariableSetHandler_Copy.h │ │ │ └── SGraphPinMessengerType.h │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── StarfireMessengerDeveloper.h │ │ │ ├── K2Node_StartListeningForMessage_Immediate.h │ │ │ ├── K2Node_BroadcastMessage.h │ │ │ └── K2Node_StartListeningForMessage_Stateful.h │ │ └── StarfireMessengerDeveloper.Build.cs │ ├── StarfireMessengerEditor │ │ ├── Public │ │ │ └── Module │ │ │ │ └── StarfireMessengerEditor.h │ │ ├── Private │ │ │ └── Module │ │ │ │ └── StarfireMessengerEditor.cpp │ │ └── StarfireMessengerEditor.Build.cs │ └── MDMetaDataEditorGraph │ │ ├── Private │ │ ├── Extensions │ │ │ └── MDMetaDataEditorBlueprintCompilerExtension.h │ │ └── MDMetaDataEditorGraph.cpp │ │ └── MDMetaDataEditorGraph.Build.cs ├── MDMetaDataEditor-LICENSE ├── LICENSE └── StarfireMessenger.uplugin ├── StarfirePersistence ├── Config │ └── Placeholder.txt ├── Content │ └── Placeholder.txt ├── Resources │ └── Icon128.png ├── Source │ ├── StarfirePersistence │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── StarfirePersistence.h │ │ │ ├── PersistenceShared.h │ │ │ ├── StarfirePersistenceSettings.h │ │ │ ├── PersistentSubsystemInterface.h │ │ │ └── PersistenceManager.h │ │ ├── Private │ │ │ ├── PersistenceShared.cpp │ │ │ ├── PersistentSubsystemInterface.cpp │ │ │ ├── PeristentArchiveVersion.h │ │ │ ├── Module │ │ │ │ └── StarfirePersistence.cpp │ │ │ ├── ArchiveUtilities.h │ │ │ └── StarfirePersistenceSettings.cpp │ │ └── StarfirePersistence.Build.cs │ ├── StarfireDataActors │ │ ├── Private │ │ │ ├── DataStoreVisualizer.cpp │ │ │ ├── Module │ │ │ │ └── StarfireDataActors.cpp │ │ │ ├── DataStoreSettings.cpp │ │ │ ├── DataStoreUtilities.hpp │ │ │ ├── DataStoreSingleton.cpp │ │ │ ├── VisualizerValidator.h │ │ │ ├── DataStoreActor.cpp │ │ │ └── PersistentDataStore.hpp │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── StarfireDataActors.h │ │ │ ├── DataStoreVisualizer.h │ │ │ ├── DataStoreSingleton.h │ │ │ └── DataStoreSettings.h │ │ └── StarfireDataActors.Build.cs │ ├── StarfirePersistenceEditor │ │ ├── Public │ │ │ └── Module │ │ │ │ └── StarfirePersistenceEditor.h │ │ ├── Private │ │ │ └── Module │ │ │ │ └── StarfirePersistenceEditor.cpp │ │ └── StarfirePersistenceEditor.Build.cs │ └── StarfirePersistenceDeveloper │ │ ├── Public │ │ └── Module │ │ │ └── StarfirePersistenceDeveloper.h │ │ ├── Private │ │ └── Module │ │ │ └── StarfirePersistenceDeveloper.cpp │ │ └── StarfirePersistenceDeveloper.Build.cs ├── LICENSE └── StarfirePersistence.uplugin ├── StarfireSaveData ├── Config │ └── Placeholder.txt ├── Content │ └── Placeholder.txt ├── Resources │ └── Icon128.png ├── Source │ ├── StarfireSaveData │ │ ├── Private │ │ │ ├── SaveData │ │ │ │ ├── SaveDataCommon.cpp │ │ │ │ ├── SaveDataVersion.cpp │ │ │ │ ├── Linux │ │ │ │ │ └── SaveDataUtilities_Linux.cpp │ │ │ │ ├── Android │ │ │ │ │ └── SaveDataUtilities_Android.cpp │ │ │ │ ├── GenericPlatform │ │ │ │ │ └── SaveDataUtilities_GenericPlatform.cpp │ │ │ │ ├── Windows │ │ │ │ │ └── SaveDataUtilities_Windows.cpp │ │ │ │ ├── SaveDataHeader.cpp │ │ │ │ ├── SaveData.cpp │ │ │ │ └── BatchHeaderLoader.h │ │ │ └── Module │ │ │ │ └── StarfireSaveData.cpp │ │ ├── Public │ │ │ ├── SaveData │ │ │ │ ├── SaveDataVersion.h │ │ │ │ ├── SaveDataCommon.h │ │ │ │ └── SaveData.h │ │ │ └── Module │ │ │ │ └── StarfireSaveData.h │ │ └── StarfireSaveData.Build.cs │ ├── SaveDataExample │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── SaveDataExample.h │ │ │ └── SaveGames │ │ │ │ ├── GameSaveDataHeader.h │ │ │ │ ├── GameSaveData.h │ │ │ │ ├── GameSaveDataSubsystem.h │ │ │ │ └── GameSaveDataVersion.h │ │ ├── Private │ │ │ ├── Module │ │ │ │ └── SaveDataExample.cpp │ │ │ └── SaveGames │ │ │ │ ├── GameSaveDataVersion.cpp │ │ │ │ └── GameSaveDataSubsystem.cpp │ │ └── SaveDataExample.Build.cs │ ├── StarfireSaveDataEditor │ │ ├── Public │ │ │ └── Module │ │ │ │ └── StarfireSaveDataEditor.h │ │ ├── Private │ │ │ └── Module │ │ │ │ └── StarfireSaveDataEditor.cpp │ │ └── StarfireSaveDataEditor.Build.cs │ └── StarfireSaveDataDeveloper │ │ ├── Public │ │ └── Module │ │ │ └── StarfireSaveDataDeveloper.h │ │ ├── Private │ │ └── Module │ │ │ └── StarfireSaveDataDeveloper.cpp │ │ └── StarfireSaveDataDeveloper.Build.cs ├── LICENSE └── StarfireSaveData.uplugin ├── StarfireUtilities ├── Config │ ├── Placeholder.txt │ └── Redscreens.ini ├── Content │ ├── Placeholder.txt │ └── RedScreen_W.uasset ├── Source │ ├── StarfireUtilities │ │ ├── Private │ │ │ ├── Lambdas │ │ │ │ └── InvokedScope.cpp │ │ │ ├── Templates │ │ │ │ ├── TypeUtilitiesSF.cpp │ │ │ │ ├── ArrayTypeUtilitiesSF.cpp │ │ │ │ ├── TypeUtilitiesSF.hpp │ │ │ │ └── ContainerRandUtilities.cpp │ │ │ ├── Kismet │ │ │ │ ├── BlueprintUtilitiesSF.cpp │ │ │ │ ├── GameplayTagK2Statics.h │ │ │ │ ├── GameplayTagK2Statics.cpp │ │ │ │ ├── BlueprintAsyncActionSF.cpp │ │ │ │ ├── BlueprintContainerExtensions.cpp │ │ │ │ └── BlueprintUtilitiesSF.hpp │ │ │ ├── Misc │ │ │ │ ├── ExecSF.hpp │ │ │ │ ├── LatentAction_Simple.cpp │ │ │ │ ├── LatentAction_Polling.cpp │ │ │ │ ├── BlueprintDevUtilities.cpp │ │ │ │ ├── LatentAction_Simple.hpp │ │ │ │ ├── DevSettingsPreloader.hpp │ │ │ │ ├── BlueprintDevUtilities.h │ │ │ │ └── StarfireMath.cpp │ │ │ ├── Debug │ │ │ │ ├── RedscreenScreen.cpp │ │ │ │ ├── RedscreenScreen.h │ │ │ │ └── RedscreenManager.h │ │ │ └── Module │ │ │ │ └── StarfireUtilities.cpp │ │ ├── Public │ │ │ ├── Lambdas │ │ │ │ ├── OnScopeExit.h │ │ │ │ └── InvokedScope.h │ │ │ ├── NativeGameplayTags_SF.h │ │ │ ├── Module │ │ │ │ └── StarfireUtilities.h │ │ │ ├── Templates │ │ │ │ ├── SFArrayCaster.h │ │ │ │ └── ContainerRandUtilities.h │ │ │ ├── Misc │ │ │ │ ├── LatentAction_Polling.h │ │ │ │ ├── LatentAction_Simple.h │ │ │ │ ├── StarfireMath.h │ │ │ │ └── ExecSF.h │ │ │ └── Debug │ │ │ │ └── Redscreen.h │ │ └── StarfireUtilities.Build.cs │ ├── StarfireUtilitiesEditor │ │ ├── Public │ │ │ ├── Module │ │ │ │ └── StarfireUtilitiesEditor.h │ │ │ └── DefaultEventsManager.h │ │ ├── Private │ │ │ └── Module │ │ │ │ └── StarfireUtilitiesEditor.cpp │ │ └── StarfireUtilitiesEditor.Build.cs │ └── StarfireUtilitiesDeveloper │ │ ├── Public │ │ ├── Module │ │ │ └── StarfireUtilitiesDeveloper.h │ │ ├── KismetNodes │ │ │ └── K2Interface_SelectDelegate.h │ │ └── K2Nodes │ │ │ ├── K2Node_NativeForEach.h │ │ │ └── K2Node_IsValidObject.h │ │ ├── Private │ │ ├── KismetNodes │ │ │ ├── SGraphNode_K2HierarchicalGameplayTagSwitch.h │ │ │ ├── K2Interface_SelectDelegate.cpp │ │ │ └── SGraphNodeK2BindDelegate.h │ │ └── Module │ │ │ └── StarfireUtilitiesDeveloper.cpp │ │ └── StarfireUtilitiesDeveloper.Build.cs ├── Resources │ ├── Icon128.png │ ├── is_valid.png │ ├── tag_switch.png │ ├── bind_delegate.png │ └── delegate_param.png ├── LICENSE └── StarfireUtilities.uplugin └── LICENSE /StarfireAssets/Config/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireAssets/Content/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireMessenger/Config/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireMessenger/Content/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfirePersistence/Config/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfirePersistence/Content/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireSaveData/Config/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireSaveData/Content/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireUtilities/Config/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireUtilities/Content/Placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /StarfireMessenger/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | /README.md 3 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Lambdas/InvokedScope.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Lambdas/InvokedScope.h" -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Templates/TypeUtilitiesSF.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Templates/TypeUtilitiesSF.h" -------------------------------------------------------------------------------- /StarfireAssets/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireAssets/Resources/Icon128.png -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Templates/ArrayTypeUtilitiesSF.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Templates/ArrayTypeUtilitiesSF.h" -------------------------------------------------------------------------------- /StarfireMessenger/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/Icon128.png -------------------------------------------------------------------------------- /StarfireSaveData/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireSaveData/Resources/Icon128.png -------------------------------------------------------------------------------- /StarfireUtilities/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Resources/Icon128.png -------------------------------------------------------------------------------- /StarfireUtilities/Resources/is_valid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Resources/is_valid.png -------------------------------------------------------------------------------- /StarfirePersistence/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfirePersistence/Resources/Icon128.png -------------------------------------------------------------------------------- /StarfireUtilities/Resources/tag_switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Resources/tag_switch.png -------------------------------------------------------------------------------- /StarfireUtilities/Content/RedScreen_W.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Content/RedScreen_W.uasset -------------------------------------------------------------------------------- /StarfireUtilities/Resources/bind_delegate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Resources/bind_delegate.png -------------------------------------------------------------------------------- /StarfireUtilities/Resources/delegate_param.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireUtilities/Resources/delegate_param.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_Broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_Broadcast.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_MessageCast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_MessageCast.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_Messenger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_Messenger.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_MessageListen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_MessageListen.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_RegisterList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_RegisterList.png -------------------------------------------------------------------------------- /StarfireUtilities/Config/Redscreens.ini: -------------------------------------------------------------------------------- 1 | 2 | [/Script/StarfireUtilities.RedscreenManager] 3 | RedscreenWidgetType = "/StarfireUtilities/RedScreen_W.RedScreen_W_C" -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_BroadcastListing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_BroadcastListing.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_MessageRegister.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_MessageRegister.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_ProjectSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_ProjectSettings.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_BroadcastBlueprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_BroadcastBlueprint.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_MessageProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_MessageProperties.png -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Public/Module/StarfirePersistence.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | DECLARE_LOG_CATEGORY_EXTERN( LogStarfirePersistence, Log, Log ); -------------------------------------------------------------------------------- /StarfireMessenger/Resources/readme_BlueprintMessageTypes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/readme_BlueprintMessageTypes.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_MetaDataKeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_MetaDataKeys.png -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/PersistenceShared.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "PersistenceShared.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(PersistenceShared) -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/SaveDataCommon.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataCommon.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(SaveDataCommon) -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_CustomMetaData.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_CustomMetaData.gif -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_CustomMetaData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_CustomMetaData.png -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_EditCondition.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_EditCondition.gif -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_ForceInlineRow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_ForceInlineRow.gif -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessenger/Private/Messenger/MessengerTypes.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Messenger/MessengerTypes.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(MessengerTypes) -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/DataStoreVisualizer.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataStoreVisualizer.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DataStoreVisualizer) -------------------------------------------------------------------------------- /StarfireMessenger/Resources/MDMetaData/readme_GameplayTagFilter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagForceSeven/Starfire/HEAD/StarfireMessenger/Resources/MDMetaData/readme_GameplayTagFilter.gif -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Public/SaveData/SaveDataVersion.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Misc/Guid.h" 5 | 6 | STARFIRESAVEDATA_API extern const FGuid SaveDataVersion; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/AssetValidation/VerifiableContent.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "AssetValidation/VerifiableContent.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(VerifiableContent) -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/SaveDataVersion.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataVersion.h" 3 | 4 | const FGuid SaveDataVersion( TEXT( "911DAB82089148DBBB3B34A79941428C" ) ); -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/BlueprintUtilitiesSF.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Kismet/BlueprintUtilitiesSF.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BlueprintUtilitiesSF) -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/DataDefinitions/DataDefinitionSource.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataDefinitions/DataDefinitionSource.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DataDefinitionSource) -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/PersistentSubsystemInterface.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "PersistentSubsystemInterface.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(PersistentSubsystemInterface) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Lambdas/OnScopeExit.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Misc/ScopeExit.h" 5 | 6 | #define SF_ON_SCOPE_EXIT( Suffix ) const auto PREPROCESSOR_JOIN( PREPROCESSOR_JOIN( ScopeGuard_, __LINE__ ), Suffix ) = ::ScopeExitSupport::FScopeGuardSyntaxSupport( ) + [ & ]( ) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/NativeGameplayTags_SF.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "NativeGameplayTags.h" 5 | 6 | // Use UE_DEFINE_GAMEPLAY_TAG in the cpp like: UE_DEFINE_GAMEPLAY_TAG( Class::StaticVarName, ) 7 | #define UE_DECLARE_GAMEPLAY_TAG_SCOPED(TagName) static FNativeGameplayTag TagName; 8 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Config/MDMetaDataEditorUserConfig.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | 4 | #include "MDMetaDataEditorUserConfig.h" 5 | 6 | FText UMDMetaDataEditorUserConfig::GetSectionText() const 7 | { 8 | return INVTEXT("Meta Data Editor (Local Only)"); 9 | } 10 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/MessengerPinFactory.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "EdGraphUtilities.h" 5 | 6 | // Custom factory to for Messenger related K2 Node pins 7 | class FMessengerPinFactory : public FGraphPanelPinFactory 8 | { 9 | TSharedPtr< SGraphPin > CreatePin( UEdGraphPin *InPin ) const override; 10 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/PeristentArchiveVersion.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // Custom versioning to handle any potential format changes 5 | enum class EPersistenceVersion : uint32 6 | { 7 | Initial = 0, 8 | 9 | // Add all format change versions above this entry 10 | Current_Plus_One, 11 | Latest = Current_Plus_One - 1, 12 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Resources/PlaceholderButtonIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/DataDefinitions/DefinitionExtension.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataDefinitions/DefinitionExtension.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DefinitionExtension) 5 | 6 | FPrimaryAssetId UDataDefinitionExtension::GetPrimaryAssetId( ) const 7 | { 8 | return FPrimaryAssetId( UDataDefinitionExtension::StaticClass( )->GetFName( ), GetFName( ) ); 9 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/Module/StarfireAssets.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for runtime implementation of Strategy Tech plugin 7 | class FStarfireAssets : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Public/Module/StarfireSaveData.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for runtime implementation of Strategy Tech plugin 7 | class FStarfireSaveData : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Public/Module/SaveDataExample.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for runtime implementation of Strategy Tech plugin 7 | class FSaveDataExampleModule : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Module/StarfireUtilities.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for runtime implementation of Strategy Tech plugin 7 | class FStarfireUtilities : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerEditor/Public/Module/StarfireMessengerEditor.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Editor only functionality for the Strategy Tech plugin 7 | class FStarfireMessengerEditor : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataEditor/Public/Module/StarfireSaveDataEditor.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Editor only functionality for the Strategy Tech plugin 7 | class FStarfireSaveDataEditor : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesEditor/Public/Module/StarfireUtilitiesEditor.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Editor only functionality for the Strategy Tech plugin 7 | class FStarfireUtilitiesEditor : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsDeveloper/Public/Module/StarfireAssetsDeveloper.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Developer only build functionality for the Strategy Tech plugin 7 | class FStarfireAssetsDeveloper : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceEditor/Public/Module/StarfirePersistenceEditor.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE module definition for Editor only functionality for the StarfirePersistence plugin 7 | class FStarfirePersistenceEditor : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataDeveloper/Public/Module/StarfireSaveDataDeveloper.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Developer only build functionality for the Strategy Tech plugin 7 | class FStarfireSaveDataDeveloper : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Public/Module/StarfireUtilitiesDeveloper.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE4 module definition for Developer only build functionality for the Strategy Tech plugin 7 | class FStarfireUtilitiesDeveloper : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceDeveloper/Public/Module/StarfirePersistenceDeveloper.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE module definition for Developer only build functionality for the StarfirePersistence plugin 7 | class FStarfirePersistenceDeveloper : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Public/Module/StarfireDataActors.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | // UE module definition for runtime implementation of StarfireDataActors plugin 7 | class FStarfireDataActors : public IModuleInterface 8 | { 9 | public: 10 | 11 | /** IModuleInterface implementation */ 12 | void StartupModule( ) override; 13 | void ShutdownModule( ) override; 14 | }; 15 | 16 | DECLARE_LOG_CATEGORY_EXTERN( LogStarfireDataActors, Log, All ); -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/ExecSF.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef SF_EXEC_HPP 4 | #error You shouldn't be including this file directly 5 | #endif 6 | 7 | template < typename First_t, typename... Args_t > 8 | int ExecSF_Params::GetParams( const TCHAR *&Cmd, First_t &First, Args_t&... Args ) 9 | { 10 | int count = GetParams< First_t >( Cmd, First ); 11 | 12 | if (count > 0) 13 | count += GetParams( Cmd, Args... ); 14 | 15 | return count; 16 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessenger/Public/Module/StarfireMessenger.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | STARFIREMESSENGER_API DECLARE_LOG_CATEGORY_EXTERN( LogStarfireMessenger, Log, All ); 7 | 8 | // UE4 module definition for runtime implementation of Strategy Tech plugin 9 | class FStarfireMessenger : public IModuleInterface 10 | { 11 | public: 12 | 13 | /** IModuleInterface implementation */ 14 | void StartupModule( ) override; 15 | void ShutdownModule( ) override; 16 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Public/Module/StarfireMessengerDeveloper.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | class FMessengerPinFactory; 7 | 8 | // UE4 module definition for Developer only build functionality for the Strategy Tech plugin 9 | class FStarfireMessengerDeveloper : public IModuleInterface 10 | { 11 | public: 12 | // Pin factory for creating filtered structure selectors 13 | TSharedPtr< FMessengerPinFactory > MessengerPinFactory; 14 | 15 | /** IModuleInterface implementation */ 16 | void StartupModule( ) override; 17 | void ShutdownModule( ) override; 18 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/Linux/SaveDataUtilities_Linux.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataUtilities.h" 3 | 4 | // Engine 5 | #include "SaveGameSystem.h" 6 | #include "PlatformFeatures.h" 7 | 8 | TArray< FString > USaveDataUtilities::EnumerateSlotNames( int32 UserIndex ) 9 | { 10 | // Get all the saved games for the given user and current title id, caching them for later use 11 | TArray< FString > SaveSlots; 12 | 13 | if (ISaveGameSystem *SaveSystem = IPlatformFeaturesModule::Get( ).GetSaveGameSystem( )) 14 | { 15 | SaveSystem->GetSaveGameNames( SaveSlots, UserIndex ); 16 | } 17 | 18 | return SaveSlots; 19 | } -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/Android/SaveDataUtilities_Android.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataUtilities.h" 3 | 4 | // Engine 5 | #include "SaveGameSystem.h" 6 | #include "PlatformFeatures.h" 7 | 8 | TArray< FString > USaveDataUtilities::EnumerateSlotNames( int32 UserIndex ) 9 | { 10 | // Get all the saved games for the given user and current title id, caching them for later use 11 | TArray< FString > SaveSlots; 12 | 13 | if (ISaveGameSystem *SaveSystem = IPlatformFeaturesModule::Get( ).GetSaveGameSystem( )) 14 | { 15 | SaveSystem->GetSaveGameNames( SaveSlots, UserIndex ); 16 | } 17 | 18 | return SaveSlots; 19 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/GameplayTagK2Statics.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Kismet/BlueprintFunctionLibrary.h" 5 | 6 | #include "GameplayTagK2Statics.generated.h" 7 | 8 | struct FGameplayTag; 9 | 10 | UCLASS( ) 11 | class UGameplayTagK2Statics : public UBlueprintFunctionLibrary 12 | { 13 | GENERATED_BODY() 14 | private: 15 | friend class UK2Node_HierarchicalGameplayTagSwitch; 16 | 17 | // Utility function for custom gameplay tag switch 18 | UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = true)) 19 | static int DetermineBestMatch( FGameplayTag CheckTag, const TArray< FGameplayTag > &Tags ); 20 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Debug/RedscreenScreen.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Debug/RedscreenScreen.h" 3 | 4 | // UMG 5 | #include "Blueprint/WidgetTree.h" 6 | #include "Components/TextBlock.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(RedscreenScreen) 9 | 10 | UTextBlock* URedscreenScreen::CreateText( const FString &Text ) const 11 | { 12 | const auto TextBlock = WidgetTree->ConstructWidget< UTextBlock >( ); 13 | 14 | TextBlock->SetText( FText::FromString( Text ) ); 15 | 16 | return TextBlock; 17 | } 18 | 19 | void URedscreenScreen::CloseScreen_Implementation( ) 20 | { 21 | OnClose.Broadcast( this ); 22 | 23 | RemoveFromParent( ); 24 | } 25 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/DataDefinitions/Exec_DataDefinition.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataDefinitions/Exec_DataDefinition.h" 3 | 4 | #include "DataDefinitions/DataDefinitionLibrary.h" 5 | 6 | int ExecSF_Params::GetParams_Impl( const TCHAR *&Cmd, UClass *Type, const UDataDefinition* &output ) 7 | { 8 | const auto Param = FParse::Token( Cmd, true ); 9 | if (Param.IsEmpty( )) 10 | return 0; 11 | 12 | const auto Library = UDataDefinitionLibrary::GetInstance( ); 13 | output = Library->DEBUG_FindDefinition< UDataDefinition >( FName( *Param ) ); 14 | 15 | if (output == nullptr) 16 | return 0; 17 | 18 | if (!output->IsA( Type )) 19 | return 0; 20 | 21 | return 1; 22 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/Module/StarfireAssets.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireAssets.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireAssets" 5 | 6 | void FStarfireAssets::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireAssets::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireAssets, StarfireAssets ) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Lambdas/InvokedScope.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // A structure for invoking a lambda through an operator overload which allows the scope to come after the invocation 5 | struct FInvokedScopeCaller 6 | { 7 | template< typename type_t > 8 | FORCEINLINE auto operator+( type_t&& Lambda ) -> decltype( auto ) 9 | { 10 | return Lambda( ); 11 | } 12 | }; 13 | 14 | // Macro that can create and invoke a lambda but make it look like a regular non-lambda scope 15 | // 16 | // var = INVOKED_SCOPE 17 | // { 18 | // 19 | // .. complicate logic 20 | // 21 | // return something 22 | // }; 23 | #define INVOKED_SCOPE FInvokedScopeCaller( ) + [ & ]( ) -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/GenericPlatform/SaveDataUtilities_GenericPlatform.cpp: -------------------------------------------------------------------------------- 1 | #if 0 2 | 3 | #include "SaveData/SaveDataUtilities.h" 4 | 5 | // Engine 6 | #include "SaveGameSystem.h" 7 | #include "PlatformFeatures.h" 8 | 9 | TArray< FString > USaveDataUtilities::EnumerateSlotNames( int32 UserIndex ) 10 | { 11 | // Get all the saved games for the given user and current title id, caching them for later use 12 | TArray< FString > SaveSlots; 13 | 14 | if (ISaveGameSystem *SaveSystem = IPlatformFeaturesModule::Get( ).GetSaveGameSystem( )) 15 | { 16 | SaveSystem->GetSaveGameNames( SaveSlots, UserIndex ); 17 | } 18 | 19 | return SaveSlots; 20 | } 21 | 22 | #endif -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditorGraph/Private/Extensions/MDMetaDataEditorBlueprintCompilerExtension.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "BlueprintCompilerExtension.h" 6 | #include "MDMetaDataEditorBlueprintCompilerExtension.generated.h" 7 | 8 | 9 | /** 10 | * Compiler extension to copy meta data into function local variable properties 11 | */ 12 | UCLASS() 13 | class UMDMetaDataEditorBlueprintCompilerExtension : public UBlueprintCompilerExtension 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void ProcessBlueprintCompiled(const FKismetCompilerContext& CompilationContext, const FBlueprintCompiledData& Data) override; 19 | }; 20 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Public/DataStoreVisualizer.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Components/ActorComponent.h" 5 | 6 | #include "DataStoreVisualizer.generated.h" 7 | 8 | class ADataStoreActor; 9 | 10 | // Component that acts as a link between data store actors and an actor that acts as their visual representation 11 | UCLASS( ) 12 | class STARFIREDATAACTORS_API UDataStoreVisualizer : public UActorComponent 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | 17 | private: 18 | friend class UDataStoreUtilities; 19 | 20 | // The Data Store Actor that this visualizer is associated with 21 | UPROPERTY( VisibleInstanceOnly ) 22 | TObjectPtr< ADataStoreActor > DataStoreActor; 23 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/Module/StarfireSaveData.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireSaveData.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireSaveData" 5 | 6 | void FStarfireSaveData::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireSaveData::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireSaveData, StarfireSaveData ) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Module/StarfireUtilities.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireUtilities.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireUtilities" 5 | 6 | void FStarfireUtilities::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireUtilities::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireUtilities, StarfireUtilities ) -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Private/Module/SaveDataExample.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/SaveDataExample.h" 3 | 4 | #define LOCTEXT_NAMESPACE "SaveDataExampleModule" 5 | 6 | void FSaveDataExampleModule::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FSaveDataExampleModule::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FSaveDataExampleModule, SaveDataExample ) -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Public/DataStoreSingleton.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "DataStoreActor.h" 5 | 6 | #include "DataStoreSingleton.generated.h" 7 | 8 | // A data store type that should only have a single instance 9 | UCLASS( Abstract ) 10 | class STARFIREDATAACTORS_API ADataStoreSingleton : public ADataStoreActor 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | // Actor API 15 | void PostActorCreated( ) override; 16 | void EndPlay(const EEndPlayReason::Type EndPlayReason) override; 17 | 18 | // Data Store Actor API 19 | #if WITH_EDITOR 20 | FString GetCustomActorLabel_Implementation( ) const override; 21 | FString GetCustomOutlinerFolder_Implementation( ) const override; 22 | #endif 23 | }; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsEditor/Public/Module/StarfireAssetsEditor.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | #include "UObject/ObjectSaveContext.h" 7 | 8 | // UE4 module definition for Editor only functionality for the Strategy Tech plugin 9 | class FStarfireAssetsEditor : public IModuleInterface 10 | { 11 | public: 12 | 13 | /** IModuleInterface implementation */ 14 | void StartupModule( ) override; 15 | void ShutdownModule( ) override; 16 | 17 | private: 18 | // Registration for assets being saved to check for the Verifiable content interface and Verify 19 | FDelegateHandle VerifiableOnSaveHandle; 20 | void OnSaveVerifiableAsset( UObject *Asset, FObjectPreSaveContext Context ); 21 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataEditor/Private/Module/StarfireSaveDataEditor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireSaveDataEditor.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireSaveDataEditor" 5 | 6 | void FStarfireSaveDataEditor::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireSaveDataEditor::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireSaveDataEditor, StarfireSaveDataEditor ) -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsDeveloper/Private/Module/StarfireAssetsDeveloper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireAssetsDeveloper.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireAssetsDeveloper" 5 | 6 | void FStarfireAssetsDeveloper::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireAssetsDeveloper::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireAssetsDeveloper, StarfireAssetsDeveloper ) -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerEditor/Private/Module/StarfireMessengerEditor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireMessengerEditor.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireMessengerEditor" 5 | 6 | void FStarfireMessengerEditor::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireMessengerEditor::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireMessengerEditor, StarfireMessengerEditor ) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesEditor/Private/Module/StarfireUtilitiesEditor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireUtilitiesEditor.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireUtilitiesEditor" 5 | 6 | void FStarfireUtilitiesEditor::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireUtilitiesEditor::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireUtilitiesEditor, StarfireUtilitiesEditor ) -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessenger/Private/Module/StarfireMessenger.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireMessenger.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireMessenger" 5 | 6 | DEFINE_LOG_CATEGORY( LogStarfireMessenger ); 7 | 8 | void FStarfireMessenger::StartupModule( ) 9 | { 10 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 11 | } 12 | 13 | void FStarfireMessenger::ShutdownModule( ) 14 | { 15 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 16 | // we call this function before unloading the module. 17 | } 18 | 19 | #undef LOCTEXT_NAMESPACE 20 | 21 | IMPLEMENT_MODULE( FStarfireMessenger, StarfireMessenger ) -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataDeveloper/Private/Module/StarfireSaveDataDeveloper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireSaveDataDeveloper.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfireSaveDataDeveloper" 5 | 6 | void FStarfireSaveDataDeveloper::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfireSaveDataDeveloper::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfireSaveDataDeveloper, StarfireSaveDataDeveloper ) -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/Module/StarfireDataActors.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireDataActors.h" 3 | 4 | DEFINE_LOG_CATEGORY( LogStarfireDataActors ) 5 | 6 | #define LOCTEXT_NAMESPACE "StarfireDataActors" 7 | 8 | void FStarfireDataActors::StartupModule( ) 9 | { 10 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 11 | } 12 | 13 | void FStarfireDataActors::ShutdownModule( ) 14 | { 15 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 16 | // we call this function before unloading the module. 17 | } 18 | 19 | #undef LOCTEXT_NAMESPACE 20 | 21 | IMPLEMENT_MODULE( FStarfireDataActors, StarfireDataActors ) -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceEditor/Private/Module/StarfirePersistenceEditor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfirePersistenceEditor.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfirePersistenceEditor" 5 | 6 | void FStarfirePersistenceEditor::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfirePersistenceEditor::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfirePersistenceEditor, StarfirePersistenceEditor ) -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/Module/StarfireMessengerDeveloper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireMessengerDeveloper.h" 3 | 4 | #include "MessengerPinFactory.h" 5 | 6 | #define LOCTEXT_NAMESPACE "StarfireMessengerDeveloper" 7 | 8 | void FStarfireMessengerDeveloper::StartupModule( ) 9 | { 10 | if (!MessengerPinFactory.IsValid( )) 11 | MessengerPinFactory = MakeShareable( new FMessengerPinFactory( ) ); 12 | 13 | FEdGraphUtilities::RegisterVisualPinFactory( MessengerPinFactory ); 14 | } 15 | 16 | void FStarfireMessengerDeveloper::ShutdownModule( ) 17 | { 18 | FEdGraphUtilities::UnregisterVisualPinFactory( MessengerPinFactory ); 19 | } 20 | 21 | #undef LOCTEXT_NAMESPACE 22 | 23 | IMPLEMENT_MODULE( FStarfireMessengerDeveloper, StarfireMessengerDeveloper ) 24 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Private/KismetNodes/SGraphNode_K2HierarchicalGameplayTagSwitch.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "KismetNodes/SGraphNodeK2Base.h" 5 | 6 | class SVerticalBox; 7 | class UK2Node_HierarchicalGameplayTagSwitch; 8 | 9 | class SGraphNode_K2HierarchicalGameplayTagSwitch : public SGraphNodeK2Base 10 | { 11 | public: 12 | SLATE_BEGIN_ARGS(SGraphNode_K2HierarchicalGameplayTagSwitch) { } 13 | SLATE_END_ARGS() 14 | 15 | void Construct( const FArguments &InArgs, UK2Node_HierarchicalGameplayTagSwitch *InNode ); 16 | 17 | // SGraphNode API 18 | void CreatePinWidgets() override; 19 | 20 | protected: 21 | // SGraphNode API 22 | void CreateOutputSideAddButton( TSharedPtr< SVerticalBox > OutputBox ) override; 23 | FReply OnAddPin( ) override; 24 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/LatentAction_Simple.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Misc/LatentAction_Simple.h" 3 | 4 | FLatentAction_Simple::FLatentAction_Simple( const FLatentActionInfo& LatentInfo ) 5 | : ExecutionFunction( LatentInfo.ExecutionFunction ), 6 | Linkage( LatentInfo.Linkage ), 7 | CallbackTarget( LatentInfo.CallbackTarget ) 8 | { 9 | 10 | } 11 | 12 | void FLatentAction_Simple::UpdateOperation( FLatentResponse &Response ) 13 | { 14 | auto UpdateResponse = Update( ); 15 | 16 | if ((UpdateResponse & ELatentActionResponse::Trigger) != ELatentActionResponse::None) 17 | Response.TriggerLink( ExecutionFunction, Linkage, CallbackTarget ); 18 | 19 | if ((UpdateResponse & ELatentActionResponse::Finish) != ELatentActionResponse::None) 20 | Response.DoneIf( true ); 21 | } -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceDeveloper/Private/Module/StarfirePersistenceDeveloper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfirePersistenceDeveloper.h" 3 | 4 | #define LOCTEXT_NAMESPACE "StarfirePersistenceDeveloper" 5 | 6 | void FStarfirePersistenceDeveloper::StartupModule( ) 7 | { 8 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 9 | } 10 | 11 | void FStarfirePersistenceDeveloper::ShutdownModule( ) 12 | { 13 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 14 | // we call this function before unloading the module. 15 | } 16 | 17 | #undef LOCTEXT_NAMESPACE 18 | 19 | IMPLEMENT_MODULE( FStarfirePersistenceDeveloper, StarfirePersistenceDeveloper ) -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditorGraph/MDMetaDataEditorGraph.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class MDMetaDataEditorGraph : ModuleRules 6 | { 7 | public MDMetaDataEditorGraph(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | bTreatAsEngineModule = false; 11 | 12 | PrivateDependencyModuleNames.AddRange( 13 | new string[] 14 | { 15 | "BlueprintGraph", 16 | "Core", 17 | "CoreUObject", 18 | "Engine", 19 | "Kismet", 20 | "Slate", 21 | "SlateCore", 22 | "UnrealEd" 23 | } 24 | ); 25 | } 26 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/DataDefinitions/Exec_DataDefinition.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | class UDataDefinition; 5 | 6 | namespace ExecSF_Params 7 | { 8 | STARFIREASSETS_API int GetParams_Impl( const TCHAR *&Cmd, UClass *Type, const UDataDefinition* &output ); 9 | 10 | template < class type_t > 11 | requires std::derived_from< type_t, UDataDefinition > 12 | int GetParams( const TCHAR *&Cmd, const type_t* &output ) 13 | { 14 | return GetParams_Impl( Cmd, type_t::StaticClass( ), (const UDataDefinition*&)output ); 15 | } 16 | 17 | template < class type_t > 18 | requires std::convertible_to< type_t, const UDataDefinition* > 19 | int GetParams( const TCHAR *&Cmd, type_t &output ) 20 | { 21 | return GetParams_Impl( Cmd, std::remove_pointer_t< type_t >::StaticClass( ), (const UDataDefinition*&)output ); 22 | } 23 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorPropertyTypeCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "IPropertyTypeCustomization.h" 5 | 6 | class FMDMetaDataEditorPropertyTypeCustomization : public IPropertyTypeCustomization 7 | { 8 | public: 9 | static TSharedRef MakeInstance(); 10 | 11 | virtual void CustomizeHeader(TSharedRef PropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& CustomizationUtils) override; 12 | 13 | virtual void CustomizeChildren(TSharedRef PropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& CustomizationUtils) override {} 14 | 15 | virtual bool ShouldInlineKey() const override { return true; } 16 | }; 17 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Templates/TypeUtilitiesSF.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef TYPE_UTILITIES_SF_HPP 4 | #error You shouldn't be including this file directly 5 | #endif 6 | 7 | template < CInterfaceType type_t > 8 | UClass* GetStaticClass( ) 9 | { 10 | return type_t::UClassType::StaticClass( ); 11 | } 12 | 13 | template < CObjectType type_t > 14 | UClass* GetStaticClass( ) 15 | { 16 | return type_t::StaticClass( ); 17 | } 18 | 19 | bool TypeMatch( const UObject *Object, const UClass *Type ) 20 | { 21 | if (Object == nullptr) 22 | return false; 23 | 24 | if (Type == nullptr) 25 | return true; 26 | 27 | if (Type->IsChildOf( UInterface::StaticClass( ) )) 28 | return Object->GetClass( )->ImplementsInterface( Type ); 29 | 30 | return Object->IsA( Type ); 31 | } 32 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/MDMetaDataEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class MDMetaDataEditor : ModuleRules 6 | { 7 | public MDMetaDataEditor(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | bTreatAsEngineModule = false; 11 | 12 | PrivateDependencyModuleNames.AddRange( 13 | new string[] 14 | { 15 | "ApplicationCore", 16 | "BlueprintGraph", 17 | "Core", 18 | "CoreUObject", 19 | "DeveloperSettings", 20 | "EditorFramework", 21 | "Engine", 22 | "GameplayTags", 23 | "GameplayTagsEditor", 24 | "InputCore", 25 | "KismetWidgets", 26 | "Slate", 27 | "SlateCore", 28 | "UMG", 29 | "UMGEditor", 30 | "UnrealEd" 31 | } 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Public/DataStoreSettings.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Engine/DeveloperSettings.h" 5 | 6 | #include "DataStoreSettings.generated.h" 7 | 8 | class ADataStoreSingleton; 9 | 10 | // Project configuration options for the Persistent Data Store Actors 11 | UCLASS( DefaultConfig, Config = "Game" ) 12 | class STARFIREDATAACTORS_API UDataStoreSettings : public UDeveloperSettings 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // Blueprint Types 17 | UPROPERTY( EditDefaultsOnly, Config ) 18 | TArray< TSoftClassPtr< ADataStoreSingleton > > SingletonTypes; 19 | 20 | // Developer Settings API 21 | FName GetContainerName( ) const override; 22 | FName GetCategoryName( ) const override; 23 | FName GetSectionName( ) const override; 24 | 25 | #if WITH_EDITOR 26 | FText GetSectionText( ) const override; 27 | FText GetSectionDescription( ) const override; 28 | #endif 29 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorVariableCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MDMetaDataEditorCustomizationBase.h" 6 | 7 | class FMDMetaDataEditorFieldView; 8 | 9 | class FMDMetaDataEditorVariableCustomization : public FMDMetaDataEditorCustomizationBase 10 | { 11 | public: 12 | static TSharedPtr MakeInstance(TSharedPtr BlueprintEditor); 13 | 14 | FMDMetaDataEditorVariableCustomization(const TWeakPtr& BlueprintEditor, TWeakObjectPtr&& BlueprintPtr) 15 | : FMDMetaDataEditorCustomizationBase(BlueprintEditor, MoveTemp(BlueprintPtr)) 16 | { 17 | } 18 | 19 | virtual void CustomizeObject(IDetailLayoutBuilder& DetailLayout, UObject* Obj) override; 20 | 21 | private: 22 | TSharedPtr VariableFieldView; 23 | }; 24 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Config/MDMetaDataEditorUserConfig.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Engine/DeveloperSettings.h" 6 | #include "MDMetaDataEditorUserConfig.generated.h" 7 | 8 | /** 9 | * Configure meta data editor behaviours. 10 | * Settings are specific to the local user. 11 | */ 12 | UCLASS(Config = EditorPerProjectUserSettings, MinimalAPI) 13 | class UMDMetaDataEditorUserConfig : public UDeveloperSettings 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual FText GetSectionText() const override; 19 | 20 | // If true, a raw key-value editor will be displayed on variables/functions that can have meta data 21 | // This viewing/editing of all meta data, even if not exposed by the Meta Data Editor config. 22 | UPROPERTY(EditDefaultsOnly, Config, Category = "Editor Config") 23 | bool bEnableRawMetaDataEditor = false; 24 | }; 25 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/MessengerPinFactory.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "MessengerPinFactory.h" 3 | 4 | #include "SGraphPinMessengerType.h" 5 | 6 | #include "K2Node_MessengerNodeBase.h" 7 | #include "K2Node_CastMessage.h" 8 | 9 | TSharedPtr< SGraphPin > FMessengerPinFactory::CreatePin( UEdGraphPin *InPin ) const 10 | { 11 | const auto Node = InPin->GetOwningNode( ); 12 | 13 | if (const auto CastNode = Cast< UK2Node_CastMessage >( Node )) 14 | { 15 | if (CastNode->GetTypePin( ) == InPin) 16 | return SNew( SGraphPinMessengerType, InPin, CastNode->GetBaseAllowedType( ), CastNode->bAllowsAbstract ); 17 | } 18 | 19 | if (const auto BaseNode = Cast< UK2Node_MessengerNodeBase >( Node )) 20 | { 21 | if (BaseNode->GetTypePin( ) == InPin) 22 | return SNew( SGraphPinMessengerType, InPin, BaseNode->bAllowImmediate, BaseNode->bAllowStateful, BaseNode->bAllowsAbstract ); 23 | } 24 | 25 | return nullptr; 26 | } 27 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Private/SaveGames/GameSaveDataVersion.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveGames/GameSaveDataVersion.h" 3 | 4 | // Remove the Example version and use the SaveGameVersion declared in SaveGameVersion for production code 5 | const FGuid Example_SaveGameVersion( 0xBAADF00D, 0xDEADBEEF, 0xD15EA5ED, 0x0B00B135 ); 6 | // ReSharper disable once CppDeclaratorNeverUsed 7 | static FDevVersionRegistration GRegisterSaveGameVersion( Example_SaveGameVersion, (int32)EGameSaveDataVersion::Build_Latest, TEXT("SaveGameExample") ); 8 | 9 | EGameSaveDataVersion Ex_GetSaveGameVersion( const FArchive &Ar ) 10 | { 11 | const FCustomVersion *CustomVersion = Ar.GetCustomVersions( ).GetVersion( Example_SaveGameVersion ); 12 | if (CustomVersion == nullptr) 13 | return EGameSaveDataVersion::Latest; 14 | 15 | // return the build agnostic view of the version 16 | return GameSaveData_StripRTM( (EGameSaveDataVersion)CustomVersion->Version ); 17 | } 18 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Templates/ContainerRandUtilities.cpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable CppDeclaratorNeverUsed 3 | #include "Templates/ContainerRandUtilities.h" 4 | 5 | static void Test( ) 6 | { 7 | TArray< int > ArrayTest; 8 | TMap< UObject*, int > MapTest; 9 | TSet< float > SetTest; 10 | 11 | ContainerRand::Shuffle( ArrayTest ); 12 | 13 | // if uncommented, these should fail to compile since they're always sorted 14 | //ContainerRand::Shuffle( MapTest ); 15 | //ContainerRand::Shuffle( SetTest ); 16 | 17 | { 18 | const auto Test1 = ContainerRand::RandElement( ArrayTest ); 19 | const auto Test2 = ContainerRand::RandElement( MapTest ); 20 | const auto Test3 = ContainerRand::RandElement( SetTest ); 21 | } 22 | 23 | { 24 | const auto Test1 = ContainerRand::RandRemove( ArrayTest ); 25 | const auto Test2 = ContainerRand::RandRemove( MapTest ); 26 | const auto Test3 = ContainerRand::RandRemove( SetTest ); 27 | } 28 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Templates/SFArrayCaster.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Containers/Array.h" 5 | 6 | // Copied from TArrayCaster in GeneratedCodeHelpers.h, but there's a compiler error in that header 7 | // and a big comment block about how that file shouldn't be included by anyone anyway 8 | template < typename type_t > 9 | struct TSFArrayCaster 10 | { 11 | TArray< type_t > Val; 12 | TArray< type_t > &ValRef; 13 | 14 | explicit TSFArrayCaster( const TArray< type_t > &InArr ) 15 | : Val( ) 16 | , ValRef( *(TArray< type_t >*)( &InArr ) ) 17 | {} 18 | 19 | explicit TSFArrayCaster( TArray< type_t > &&InArr ) 20 | : Val( MoveTemp( InArr ) ) 21 | , ValRef( Val ) 22 | {} 23 | 24 | template< typename other_t > 25 | TArray< other_t >& Get( ) 26 | { 27 | static_assert( sizeof( type_t ) == sizeof( other_t ), "Incompatible pointers" ); 28 | return *reinterpret_cast< TArray< other_t >* >( &ValRef ); 29 | } 30 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/GameplayTagK2Statics.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GameplayTagK2Statics.h" 3 | 4 | #include "GameplayTagContainer.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(GameplayTagK2Statics) 7 | 8 | int UGameplayTagK2Statics::DetermineBestMatch( FGameplayTag CheckTag, const TArray< FGameplayTag > &Tags ) 9 | { 10 | int BestMatchIndex = -1; 11 | int BestMatchDepth = -1; 12 | 13 | for (int idx = 0; idx < Tags.Num(); idx++) 14 | { 15 | const auto &Tag = Tags[ idx ]; 16 | 17 | const auto TagDepth = Tag.GetGameplayTagParents( ).Num( ); 18 | const auto MatchDepth = CheckTag.MatchesTagDepth( Tag ); 19 | 20 | if (TagDepth != MatchDepth) 21 | continue; // skip if we don't match the whole tag 22 | 23 | if (MatchDepth <= BestMatchDepth) 24 | continue; // skip if it's not as good as current match 25 | 26 | BestMatchIndex = idx; 27 | BestMatchDepth = MatchDepth; 28 | } 29 | 30 | return BestMatchIndex; 31 | } 32 | -------------------------------------------------------------------------------- /StarfireMessenger/MDMetaDataEditor-LICENSE: -------------------------------------------------------------------------------- 1 | zlib License 2 | 3 | Copyright (c) 2023 Dylan Dumesnil 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/DataStoreSettings.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataStoreSettings.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DataStoreSettings) 5 | 6 | #define LOCTEXT_NAMESPACE "StarfireDataActors_DeveloperSettings" 7 | 8 | FName UDataStoreSettings::GetContainerName( ) const 9 | { 10 | return FName( "Project" ); 11 | } 12 | 13 | FName UDataStoreSettings::GetCategoryName( ) const 14 | { 15 | return FName( "Game" ); 16 | } 17 | 18 | FName UDataStoreSettings::GetSectionName( ) const 19 | { 20 | return FName( "Starfire Data Actors Settings" ); 21 | } 22 | 23 | #if WITH_EDITOR 24 | FText UDataStoreSettings::GetSectionText( ) const 25 | { 26 | return LOCTEXT( "SectionText", "Starfire Data Actors Settings" ); 27 | } 28 | 29 | FText UDataStoreSettings::GetSectionDescription( ) const 30 | { 31 | return LOCTEXT( "SectionDescription", "Configuration options for the Starfire Data Actors module." ); 32 | } 33 | #endif 34 | 35 | #undef LOCTEXT_NAMESPACE -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/MDMetaDataEditorModule.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Delegates/IDelegateInstance.h" 6 | #include "Modules/ModuleInterface.h" 7 | #include "Templates/SharedPointer.h" 8 | 9 | class FMDMetaDataEditorStructChangeHandler; 10 | 11 | class FMDMetaDataEditorModule : public IModuleInterface 12 | { 13 | public: 14 | /** IModuleInterface implementation */ 15 | virtual void StartupModule() override; 16 | virtual void ShutdownModule() override; 17 | 18 | void RestartModule(); 19 | 20 | private: 21 | void OnAssetEditorOpened(UObject* Asset); 22 | 23 | TSharedPtr StructChangeHandler; 24 | 25 | FDelegateHandle VariableCustomizationHandle; 26 | FDelegateHandle LocalVariableCustomizationHandle; 27 | FDelegateHandle FunctionCustomizationHandle; 28 | FDelegateHandle TunnelCustomizationHandle; 29 | FDelegateHandle EventCustomizationHandle; 30 | }; 31 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/Epic/PushModelHelpers.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | ////////////////////////////////////////////////////////////////////////// 6 | // FKCPushModelHelpers 7 | 8 | struct FKCPushModelHelpers 9 | { 10 | /** 11 | * Generates nodes that will call the necessary functions for marking Push Model Properties dirty. 12 | * These nodes should be generated and linked whenever we know there's a replicated property that 13 | * is likely to have its value changed. 14 | * 15 | * @param Context Current compilcation context. 16 | * @param RepProperty The Replicated Property that's being reference. 17 | * @param PropertyObjectPin The pin we'll use to grab a reference to the Object that owns the property. 18 | */ 19 | static class UEdGraphNode* ConstructMarkDirtyNodeForProperty(struct FKismetFunctionContext& Context, class FProperty* RepProperty, class UEdGraphPin* PropertyObjectPin); 20 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Public/PersistenceShared.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "PersistenceShared.generated.h" 7 | 8 | // The different ways Actors may have been updated that need to be responded to 9 | UENUM( BlueprintType ) 10 | enum class EArchivedActorType : uint8 11 | { 12 | None, // default (unknown) 13 | Spawned, // Actor is newly created 14 | Updated, // Actor was modified 15 | Destroyed, // Actor was marked for destruction 16 | }; 17 | 18 | // Tracking data for the actor changes that occurred during the loading of an archive 19 | USTRUCT( BlueprintType ) 20 | struct FArchivedActor 21 | { 22 | GENERATED_BODY( ) 23 | public: 24 | // Way that the actor was affected by the serialization process 25 | UPROPERTY( BlueprintReadOnly ) 26 | EArchivedActorType Type = EArchivedActorType::None; 27 | 28 | // The actor that was modified by serialization 29 | UPROPERTY( BlueprintReadOnly ) 30 | TObjectPtr< AActor > Actor = nullptr; 31 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/Windows/SaveDataUtilities_Windows.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataUtilities.h" 3 | 4 | // Core 5 | #include "Misc/Paths.h" 6 | 7 | #include "Windows/AllowWindowsPlatformTypes.h" 8 | #include "Windows/WindowsHWrapper.h" 9 | 10 | TArray< FString > USaveDataUtilities::EnumerateSlotNames( int32 UserIndex ) 11 | { 12 | const auto SearchPath = FString::Printf( TEXT( "%sSaveGames/*%s" ), *FPaths::ProjectSavedDir( ), *SaveExtension ); 13 | 14 | WIN32_FIND_DATA FindData; 15 | const auto FindHandle = ::FindFirstFile( *SearchPath, &FindData ); 16 | 17 | if (FindHandle == INVALID_HANDLE_VALUE) 18 | return { }; 19 | 20 | TArray< FString > SlotNames; 21 | do 22 | { 23 | if ((FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) 24 | continue; 25 | 26 | SlotNames.Add_GetRef( FindData.cFileName ).RemoveFromEnd( SaveExtension ); 27 | 28 | } while (::FindNextFile( FindHandle, &FindData )); 29 | 30 | ::FindClose( FindHandle ); 31 | 32 | return SlotNames; 33 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessenger/Private/Messenger/MessengerProjectSettings.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Messenger/MessengerProjectSettings.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(MessengerProjectSettings) 5 | 6 | #define LOCTEXT_NAMESPACE "MessengerProjectSettings" 7 | 8 | FName UMessengerProjectSettings::GetContainerName( ) const 9 | { 10 | return FName( "Project" ); 11 | } 12 | 13 | FName UMessengerProjectSettings::GetCategoryName( ) const 14 | { 15 | return FName( "Game" ); 16 | } 17 | 18 | FName UMessengerProjectSettings::GetSectionName( ) const 19 | { 20 | return FName( "Starfire Messenger Settings" ); 21 | } 22 | 23 | #if WITH_EDITOR 24 | FText UMessengerProjectSettings::GetSectionText( ) const 25 | { 26 | return LOCTEXT( "SectionText", "Starfire Messenger Settings" ); 27 | } 28 | 29 | FText UMessengerProjectSettings::GetSectionDescription( ) const 30 | { 31 | return LOCTEXT( "SectionDescription", "Configuration options for the Starfire Messenger Plugin" ); 32 | } 33 | #endif 34 | 35 | #undef LOCTEXT_NAMESPACE -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Widgets/SMDMetaDataStringComboBox.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Widgets/SCompoundWidget.h" 6 | 7 | class SMDMetaDataStringComboBox : public SCompoundWidget 8 | { 9 | public: 10 | DECLARE_DELEGATE_TwoParams(FOnSetMetaData, const FName&, const FString& Value); 11 | 12 | SLATE_BEGIN_ARGS(SMDMetaDataStringComboBox) 13 | {} 14 | SLATE_ARGUMENT_DEFAULT(FName, Key) = NAME_None; 15 | SLATE_ARGUMENT(TArray, ValueList); 16 | SLATE_ATTRIBUTE(TOptional, MetaDataValue); 17 | SLATE_EVENT(FOnSetMetaData, OnSetMetaData); 18 | SLATE_END_ARGS() 19 | 20 | void Construct(const FArguments& InArgs); 21 | 22 | private: 23 | TSharedPtr GetCurrentValue() const; 24 | void OnSelected(TSharedPtr ValuePtr, ESelectInfo::Type SelectInfo); 25 | 26 | FName Key = NAME_None; 27 | TAttribute> MetaDataValue; 28 | FOnSetMetaData OnSetMetaData; 29 | 30 | TArray> ValueList; 31 | 32 | }; 33 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/DataDefinitions/DataDefinition.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef DATA_DEFINITION_HPP 4 | #error You shouldn't be including this file directly 5 | #endif 6 | 7 | #include "Templates/ArrayTypeUtilitiesSF.h" 8 | 9 | template< CExtensionType type_t > 10 | const type_t* UDataDefinition::FindExtensionByClass( void ) const 11 | { 12 | return CastChecked< type_t >( FindExtensionByClass( type_t::StaticClass( ) ), ECastCheckedType::NullAllowed ); 13 | } 14 | 15 | template< CExtensionType type_t > 16 | TArray< const type_t* > UDataDefinition::GetAllExtensionsByClass( void ) const 17 | { 18 | return ArrayDownCast< type_t >( GetAllExtensionsByClass( type_t::StaticClass( ) ) ); 19 | } 20 | 21 | template< CExtensionType type_t > 22 | void UDataDefinition::AppendAllExtensionsByClass( TArray< const type_t* > &OutExtensions, bool bIncludeDuplicates ) const 23 | { 24 | AppendAllExtensionsByClass( type_t::StaticClass( ), ArrayUpCast< UDataDefinitionExtension >( OutExtensions ), bIncludeDuplicates ); 25 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/DataDefinitions/DataDefinitionSource.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/Interface.h" 5 | 6 | #include "DataDefinitionSource.generated.h" 7 | 8 | class UDataDefinition; 9 | 10 | // Static class for interfaces meant to be implemented by objects that represent specific data definition instances 11 | UINTERFACE( BlueprintType ) 12 | class STARFIREASSETS_API UDataDefinitionSource : public UInterface 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | }; 17 | 18 | // Actual interface class to be implemented by objects that represent specific data definition instances 19 | class STARFIREASSETS_API IDataDefinitionSource 20 | { 21 | GENERATED_BODY( ) 22 | public: 23 | // Hook for getting the definition most strongly related to this object 24 | UFUNCTION( BlueprintNativeEvent ) 25 | [[nodiscard]] const UDataDefinition* GetSourceDefinition( ) const; 26 | [[nodiscard]] virtual const UDataDefinition* GetSourceDefinition_Implementation( ) const PURE_VIRTUAL( GetSourceDefinition_Implementation, return nullptr; ); 27 | }; 28 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Private/KismetNodes/K2Interface_SelectDelegate.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "KismetNodes/K2Interface_SelectDelegate.h" 3 | 4 | // BlueprintGraph 5 | #include "K2Node.h" 6 | 7 | // UnrealEd 8 | #include "Kismet2/BlueprintEditorUtils.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(K2Interface_SelectDelegate) 11 | 12 | void IK2Interface_SelectDelegate::HandleAnyChange( bool bForceModify ) 13 | { 14 | const auto NodeThis = CastChecked< UK2Node >( this ); 15 | 16 | if (HandleAnyChangeWithoutNotifying( ) || bForceModify) 17 | { 18 | if (const auto Graph = NodeThis->GetGraph( )) 19 | Graph->NotifyGraphChanged( ); 20 | 21 | UBlueprint *Blueprint = NodeThis->GetBlueprint( ); 22 | if (Blueprint && !Blueprint->bBeingCompiled) 23 | { 24 | FBlueprintEditorUtils::MarkBlueprintAsModified( Blueprint ); 25 | Blueprint->BroadcastChanged( ); 26 | } 27 | } 28 | else if (GetDelegateFunctionName( ) == NAME_None) 29 | { 30 | if (const auto Graph = NodeThis->GetGraph( )) 31 | Graph->NotifyGraphChanged( ); 32 | } 33 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorFunctionCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MDMetaDataEditorCustomizationBase.h" 6 | 7 | class UK2Node_EditablePinBase; 8 | class FMDMetaDataEditorFieldView; 9 | 10 | class FMDMetaDataEditorFunctionCustomization : public FMDMetaDataEditorCustomizationBase 11 | { 12 | public: 13 | static TSharedPtr MakeInstance(TSharedPtr BlueprintEditor); 14 | 15 | FMDMetaDataEditorFunctionCustomization(const TWeakPtr& BlueprintEditor, TWeakObjectPtr&& BlueprintPtr) 16 | : FMDMetaDataEditorCustomizationBase(BlueprintEditor, MoveTemp(BlueprintPtr)) 17 | { 18 | } 19 | 20 | virtual void CustomizeObject(IDetailLayoutBuilder& DetailLayout, UObject* Obj) override; 21 | 22 | private: 23 | void InitFieldViews(UObject* Obj); 24 | 25 | TSharedPtr FunctionFieldView; 26 | TArray> ParamFieldViews; 27 | }; 28 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/LatentAction_Polling.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Misc/LatentAction_Polling.h" 3 | 4 | bool FLatentAction_Polling::Create( const UObject* WorldContextObject, const FLatentActionInfo &LatentInfo, const CheckFinishDelegate &CheckFinished, const OnFinishDelegate &OnFinished ) 5 | { 6 | if (const auto NewAction = CreateAndAddAction< FLatentAction_Polling >( WorldContextObject, LatentInfo, CheckFinished )) 7 | { 8 | NewAction->OnFinished = OnFinished; 9 | return true; 10 | } 11 | 12 | return false; 13 | } 14 | 15 | FLatentAction_Polling::FLatentAction_Polling( const FLatentActionInfo &LatentInfo, const CheckFinishDelegate &CheckFinishCallback ) 16 | : FLatentAction_Simple( LatentInfo ), DoCheckFinish( CheckFinishCallback ) 17 | { 18 | } 19 | 20 | ELatentActionResponse FLatentAction_Polling::Update( void ) 21 | { 22 | if (!DoCheckFinish.IsBound( ) || DoCheckFinish.Execute( )) 23 | { 24 | OnFinished.ExecuteIfBound( ); 25 | return ELatentActionResponse::TriggerAndFinish; 26 | } 27 | 28 | return ELatentActionResponse::None; 29 | } -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/DataStoreUtilities.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DATA_STORE_UTILITIES_HPP 3 | #error You shouldn't be including this file directly 4 | #endif 5 | 6 | template < SFstd::derived_from< AActor > type_t > 7 | type_t* UDataStoreUtilities::GetVisualizerAs( const ADataStoreActor *DataStore ) 8 | { 9 | return CastChecked< type_t >( GetVisualizer( DataStore ), ECastCheckedType::NullAllowed ); 10 | } 11 | 12 | template < SFstd::derived_from< ADataStoreActor > type_t > 13 | type_t* UDataStoreUtilities::GetDataStoreActorAs( const AActor *Actor ) 14 | { 15 | return CastChecked< type_t >( GetDataStoreActor( Actor ), ECastCheckedType::NullAllowed ); 16 | } 17 | 18 | template < SFstd::derived_from< AActor > type_t > 19 | type_t* UDataStoreUtilities::SpawnVisualizerAs( ADataStoreActor *DataStore, const FTransform &Transform, FActorSpawnParameters SpawnParameters, const TSubclassOf< type_t > &VisualizerOverride ) 20 | { 21 | return CastChecked< type_t >( SpawnVisualizer( DataStore, Transform, SpawnParameters, VisualizerOverride ), ECastCheckedType::NullAllowed ); 22 | } 23 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Public/SaveGames/GameSaveDataHeader.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "SaveData/SaveDataHeader.h" 5 | #include "SaveGames/GameSaveDataUtilities.h" 6 | 7 | #include "GameSaveDataHeader.generated.h" 8 | 9 | // Game specific header information 10 | UCLASS( ) 11 | class SAVEDATAEXAMPLE_API UGameSaveHeader : public USaveDataHeader 12 | { 13 | GENERATED_BODY( ) 14 | public: 15 | // The type of save game this header is associated with 16 | UPROPERTY( VisibleAnywhere, BlueprintReadOnly, Category = "Save Game" ) 17 | ESaveDataType SaveType = ESaveDataType::User; 18 | 19 | // Mode specific descriptor for UI display 20 | UPROPERTY( VisibleAnywhere, BlueprintReadOnly, Category = "Save Game" ) 21 | FText Descriptor1; 22 | 23 | // Mode specific descriptor for UI display 24 | UPROPERTY( VisibleAnywhere, BlueprintReadOnly, Category = "Save Game" ) 25 | FText Descriptor2; 26 | 27 | // Core Save Header API 28 | uint32 GetVersion( void ) const override; 29 | bool IsCompatible( uint32 HeaderVersion ) const override; 30 | int32 GetFileTypeTag( void ) const override; 31 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Public/SaveGames/GameSaveData.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "SaveData/SaveData.h" 5 | 6 | #include "GameSaveData.generated.h" 7 | 8 | // Game specific save game information 9 | UCLASS( ) 10 | class SAVEDATAEXAMPLE_API UGameSaveData : public USaveData 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | // Core Save Header API 15 | [[nodiscard]] bool IsCompatible( uint32 InVersion ) const override; 16 | 17 | // Apply this save game to the game data 18 | bool ApplySaveData( const UObject *WorldContext ) const; 19 | 20 | // The map that was loaded at the time and should be loaded into when loading the save 21 | UPROPERTY( ) 22 | FSoftObjectPath MapPath; 23 | 24 | // Mode specific descriptor for UI display 25 | UPROPERTY( VisibleAnywhere, BlueprintReadOnly, Category = "Save Data" ) 26 | FText Descriptor1; 27 | 28 | // Mode specific descriptor for UI display 29 | UPROPERTY( VisibleAnywhere, BlueprintReadOnly, Category = "Save Data" ) 30 | FText Descriptor2; 31 | 32 | // Un-serialized flag tracking the (potentially async) completion 33 | bool bCreationComplete = false; 34 | }; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsDeveloper/StarfireAssetsDeveloper.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireAssetsDeveloper : ModuleRules 5 | { 6 | public StarfireAssetsDeveloper( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireAssets/Private", 13 | "StarfireAssetsDeveloper/Private" 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfireAssets", 28 | // ... add private dependencies that you statically link with here ... 29 | } ); 30 | 31 | DynamicallyLoadedModuleNames.AddRange( 32 | new string[ ] 33 | { 34 | // ... add any modules that your module loads dynamically here ... 35 | } ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/Module/StarfirePersistence.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfirePersistence.h" 3 | 4 | #include "Modules/ModuleInterface.h" 5 | 6 | DEFINE_LOG_CATEGORY( LogStarfirePersistence ) 7 | 8 | // UE module definition for runtime implementation of StarfirePersistence plugin 9 | class FStarfirePersistence : public IModuleInterface 10 | { 11 | public: 12 | 13 | /** IModuleInterface implementation */ 14 | void StartupModule( ) override; 15 | void ShutdownModule( ) override; 16 | }; 17 | 18 | #define LOCTEXT_NAMESPACE "StarfirePersistence" 19 | 20 | void FStarfirePersistence::StartupModule( ) 21 | { 22 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 23 | } 24 | 25 | void FStarfirePersistence::ShutdownModule( ) 26 | { 27 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 28 | // we call this function before unloading the module. 29 | } 30 | 31 | #undef LOCTEXT_NAMESPACE 32 | 33 | IMPLEMENT_MODULE( FStarfirePersistence, StarfirePersistence ) -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/BlueprintDevUtilities.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Misc/BlueprintDevUtilities.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BlueprintDevUtilities) 5 | 6 | void UBlueprintDevUtilities::Ensure( bool Condition, const FString &Message ) 7 | { 8 | if (Message.IsEmpty( )) 9 | ensureAlwaysMsgf( Condition, TEXT( "An ensure was triggered in a blueprint." ) ); 10 | else 11 | ensureAlwaysMsgf( Condition, TEXT( "%s" ), *Message ); 12 | } 13 | 14 | void UBlueprintDevUtilities::Check( bool Condition, const FString &Message ) 15 | { 16 | check( Condition ); 17 | } 18 | 19 | EBuildType UBlueprintDevUtilities::GetCurrentBuildType( ) 20 | { 21 | #if UE_BUILD_SHIPPING 22 | return EBuildType::Shipping; 23 | #elif UE_BUILD_TEST 24 | return EBuildType::Testing; 25 | #else 26 | return EBuildType::Development; 27 | #endif 28 | } 29 | 30 | void UBlueprintDevUtilities::SwitchOnBuildType( EBuildType &Exec ) 31 | { 32 | #if UE_BUILD_SHIPPING 33 | Exec = EBuildType::Shipping; 34 | #elif UE_BUILD_TEST 35 | Exec = EBuildType::Testing; 36 | #else 37 | Exec = EBuildType::Development; 38 | #endif 39 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/GameFeatures/StarfireGameFeaturePolicy.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GameFeatures/StarfireGameFeaturePolicy.h" 3 | 4 | #include "DataDefinitions/LibraryGameFeatureWatcher.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(StarfireGameFeaturePolicy) 7 | 8 | TArray< FPrimaryAssetId > UStarfire_GameFeaturesProjectPolicy::GetPreloadAssetListForGameFeature( const UGameFeatureData *GameFeatureToLoad, bool bIncludeLoadedAssets ) const 9 | { 10 | const auto Subsystem = GEngine->GetEngineSubsystem< UDefinitionLibrary_GameFeatureWatcher >( ); 11 | 12 | #if WITH_EDITOR 13 | // In the editor, new assets may have been added since the plugin was registered 14 | Subsystem->UpdateFeatureCache( GameFeatureToLoad ); 15 | #endif 16 | 17 | return Subsystem->GetFeatureAssetIDs( GameFeatureToLoad ); 18 | } 19 | 20 | // ReSharper disable once CppConstValueFunctionReturnType 21 | const TArray< FName > UStarfire_GameFeaturesProjectPolicy::GetPreloadBundleStateForGameFeature( ) const 22 | { 23 | TArray< FName > Bundles = { StarfireBundles::AlwaysLoaded, StarfireBundles::DebugAlwaysLoaded }; 24 | 25 | return Bundles; 26 | } -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataEditor/StarfireSaveDataEditor.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireSaveDataEditor : ModuleRules 5 | { 6 | public StarfireSaveDataEditor( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireSaveData/Private", 13 | "StarfireSaveDataEditor/Private", 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfireSaveData", 28 | // ... add private dependencies that you statically link with here ... 29 | } ); 30 | 31 | 32 | DynamicallyLoadedModuleNames.AddRange( 33 | new string[ ] 34 | { 35 | // ... add any modules that your module loads dynamically here ... 36 | } ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/DataStoreSingleton.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataStoreSingleton.h" 3 | 4 | #include "PersistentDataStore.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DataStoreSingleton) 7 | 8 | void ADataStoreSingleton::PostActorCreated( ) 9 | { 10 | Super::PostActorCreated( ); 11 | 12 | if (const auto Subsystem = UPersistentDataStore::GetSubsystem( this )) 13 | Subsystem->AddSingleton( this ); 14 | } 15 | 16 | void ADataStoreSingleton::EndPlay(const EEndPlayReason::Type EndPlayReason) 17 | { 18 | if ((EndPlayReason == EEndPlayReason::Destroyed) || (EndPlayReason == EEndPlayReason::RemovedFromWorld)) 19 | { 20 | if (const auto Subsystem = UPersistentDataStore::GetSubsystem( this )) 21 | Subsystem->RemoveSingleton( this ); 22 | } 23 | 24 | Super::EndPlay( EndPlayReason ); 25 | } 26 | 27 | #if WITH_EDITOR 28 | FString ADataStoreSingleton::GetCustomActorLabel_Implementation( ) const 29 | { 30 | return GetClass( )->GetDisplayNameText( ).ToString( ); 31 | } 32 | 33 | FString ADataStoreSingleton::GetCustomOutlinerFolder_Implementation( ) const 34 | { 35 | return "Singletons"; 36 | } 37 | #endif -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessenger/StarfireMessenger.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireMessenger : ModuleRules 5 | { 6 | public StarfireMessenger( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireMessenger/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | "CoreUObject", 20 | "DeveloperSettings", 21 | "Engine", 22 | "StarfireUtilities", 23 | // ... add other public dependencies that you statically link with here ... 24 | } ); 25 | 26 | PrivateDependencyModuleNames.AddRange( 27 | new string[ ] 28 | { 29 | "Core", 30 | // ... add private dependencies that you statically link with here ... 31 | } ); 32 | 33 | DynamicallyLoadedModuleNames.AddRange( 34 | new string[ ] 35 | { 36 | // ... add any modules that your module loads dynamically here ... 37 | } ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/StarfireSaveData.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireSaveData : ModuleRules 5 | { 6 | public StarfireSaveData( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireSaveData/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | // ... add other public dependencies that you statically link with here ... 20 | } ); 21 | 22 | PrivateDependencyModuleNames.AddRange( 23 | new string[ ] 24 | { 25 | "Core", 26 | "CoreUObject", 27 | "Engine", 28 | 29 | "StarfireAssets", 30 | "StarfireUtilities", 31 | // ... add private dependencies that you statically link with here ... 32 | } ); 33 | 34 | DynamicallyLoadedModuleNames.AddRange( 35 | new string[ ] 36 | { 37 | // ... add any modules that your module loads dynamically here ... 38 | } ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveDataDeveloper/StarfireSaveDataDeveloper.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireSaveDataDeveloper : ModuleRules 5 | { 6 | public StarfireSaveDataDeveloper( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireSaveData/Private", 13 | "StarfireSaveDataDeveloper/Private" 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfireSaveData", 28 | // ... add private dependencies that you statically link with here ... 29 | } ); 30 | 31 | DynamicallyLoadedModuleNames.AddRange( 32 | new string[ ] 33 | { 34 | // ... add any modules that your module loads dynamically here ... 35 | } ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/LatentAction_Simple.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef __LATENT_ACTION_SIMPLE_IMPLEMENTATION 4 | #error You shouldn't be including the latent action implementation directly 5 | #endif 6 | 7 | template< class type_t, class ... Args_t > 8 | type_t* FLatentAction_Simple::CreateAndAddAction( const UObject *WorldContextObject, const FLatentActionInfo &LatentInfo, Args_t&&... Args ) 9 | { 10 | if (!ensureAlways( WorldContextObject != nullptr )) 11 | return nullptr; 12 | 13 | const auto World = GEngine->GetWorldFromContextObjectChecked( WorldContextObject ); 14 | if (World == nullptr) 15 | return nullptr; 16 | 17 | auto &LatentActionManager = World->GetLatentActionManager( ); 18 | if (LatentActionManager.FindExistingAction< type_t >( LatentInfo.CallbackTarget, LatentInfo.UUID ) == nullptr) 19 | { 20 | type_t* NewAction = new type_t( LatentInfo, std::forward< Args_t >( Args ) ... ); 21 | 22 | LatentActionManager.AddNewAction( LatentInfo.CallbackTarget, LatentInfo.UUID, NewAction ); 23 | 24 | return NewAction; 25 | } 26 | 27 | return nullptr; 28 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Public/StarfirePersistenceSettings.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Engine/DeveloperSettings.h" 5 | 6 | #include "StarfirePersistenceSettings.generated.h" 7 | 8 | class UActorComponent; 9 | 10 | // Configuration settings for controlling the Starfire Persistence Plugin 11 | UCLASS( Config = "Game", DefaultConfig ) 12 | class UStarfirePersistenceSettings : public UDeveloperSettings 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // An allow list of the components that should be included in the persistent actor archiver 17 | UPROPERTY( EditDefaultsOnly, Config ) 18 | TArray< TSoftClassPtr< UActorComponent > > ComponentsToPersist; 19 | 20 | // Utility for checking if a certain type should be persisted in the archiver 21 | bool ShouldPersistType( const UClass *ComponentType ) const; 22 | 23 | // Developer Settings API 24 | FName GetContainerName( ) const override; 25 | FName GetCategoryName( ) const override; 26 | FName GetSectionName( ) const override; 27 | 28 | #if WITH_EDITOR 29 | FText GetSectionText( ) const override; 30 | FText GetSectionDescription( ) const override; 31 | #endif 32 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceEditor/StarfirePersistenceEditor.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfirePersistenceEditor : ModuleRules 5 | { 6 | public StarfirePersistenceEditor( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfirePersistence/Private", 13 | "StarfirePersistenceEditor/Private", 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfirePersistence", 28 | // ... add private dependencies that you statically link with here ... 29 | } ); 30 | 31 | 32 | DynamicallyLoadedModuleNames.AddRange( 33 | new string[ ] 34 | { 35 | // ... add any modules that your module loads dynamically here ... 36 | } ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /StarfireAssets/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfireMessenger/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/ArchiveUtilities.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | class UPersistenceManager; 5 | 6 | namespace ArchiveUtilities 7 | { 8 | constexpr int32 MaxRecursionDepth = 100; 9 | 10 | // Serializes a soft object path. When saving the PIE prefix will be removed if necessary. Use when saving in-game objects that may be loaded in a non-PIE game. 11 | FArchive& SerializeSoftObjectPathWithoutPIEPrefix( FArchive &Ar, FSoftObjectPath& SoftPath ); 12 | 13 | // Serializes an object pointer. Serializes PersistentObjects by GUID. Serializes all other objects as a soft object path. 14 | FArchive& SerializeObjectPointer( FArchive &Ar, UObject* &Obj, const UPersistenceManager *Manager = nullptr, bool bLoadIfFindFails = false ); 15 | 16 | // Utility for finding a component on an Actor by name - how is this not built in to Actor? 17 | [[nodiscard]] UActorComponent* FindComponentByName( const AActor *Actor, const FName &Name ); 18 | 19 | // Utility for finding an object with a specific name from a collection of objects 20 | [[nodiscard]] UObject* FindObjectByName( const TArray< UObject* > &Objects, const FName &Name ); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/StarfirePersistence.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfirePersistence : ModuleRules 5 | { 6 | public StarfirePersistence( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfirePersistence/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | "DeveloperSettings", 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "CoreUObject", 28 | "Engine", 29 | 30 | "StarfireUtilities", 31 | // ... add private dependencies that you statically link with here ... 32 | } ); 33 | 34 | DynamicallyLoadedModuleNames.AddRange( 35 | new string[ ] 36 | { 37 | // ... add any modules that your module loads dynamically here ... 38 | } ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /StarfireSaveData/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfireUtilities/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/Epic/StructMemberNodeHandlers_Copy.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "KismetCompilerMisc.h" 6 | #include "VariableSetHandler_Copy.h" 7 | 8 | class FKismetCompilerContext; 9 | class UEdGraphNode; 10 | class UEdGraphPin; 11 | struct FKismetFunctionContext; 12 | 13 | class FKCHandler_StructMemberVariableGet : public FNodeHandlingFunctor 14 | { 15 | public: 16 | FKCHandler_StructMemberVariableGet(FKismetCompilerContext& InCompilerContext) 17 | : FNodeHandlingFunctor(InCompilerContext) 18 | { 19 | } 20 | 21 | virtual void RegisterNet(FKismetFunctionContext& Context, UEdGraphPin* Net) override; 22 | virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* InNode) override; 23 | }; 24 | 25 | class FKCHandler_StructMemberVariableSet : public FKCHandler_VariableSet 26 | { 27 | public: 28 | FKCHandler_StructMemberVariableSet(FKismetCompilerContext& InCompilerContext) 29 | : FKCHandler_VariableSet(InCompilerContext) 30 | { 31 | } 32 | 33 | virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* InNode) override; 34 | }; 35 | -------------------------------------------------------------------------------- /StarfirePersistence/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Russell Aasland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/VisualizerValidator.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Subsystems/EngineSubsystem.h" 5 | 6 | #include "VisualizerValidator.generated.h" 7 | 8 | class FDataValidationContext; 9 | 10 | // System to aid in the validation of visualizer class settings of Data Store Actor classes 11 | // Subsystem handles native types and provides utilities for blueprints to check as part of their 12 | // IsValid override 13 | UCLASS( ) 14 | class UVisualizerValidator : public UEngineSubsystem 15 | { 16 | GENERATED_BODY( ) 17 | public: 18 | // Subsystem API 19 | bool ShouldCreateSubsystem( UObject *Outer ) const override; 20 | void Initialize( FSubsystemCollectionBase &Collection ) override; 21 | 22 | // Utility for checking the configuration state of a specific data store class 23 | static bool CheckIsValidVisualizerConfig( UClass *DataStoreClass, FDataValidationContext &Context ); 24 | 25 | // Utility for checking the parent child relationship of two classes, without needing to load either class. 26 | static bool SoftIsChildOf( const TSoftClassPtr< AActor > &ChildClassPtr, const TSoftClassPtr< AActor > &ParentClassPtr ); 27 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Public/PersistentSubsystemInterface.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/Interface.h" 5 | 6 | #include "PersistentSubsystemInterface.generated.h" 7 | 8 | struct FArchivedActor; 9 | 10 | // Static type identifying subsystems that are persisted through PersistentActorArchiver 11 | UINTERFACE( MinimalAPI, meta = (CannotImplementInterfaceInBlueprint) ) 12 | class UPersistentSubsystem : public UInterface 13 | { 14 | GENERATED_BODY() 15 | }; 16 | 17 | // Interface identifying subsystems that are persisted through PersistentActorArchiver 18 | class STARFIREPERSISTENCE_API IPersistentSubsystem 19 | { 20 | GENERATED_BODY( ) 21 | public: 22 | // Hook for the subsystem to do work prior to the serializing to an archive 23 | virtual void PreSerialize( void ) { } 24 | 25 | // Hook for the subsystem to do work after serialization from an archive 26 | virtual void PostDeserialize( void ) { } 27 | 28 | // Hook for the subsystem to respond to the completion of the loading process (somewhat analogous to BeginPlay or OnRegisterComponent) 29 | virtual void PostArchiveLoad( const TArray< FArchivedActor >& ActorChanges ) { } 30 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistenceDeveloper/StarfirePersistenceDeveloper.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfirePersistenceDeveloper : ModuleRules 5 | { 6 | public StarfirePersistenceDeveloper( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfirePersistence/Private", 13 | "StarfirePersistenceDeveloper/Private" 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfirePersistence", 28 | // ... add private dependencies that you statically link with here ... 29 | } ); 30 | 31 | DynamicallyLoadedModuleNames.AddRange( 32 | new string[ ] 33 | { 34 | // ... add any modules that your module loads dynamically here ... 35 | } ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/StarfireUtilities.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireUtilities : ModuleRules 5 | { 6 | public StarfireUtilities( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireUtilities/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | "Engine", 20 | "GameplayTags", 21 | // ... add other public dependencies that you statically link with here ... 22 | } ); 23 | 24 | PrivateDependencyModuleNames.AddRange( 25 | new string[ ] 26 | { 27 | "Core", 28 | "CoreUObject", 29 | "DeveloperSettings", 30 | "Projects", 31 | "UMG", 32 | // ... add private dependencies that you statically link with here ... 33 | } ); 34 | 35 | DynamicallyLoadedModuleNames.AddRange( 36 | new string[ ] 37 | { 38 | // ... add any modules that your module loads dynamically here ... 39 | } ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/StarfireDataActors.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireDataActors : ModuleRules 5 | { 6 | public StarfireDataActors( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireDataActors/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | "Engine", 20 | "DeveloperSettings", 21 | "StarfirePersistence", 22 | "StarfireUtilities", 23 | // ... add other public dependencies that you statically link with here ... 24 | } ); 25 | 26 | PrivateDependencyModuleNames.AddRange( 27 | new string[ ] 28 | { 29 | "Core", 30 | "CoreUObject", 31 | // ... add private dependencies that you statically link with here ... 32 | } ); 33 | 34 | DynamicallyLoadedModuleNames.AddRange( 35 | new string[ ] 36 | { 37 | // ... add any modules that your module loads dynamically here ... 38 | } ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/GameFeatures/StarfireGameFeaturePolicy.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "GameFeaturesProjectPolicies.h" 5 | 6 | #include "StarfireGameFeaturePolicy.generated.h" 7 | 8 | // Some basic bundles that can easily be applied by default 9 | namespace StarfireBundles 10 | { 11 | // A bundle that is loaded for as long as the asset is while the game is running 12 | static const FName AlwaysLoaded( "AlwaysLoaded" ); 13 | // Similar to AlwaysLoaded, but intended to be temporary with properties being shifted to other bundles prior to ship 14 | static const FName DebugAlwaysLoaded( "DebugAlwaysLoaded" ); 15 | } 16 | 17 | // A game features policy that will cause the data definitions to load when the feature does 18 | UCLASS( ) 19 | class STARFIREASSETS_API UStarfire_GameFeaturesProjectPolicy : public UDefaultGameFeaturesProjectPolicies 20 | { 21 | GENERATED_BODY( ) 22 | public: 23 | // Game Feature Project Policy API 24 | TArray< FPrimaryAssetId > GetPreloadAssetListForGameFeature( const UGameFeatureData* GameFeatureToLoad, bool bIncludeLoadedAssets = false ) const override; 25 | const TArray< FName > GetPreloadBundleStateForGameFeature( ) const override; 26 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/SaveDataHeader.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveDataHeader.h" 3 | 4 | #include "SaveData/SaveData.h" 5 | 6 | // Core 7 | #include "Misc/DateTime.h" 8 | #include "Misc/EngineVersion.h" 9 | #include "Internationalization/Internationalization.h" 10 | #include "Internationalization/Culture.h" 11 | 12 | #include UE_INLINE_GENERATED_CPP_BY_NAME(SaveDataHeader) 13 | 14 | void USaveDataHeader::FillCoreData( const USaveData *SaveData, const FString &InDisplayName ) 15 | { 16 | TimeStamp = FDateTime::Now( ); 17 | 18 | const auto VersionInfo = FEngineVersion::Current( ); 19 | Changelist = VersionInfo.GetChangelist( ); 20 | BuildVersion = VersionInfo.ToString( ); 21 | 22 | ContentFeatures = SaveData->ContentFeatures; 23 | 24 | DisplayName = InDisplayName; 25 | 26 | Language = FInternationalization::Get( ).GetCurrentLanguage( )->GetName( ); 27 | } 28 | 29 | int32 USaveDataHeader::GetFileTypeTag( ) const 30 | { 31 | unimplemented( ); 32 | // ReSharper disable once CppMultiCharacterLiteral 33 | return 'UNKN'; 34 | } 35 | 36 | ESaveDataCompressionType USaveDataHeader::GetCompressionType( ) const 37 | { 38 | return ESaveDataCompressionType::ZLib; 39 | } -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/DataDefinitions/DefinitionExtension.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Engine/DataAsset.h" 5 | #include "AssetValidation/VerifiableContent.h" 6 | 7 | #include "DefinitionExtension.generated.h" 8 | 9 | class UDataDefinition; 10 | 11 | // Base type for feature based extensions to primary assets 12 | UCLASS( Abstract, Blueprintable ) 13 | class STARFIREASSETS_API UDataDefinitionExtension : public UPrimaryDataAsset, public IVerifiableAsset 14 | { 15 | GENERATED_BODY( ) 16 | public: 17 | // Object API 18 | FPrimaryAssetId GetPrimaryAssetId( ) const override; 19 | 20 | // The set of assets that this extension should affect while it's active 21 | UPROPERTY( EditDefaultsOnly, Category = "Data Definition Extension", meta = (DisplayThumbnail = false) ) 22 | TArray< TSoftObjectPtr< const UDataDefinition > > AssetsToExtend; 23 | 24 | private: 25 | #if WITH_EDITORONLY_DATA 26 | friend class UDataDefinitionExtension_AssetDefinition; 27 | TSharedPtr< FSlateBrush > IconBrush; 28 | 29 | // Function called by the asset definition for optionally showing an icon in the content browser 30 | [[nodiscard]] virtual const UTexture2D* GetThumbnail( ) const { return nullptr; } 31 | #endif 32 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerEditor/StarfireMessengerEditor.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireMessengerEditor : ModuleRules 5 | { 6 | public StarfireMessengerEditor( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireMessenger/Private", 13 | "StarfireMessengerEditor/Private", 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | // ... add other public dependencies that you statically link with here ... 21 | } ); 22 | 23 | PrivateDependencyModuleNames.AddRange( 24 | new string[ ] 25 | { 26 | "Core", 27 | "StarfireUtilities", 28 | "StarfireUtilitiesEditor", 29 | "StarfireMessenger", 30 | "MDMetaDataEditor", 31 | // ... add private dependencies that you statically link with here ... 32 | } ); 33 | 34 | 35 | DynamicallyLoadedModuleNames.AddRange( 36 | new string[ ] 37 | { 38 | // ... add any modules that your module loads dynamically here ... 39 | } ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsEditor/StarfireAssetsEditor.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireAssetsEditor : ModuleRules 5 | { 6 | public StarfireAssetsEditor( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireAssets/Private", 13 | "StarfireAssetsEditor/Private", 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | "AssetDefinition", 21 | "CoreUObject" 22 | // ... add other public dependencies that you statically link with here ... 23 | } ); 24 | 25 | PrivateDependencyModuleNames.AddRange( 26 | new string[ ] 27 | { 28 | "Core", 29 | "UnrealEd", 30 | "Engine", 31 | "SlateCore", 32 | 33 | "StarfireAssets", 34 | // ... add private dependencies that you statically link with here ... 35 | } ); 36 | 37 | 38 | DynamicallyLoadedModuleNames.AddRange( 39 | new string[ ] 40 | { 41 | // ... add any modules that your module loads dynamically here ... 42 | } ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /StarfireUtilities/StarfireUtilities.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "5.7.0", 5 | "FriendlyName": "Starfire Utilities", 6 | "Description": "Grab-bag of utilities useful to any project", 7 | "Category": "Other", 8 | "CreatedBy": "Russell Aasland", 9 | "CreatedByURL": "https://github.com/MagForceSeven/Starfire/tree/main/StarfireUtilities", 10 | "DocsURL": "https://github.com/MagForceSeven/Starfire/blob/main/StarfireUtilities/README.md", 11 | "MarketplaceURL": "", 12 | "SupportURL": "https://github.com/MagForceSeven/Starfire", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": false, 17 | "EditorCustomVirtualPath": "Starfire", 18 | "SupportedTargetPlatforms": [ 19 | "Win64", 20 | "Linux", 21 | "LinuxArm64" 22 | ], 23 | "Modules": [ 24 | { 25 | "Name": "StarfireUtilities", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "StarfireUtilitiesDeveloper", 31 | "Type": "UncookedOnly", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "StarfireUtilitiesEditor", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | } 39 | ], 40 | "Plugins": [ 41 | ] 42 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Public/K2Node_StartListeningForMessage_Immediate.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "K2Node_StartListeningForMessage.h" 5 | 6 | #include "K2Node_StartListeningForMessage_Immediate.generated.h" 7 | 8 | // Implementation of the Listening node for listening to immediate messages 9 | UCLASS( ) 10 | class STARFIREMESSENGERDEVELOPER_API UK2Node_StartListeningForMessage_Immediate : public UK2Node_StartListeningForMessage 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | UK2Node_StartListeningForMessage_Immediate( ); 15 | 16 | // Ed Graph Node API 17 | void AllocateDefaultPins( ) override; 18 | FText GetNodeTitle( ENodeTitleType::Type TitleType ) const override; 19 | 20 | // K2 Node API 21 | void ExpandNode( FKismetCompilerContext &CompilerContext, UEdGraph *SourceGraph ) override; 22 | 23 | // The execution pin triggered when the message occurs 24 | [[nodiscard]] UEdGraphPin* GetMessageExecPin( ) const; 25 | 26 | protected: 27 | // Pin Names 28 | static const FName MessageExecPinName; 29 | 30 | // Message Node Base 31 | [[nodiscard]] bool IsMessageVarPin( UEdGraphPin *Pin ) const override; 32 | [[nodiscard]] bool CheckForErrors( const FKismetCompilerContext &CompilerContext ) override; 33 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditorGraph/Private/MDMetaDataEditorGraph.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #include "BlueprintCompilationManager.h" 4 | #include "Extensions/MDMetaDataEditorBlueprintCompilerExtension.h" 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FMDMetaDataEditorGraphModule : public IModuleInterface 9 | { 10 | public: 11 | virtual void StartupModule() override 12 | { 13 | CompilerExtensionPtr = NewObject(); 14 | CompilerExtensionPtr->AddToRoot(); 15 | 16 | FBlueprintCompilationManager::RegisterCompilerExtension(UBlueprint::StaticClass(), CompilerExtensionPtr.Get()); 17 | } 18 | 19 | virtual void ShutdownModule() override 20 | { 21 | if (UMDMetaDataEditorBlueprintCompilerExtension* CompilerExtension = CompilerExtensionPtr.Get()) 22 | { 23 | CompilerExtension->RemoveFromRoot(); 24 | CompilerExtension = nullptr; 25 | } 26 | } 27 | 28 | private: 29 | // Use a weak ptr even though we add it to root, it can be destroyed before the module shuts down 30 | TWeakObjectPtr CompilerExtensionPtr = nullptr; 31 | }; 32 | 33 | IMPLEMENT_MODULE(FMDMetaDataEditorGraphModule, MDMetaDataEditorGraph) -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/SaveDataExample.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class SaveDataExample : ModuleRules 5 | { 6 | public SaveDataExample(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[] { 12 | "SaveDataExample/Private", 13 | // ... add other private include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PublicDependencyModuleNames.AddRange( 19 | new string[] 20 | { 21 | "StarfireSaveData", 22 | "StarfireUtilities", 23 | "DeveloperSettings", 24 | // ... add other public dependencies that you statically link with here ... 25 | } 26 | ); 27 | 28 | 29 | PrivateDependencyModuleNames.AddRange( 30 | new string[] 31 | { 32 | "Core", 33 | "CoreUObject", 34 | "Engine", 35 | 36 | "StarfireAssets", 37 | // ... add private dependencies that you statically link with here ... 38 | } 39 | ); 40 | 41 | 42 | DynamicallyLoadedModuleNames.AddRange( 43 | new string[] 44 | { 45 | // ... add any modules that your module loads dynamically here ... 46 | } 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorStructChangeHandler.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Kismet2/StructureEditorUtils.h" 6 | #include "UObject/ObjectKey.h" 7 | 8 | struct FMDMetaDataEditorCachedStructMetadata 9 | { 10 | int32 Count = 0; 11 | TMap StructMetadata; 12 | TMap> PropertyMetadata; 13 | }; 14 | 15 | // Structs recreate their properties when compiled (just like classes) so this object will cache the metadata before compiling and 16 | // then restore the metadata afterward (similarly to UMDMetaDataEditorBlueprintCompilerExtension for function metadata) 17 | class FMDMetaDataEditorStructChangeHandler : public FStructureEditorUtils::INotifyOnStructChanged, public TSharedFromThis 18 | { 19 | public: 20 | virtual void PreChange(const UUserDefinedStruct* Struct, FStructureEditorUtils::EStructureEditorChangeInfo Info) override; 21 | virtual void PostChange(const UUserDefinedStruct* Struct, FStructureEditorUtils::EStructureEditorChangeInfo Info) override; 22 | 23 | TMap, FMDMetaDataEditorCachedStructMetadata> CachedStructMetadata; 24 | }; 25 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesEditor/StarfireUtilitiesEditor.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireUtilitiesEditor : ModuleRules 5 | { 6 | public StarfireUtilitiesEditor( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireUtilities/Private", 13 | "StarfireUtilitiesEditor/Private", 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | "Engine", 21 | "EditorSubsystem" 22 | // ... add other public dependencies that you statically link with here ... 23 | } ); 24 | 25 | PrivateDependencyModuleNames.AddRange( 26 | new string[ ] 27 | { 28 | "Core", 29 | "CoreUObject", 30 | "UnrealEd", 31 | "BlueprintGraph", 32 | "StarfireUtilities", 33 | // ... add private dependencies that you statically link with here ... 34 | } ); 35 | 36 | 37 | DynamicallyLoadedModuleNames.AddRange( 38 | new string[ ] 39 | { 40 | // ... add any modules that your module loads dynamically here ... 41 | } ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorStructCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MDMetaDataEditorCustomizationBase.h" 6 | 7 | class FMDMetaDataEditorFieldView; 8 | class UUserDefinedStruct; 9 | class FMDUserStructMetaDataEditorView; 10 | class FStructOnScope; 11 | 12 | class FMDMetaDataEditorStructCustomization : public FMDMetaDataEditorCustomizationBase 13 | { 14 | public: 15 | static TSharedRef MakeInstance(TWeakPtr InStructMetaDataView) 16 | { 17 | return MakeShared(InStructMetaDataView); 18 | } 19 | 20 | FMDMetaDataEditorStructCustomization(TWeakPtr InStructMetaDataView); 21 | 22 | virtual void CustomizeObject(IDetailLayoutBuilder& DetailLayout, UObject* Obj) override; 23 | 24 | virtual void RefreshDetails() override; 25 | 26 | private: 27 | TSharedPtr StructFieldView; 28 | TArray> PropertyFieldViews; 29 | 30 | TWeakPtr StructMetaDataViewPtr; 31 | TWeakObjectPtr UserDefinedStructPtr; 32 | }; 33 | -------------------------------------------------------------------------------- /StarfirePersistence/StarfirePersistence.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "5.7.0", 5 | "FriendlyName": "Starfire Persistence", 6 | "Description": "Tools for persisting actor data across levels or sessions", 7 | "Category": "Other", 8 | "CreatedBy": "Russell Aasland", 9 | "CreatedByURL": "", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": false, 17 | "EditorCustomVirtualPath": "Starfire", 18 | "SupportedTargetPlatforms": [ 19 | "Win64", 20 | "Linux", 21 | "LinuxArm64" 22 | ], 23 | "Modules": [ 24 | { 25 | "Name": "StarfirePersistence", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "StarfireDataActors", 31 | "Type": "Runtime", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "StarfirePersistenceDeveloper", 36 | "Type": "UncookedOnly", 37 | "LoadingPhase": "Default" 38 | }, 39 | { 40 | "Name": "StarfirePersistenceEditor", 41 | "Type": "Editor", 42 | "LoadingPhase": "Default" 43 | } 44 | ], 45 | "Plugins": [ 46 | { 47 | "Name": "StarfireUtilities", 48 | "Enabled": true 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/DevSettingsPreloader.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef DEV_SETTINGS_PRELOADER_HPP 4 | #error You shouldn't be including this file directly 5 | #endif 6 | 7 | template < CObjectType type_t > 8 | void IDevSettingsPreloader::Preload( const TSoftObjectPtr< type_t > &SoftPath ) 9 | { 10 | Preload( SoftPath.ToSoftObjectPath( ) ); 11 | } 12 | 13 | template < CObjectType type_t > 14 | void IDevSettingsPreloader::Preload( const TSoftClassPtr< type_t > &SoftPath ) 15 | { 16 | Preload( SoftPath.ToSoftObjectPath( ) ); 17 | } 18 | 19 | template < > 20 | STARFIREUTILITIES_API void IDevSettingsPreloader::Preload( const TArray< TSoftObjectPtr< UObject > > &SoftPaths ); 21 | template < > 22 | STARFIREUTILITIES_API void IDevSettingsPreloader::Preload( const TArray< TSoftClassPtr< UObject > > &SoftPaths ); 23 | 24 | template < CObjectType type_t > 25 | void IDevSettingsPreloader::Preload( const TArray< TSoftObjectPtr< type_t > > &SoftPaths ) 26 | { 27 | Preload( ArrayUpCast< UObject >( SoftPaths ) ); 28 | } 29 | 30 | template < CObjectType type_t > 31 | void IDevSettingsPreloader::Preload( const TArray< TSoftClassPtr< type_t > > &SoftPaths ) 32 | { 33 | Preload( ArrayUpCast< UObject >( SoftPaths ) ); 34 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Debug/RedscreenScreen.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Blueprint/UserWidget.h" 5 | 6 | #include "RedscreenScreen.generated.h" 7 | 8 | class UTextBlock; 9 | 10 | // Screen type that can be used to display redscreen warnings 11 | UCLASS( abstract, meta = (DisplayName = "Redscreen Presenter") ) 12 | class URedscreenScreen : public UUserWidget 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // Add a message to a 17 | UFUNCTION( BlueprintImplementableEvent ) 18 | void AddMessage( const FString &Message ); 19 | 20 | // Delegate type for the screen being closed 21 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnCloseEvent, URedscreenScreen*, Screen ); 22 | 23 | // Dispatcher for an OnClose event from this screen 24 | UPROPERTY( BlueprintAssignable, Category = "Redscreen" ) 25 | FOnCloseEvent OnClose; 26 | 27 | // Start the screen closing process 28 | UFUNCTION( BlueprintCallable, BlueprintNativeEvent, Category = "Redscreen" ) 29 | void CloseScreen( ); 30 | 31 | protected: 32 | // Create a text widget that can be added to the widget tree (because blueprint can't dynamically create non-user widgets ) 33 | UFUNCTION( BlueprintCallable, Category = "Redscreen", meta = (AutoCreateRefTerm = "Text") ) 34 | UTextBlock* CreateText( const FString &Text ) const; 35 | }; -------------------------------------------------------------------------------- /StarfireAssets/StarfireAssets.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "5.7.0", 5 | "FriendlyName": "Starfire Assets", 6 | "Description": "Shareable Tech for Asset Management", 7 | "Category": "Other", 8 | "CreatedBy": "Russell Aasland", 9 | "CreatedByURL": "https://github.com/MagForceSeven/Starfire/tree/main/StarfireAssets", 10 | "DocsURL": "https://github.com/MagForceSeven/Starfire/blob/main/StarfireAssets/README.md", 11 | "MarketplaceURL": "", 12 | "SupportURL": "https://github.com/MagForceSeven/Starfire", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": false, 17 | "EditorCustomVirtualPath": "Starfire", 18 | "SupportedTargetPlatforms": [ 19 | "Win64", 20 | "Linux", 21 | "LinuxArm64" 22 | ], 23 | "Modules": [ 24 | { 25 | "Name": "StarfireAssets", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "StarfireAssetsDeveloper", 31 | "Type": "UncookedOnly", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "StarfireAssetsEditor", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | } 39 | ], 40 | "Plugins": [ 41 | { 42 | "Name": "StarfireUtilities", 43 | "Enabled": true 44 | }, 45 | { 46 | "Name": "GameFeatures", 47 | "Enabled": true 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Public/K2Node_BroadcastMessage.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "K2Node_MessengerNodeBase.h" 5 | 6 | #include "K2Node_BroadcastMessage.generated.h" 7 | 8 | // Broadcast a message to any registered listeners 9 | UCLASS( ) 10 | class STARFIREMESSENGERDEVELOPER_API UK2Node_BroadcastMessage : public UK2Node_MessengerNodeBase 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | UK2Node_BroadcastMessage( ); 15 | 16 | // EdGraphNode API 17 | [[nodiscard]] FText GetNodeTitle( ENodeTitleType::Type TitleType ) const override; 18 | [[nodiscard]] FText GetTooltipText( ) const override; 19 | void GetMenuActions( FBlueprintActionDatabaseRegistrar &ActionRegistrar ) const override; 20 | [[nodiscard]] FSlateIcon GetIconAndTint( FLinearColor& OutColor ) const override; 21 | 22 | // K2Node API 23 | void ExpandNode( FKismetCompilerContext &CompilerContext, UEdGraph *SourceGraph ) override; 24 | 25 | protected: 26 | // Messenger Node Base API 27 | void CreatePinsForType( UScriptStruct *InType, TArray< UEdGraphPin* > *OutTypePins ) override; 28 | [[nodiscard]] bool CheckForErrors( const FKismetCompilerContext &CompilerContext ) override; 29 | 30 | // copied from Epic's ConstructObjectFromClass node 31 | // Constructing FText strings can be costly, so we cache the node's title 32 | FNodeTextCache CachedNodeTitle; 33 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Private/KismetNodes/SGraphNodeK2BindDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "KismetNodes/SGraphNode_K2SelectDelegate.h" 5 | 6 | // The CoreCreateDelegate node allows user to select both an event dispatcher and the function that should be bound to it 7 | class SGraphNodeK2BindDelegate : public SGraphNode_K2SelectDelegate 8 | { 9 | public: 10 | //SLATE_BEGIN_ARGS( SGraphNodeK2BindDelegate ) { } 11 | //SLATE_END_ARGS( ) 12 | 13 | ~SGraphNodeK2BindDelegate( ) override; 14 | // ReSharper disable once CppHidingFunction 15 | void Construct( const FArguments &InArgs, UK2Node *InNode ) { SGraphNode_K2SelectDelegate::Construct( InArgs, InNode ); } 16 | void CreateBelowPinControls( TSharedPtr< SVerticalBox > MainBox ) override; 17 | 18 | protected: 19 | // Determine the description for the currently selected delegate 20 | FText GetCurrentDelegateDescription( ) const; 21 | 22 | private: 23 | 24 | // Combo box for selecting the delegate to bind to 25 | TWeakPtr< SSearchableComboBox > DelegateBindOptionBox; 26 | // Possible delegate options that can be selected 27 | TArray< TSharedPtr< FString > > DelegateOptionList; 28 | 29 | // Callback for when the delegate selection has changed from the dropdown 30 | void OnDelegateSelected( TSharedPtr< FString > FunctionItemData, ESelectInfo::Type SelectInfo ); 31 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Misc/LatentAction_Polling.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Misc/LatentAction_Simple.h" 5 | 6 | // Utility for making a simple latent action that polls a delegate each from to check for completion 7 | class STARFIREUTILITIES_API FLatentAction_Polling : public FLatentAction_Simple 8 | { 9 | public: 10 | 11 | // Delegate signature for the polling check function. Returns true when action is complete 12 | DECLARE_DELEGATE_RetVal( bool, CheckFinishDelegate ); 13 | 14 | // Delegate signature for the action to execute on completion 15 | DECLARE_DELEGATE( OnFinishDelegate ); 16 | 17 | // Create and add a new FLatentAction_Polling to the FLatentActionManager. The action will complete when CheckFinished returns true. Then it will execute OnFinished 18 | static bool Create( const UObject* WorldContextObject, const FLatentActionInfo &LatentInfo, const CheckFinishDelegate &CheckFinished, const OnFinishDelegate &OnFinished = OnFinishDelegate( ) ); 19 | 20 | explicit FLatentAction_Polling( const FLatentActionInfo &LatentInfo, const CheckFinishDelegate &CheckFinishCallback ); 21 | ~FLatentAction_Polling( ) override = default; 22 | 23 | protected: 24 | ELatentActionResponse Update( void ) override; 25 | 26 | // Delegates for processing the polling update and execution 27 | CheckFinishDelegate DoCheckFinish; 28 | OnFinishDelegate OnFinished; 29 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/DataStoreActor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DataStoreActor.h" 3 | 4 | #include "PersistentDataStore.h" 5 | #if WITH_EDITOR 6 | #include "VisualizerValidator.h" 7 | #endif 8 | 9 | #include "StarfirePersistence/Public/PersistenceComponent.h" 10 | 11 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DataStoreActor) 12 | 13 | ADataStoreActor::ADataStoreActor( ) 14 | { 15 | PersistenceComponent = CreateDefaultSubobject< UPersistenceComponent >( "PersistenceComponent" ); 16 | } 17 | 18 | void ADataStoreActor::BeginPlay( ) 19 | { 20 | Super::BeginPlay( ); 21 | 22 | const auto DataStore = UPersistentDataStore::GetSubsystem( this ); 23 | DataStore->AddDataStoreActor( this, PersistenceComponent->GetGuid( ) ); 24 | } 25 | 26 | void ADataStoreActor::EndPlay( const EEndPlayReason::Type EndPlayReason ) 27 | { 28 | const auto DataStore = UPersistentDataStore::GetSubsystem( this ); 29 | DataStore->RemoveDataStoreActor( this, PersistenceComponent->GetGuid( ) ); 30 | 31 | Super::EndPlay( EndPlayReason ); 32 | } 33 | 34 | #if WITH_EDITOR 35 | EDataValidationResult ADataStoreActor::IsDataValid( class FDataValidationContext &Context ) const 36 | { 37 | auto Result = Super::IsDataValid( Context ); 38 | 39 | if (!UVisualizerValidator::CheckIsValidVisualizerConfig( GetClass( ), Context )) 40 | return EDataValidationResult::Invalid; 41 | 42 | return Result; 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Private/Module/StarfireUtilitiesDeveloper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireUtilitiesDeveloper.h" 3 | 4 | #include "UObject/CoreRedirects.h" 5 | 6 | #define LOCTEXT_NAMESPACE "StarfireUtilitiesDeveloper" 7 | 8 | void FStarfireUtilitiesDeveloper::StartupModule( ) 9 | { 10 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 11 | 12 | // Create redirectors for the map and set for-each nodes to start using the ones now available from Epic 13 | TArray NewRedirects; 14 | 15 | NewRedirects.Emplace(ECoreRedirectFlags::Type_Class, TEXT("/Script/StarfireUtilitiesDeveloper.K2Node_MapForEach"), TEXT("/Script/BlueprintGraph.K2Node_MapForEach")); 16 | NewRedirects.Emplace(ECoreRedirectFlags::Type_Class, TEXT("/Script/StarfireUtilitiesDeveloper.K2Node_SetForEach"), TEXT("/Script/BlueprintGraph.K2Node_SetForEach")); 17 | 18 | FCoreRedirects::AddRedirectList(NewRedirects, TEXT("StarfireUtilities")); 19 | } 20 | 21 | void FStarfireUtilitiesDeveloper::ShutdownModule( ) 22 | { 23 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 24 | // we call this function before unloading the module. 25 | } 26 | 27 | #undef LOCTEXT_NAMESPACE 28 | 29 | IMPLEMENT_MODULE( FStarfireUtilitiesDeveloper, StarfireUtilitiesDeveloper ) -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/StarfireAssets.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireAssets : ModuleRules 5 | { 6 | public StarfireAssets( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireAssets/Private", 13 | // ... add other private include paths required here ... 14 | } ); 15 | 16 | PublicDependencyModuleNames.AddRange( 17 | new string[ ] 18 | { 19 | "Engine", 20 | "GameFeatures", 21 | "GameplayTags", 22 | "DeveloperSettings", 23 | 24 | "StarfireUtilities", 25 | // ... add other public dependencies that you statically link with here ... 26 | } ); 27 | 28 | PrivateDependencyModuleNames.AddRange( 29 | new string[ ] 30 | { 31 | "Core", 32 | "CoreUObject", 33 | "Projects", 34 | // ... add private dependencies that you statically link with here ... 35 | } ); 36 | 37 | DynamicallyLoadedModuleNames.AddRange( 38 | new string[ ] 39 | { 40 | // ... add any modules that your module loads dynamically here ... 41 | } ); 42 | 43 | if (Target.bBuildEditor) 44 | { 45 | PrivateDependencyModuleNames.AddRange( 46 | new string[ ] 47 | { 48 | "BlueprintGraph", 49 | "KismetCompiler", 50 | "UnrealEd", 51 | }); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/StarfireUtilitiesDeveloper.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireUtilitiesDeveloper : ModuleRules 5 | { 6 | public StarfireUtilitiesDeveloper( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireUtilities/Private", 13 | "StarfireUtilitiesDeveloper/Private" 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | "Engine", 21 | "KismetCompiler", 22 | "SlateCore", 23 | "UnrealEd", 24 | // ... add other public dependencies that you statically link with here ... 25 | } ); 26 | 27 | PrivateDependencyModuleNames.AddRange( 28 | new string[ ] 29 | { 30 | "BlueprintGraph", 31 | "Core", 32 | "CoreUObject", 33 | "GraphEditor", 34 | "Kismet", 35 | "Slate", 36 | "ToolMenus", 37 | "ToolWidgets", 38 | "GameplayTags", 39 | 40 | "StarfireUtilities", 41 | // ... add private dependencies that you statically link with here ... 42 | } ); 43 | 44 | DynamicallyLoadedModuleNames.AddRange( 45 | new string[ ] 46 | { 47 | // ... add any modules that your module loads dynamically here ... 48 | } ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/Epic/MakeStructHandler_Copy.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "KismetCompilerMisc.h" 6 | 7 | class FKismetCompilerContext; 8 | class UEdGraphNode; 9 | class UK2Node_MakeStruct_COPY; 10 | class UEdGraphPin; 11 | struct FBPTerminal; 12 | struct FKismetFunctionContext; 13 | 14 | ////////////////////////////////////////////////////////////////////////// 15 | // FKCHandler_MakeStruct 16 | 17 | class FKCHandler_MakeStruct : public FNodeHandlingFunctor 18 | { 19 | public: 20 | FKCHandler_MakeStruct(FKismetCompilerContext& InCompilerContext); 21 | 22 | virtual UEdGraphPin* FindStructPinChecked(UEdGraphNode* Node) const; 23 | 24 | virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* InNode) override; 25 | virtual void RegisterNet(FKismetFunctionContext& Context, UEdGraphPin* Net) override; 26 | void RegisterNetsImpl(FKismetFunctionContext& Context, UK2Node_MakeStruct_COPY* Node); 27 | 28 | virtual FBPTerminal* RegisterLiteral(FKismetFunctionContext& Context, UEdGraphPin* Net) override; 29 | 30 | virtual void Compile(FKismetFunctionContext& Context, UEdGraphNode* InNode) override; 31 | 32 | protected: 33 | /** Prevents this handler from auto-generating a GoTo to jump to the end of the node's compiled code so that child handlers can override the functionality */ 34 | bool bAutoGenerateGotoForPure; 35 | }; 36 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Public/SaveGames/GameSaveDataSubsystem.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Subsystems/GameInstanceSubsystem.h" 5 | 6 | #include "GameSaveDataSubsystem.generated.h" 7 | 8 | class UGameSaveData; 9 | 10 | // A game instance subsystem for use by the save system for various application duration tracking needs 11 | UCLASS( ) 12 | class UGameSaveDataSubsystem : public UGameInstanceSubsystem 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // Subsystem Accessor Utilities 17 | [[nodiscard]] static UGameSaveDataSubsystem* Get( const UObject *WorldContext ); 18 | [[nodiscard]] static UGameSaveDataSubsystem* Get( const UGameInstance *GameInstance ); 19 | 20 | // The save data that should be used to populate game objects when the map is loaded 21 | UPROPERTY( ) 22 | TObjectPtr< const UGameSaveData > SaveGame = nullptr; 23 | 24 | // The slot name of the last save that was loaded 25 | FString LastSaveSlotName; 26 | }; 27 | 28 | // Configuration settings for project specific save data settings 29 | UCLASS( Config = "Game", DefaultConfig ) 30 | class UGameSaveDataSettings : public UDeveloperSettings 31 | { 32 | GENERATED_BODY( ) 33 | public: 34 | // Developer Settings API 35 | FName GetContainerName( ) const override; 36 | FName GetCategoryName( ) const override; 37 | FName GetSectionName( ) const override; 38 | 39 | #if WITH_EDITOR 40 | FText GetSectionText( ) const override; 41 | FText GetSectionDescription( ) const override; 42 | #endif 43 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfireDataActors/Private/PersistentDataStore.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PERSISTENT_DATA_STORE_HPP 3 | #error You shouldn't be including this file directly 4 | #endif 5 | 6 | template < SFstd::derived_from< ADataStoreSingleton > type_t > 7 | type_t* UPersistentDataStore::SpawnSingleton( bool bDeferredSpawning ) 8 | { 9 | return CastChecked< type_t >( SpawnSingleton( type_t::StaticClass( ), bDeferredSpawning ) ); 10 | } 11 | 12 | template < SFstd::derived_from< ADataStoreSingleton > type_t > 13 | type_t* UPersistentDataStore::SpawnSingleton( const UObject *WorldContext, bool bDeferredSpawning ) 14 | { 15 | return CastChecked< type_t >( SpawnSingleton( WorldContext, type_t::StaticClass( ), bDeferredSpawning ) ); 16 | } 17 | 18 | template < SFstd::derived_from< ADataStoreActor > type_t > 19 | type_t* UPersistentDataStore::GetDataStoreActor( const FGuid &ID ) const 20 | { 21 | return CastChecked< type_t >( GetDataStoreActor( type_t::StaticClass( ), ID ), ECastCheckedType::NullAllowed ); 22 | } 23 | 24 | template < SFstd::derived_from< ADataStoreSingleton > type_t > 25 | type_t* UPersistentDataStore::GetSingleton( void ) const 26 | { 27 | return CastChecked< type_t >( GetSingleton( type_t::StaticClass( ) ) ); 28 | } 29 | 30 | template < SFstd::derived_from< ADataStoreSingleton > type_t > 31 | type_t* UPersistentDataStore::GetSingleton( const UObject *WorldContext ) 32 | { 33 | return CastChecked< type_t >( GetDataStoreSingleton( WorldContext, type_t::StaticClass( ) ) ); 34 | } -------------------------------------------------------------------------------- /StarfireSaveData/StarfireSaveData.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "5.7.0", 5 | "FriendlyName": "Starfire Save Data", 6 | "Description": "Library for Save data and file management", 7 | "Category": "Other", 8 | "CreatedBy": "Russell Aasland", 9 | "CreatedByURL": "https://github.com/MagForceSeven/Starfire/tree/main/StarfireSaveData", 10 | "DocsURL": "https://github.com/MagForceSeven/Starfire/blob/main/StarfireSaveData/README.md", 11 | "MarketplaceURL": "", 12 | "SupportURL": "https://github.com/MagForceSeven/Starfire", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": false, 17 | "EditorCustomVirtualPath": "Starfire", 18 | "SupportedTargetPlatforms": [ 19 | "Win64", 20 | "Linux", 21 | "LinuxArm64" 22 | ], 23 | "Modules": [ 24 | { 25 | "Name": "StarfireSaveData", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "StarfireSaveDataDeveloper", 31 | "Type": "UncookedOnly", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "StarfireSaveDataEditor", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | }, 39 | { 40 | "Name": "SaveDataExample", 41 | "Type": "Runtime", 42 | "LoadingPhase": "None" 43 | } 44 | ], 45 | "Plugins": [ 46 | { 47 | "Name": "StarfireAssets", 48 | "Enabled": true 49 | }, 50 | { 51 | "Name": "StarfireUtilities", 52 | "Enabled": true 53 | } 54 | ] 55 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/Epic/VariableSetHandler_Copy.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "KismetCompilerMisc.h" 7 | 8 | class FKismetCompilerContext; 9 | class UEdGraphNode; 10 | class UEdGraphPin; 11 | struct FKismetFunctionContext; 12 | 13 | ////////////////////////////////////////////////////////////////////////// 14 | // FKCHandler_VariableSet 15 | 16 | class FKCHandler_VariableSet : public FNodeHandlingFunctor 17 | { 18 | public: 19 | FKCHandler_VariableSet(FKismetCompilerContext& InCompilerContext) 20 | : FNodeHandlingFunctor(InCompilerContext) 21 | { 22 | } 23 | 24 | virtual void RegisterNet(FKismetFunctionContext& Context, UEdGraphPin* Net) override; 25 | virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* Node) override; 26 | void InnerAssignment(FKismetFunctionContext& Context, UEdGraphNode* Node, UEdGraphPin* VariablePin, UEdGraphPin* ValuePin); 27 | void GenerateAssigments(FKismetFunctionContext& Context, UEdGraphNode* Node); 28 | virtual void Compile(FKismetFunctionContext& Context, UEdGraphNode* Node) override; 29 | virtual void Transform(FKismetFunctionContext& Context, UEdGraphNode* Node) override; 30 | 31 | protected: 32 | 33 | // Used for implicit casting. 34 | // Some nodes need to use the variable pin when performing a lookup in the implicit cast table. 35 | virtual bool UsesVariablePinAsKey() const { return false; } 36 | }; 37 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/StarfireMessengerDeveloper.Build.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnrealBuildTool; 3 | 4 | public class StarfireMessengerDeveloper : ModuleRules 5 | { 6 | public StarfireMessengerDeveloper( ReadOnlyTargetRules Target ) : base( Target ) 7 | { 8 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 9 | 10 | PrivateIncludePaths.AddRange( 11 | new string[ ] { 12 | "StarfireMessenger/Private", 13 | "StarfireMessengerDeveloper/Private" 14 | // ... add other private include paths required here ... 15 | } ); 16 | 17 | PublicDependencyModuleNames.AddRange( 18 | new string[ ] 19 | { 20 | "Engine", 21 | "StarfireUtilitiesDeveloper", 22 | // ... add other public dependencies that you statically link with here ... 23 | } ); 24 | 25 | PrivateDependencyModuleNames.AddRange( 26 | new string[ ] 27 | { 28 | "BlueprintGraph", 29 | "Core", 30 | "CoreUObject", 31 | "StarfireUtilities", 32 | "StarfireMessenger", 33 | "UnrealEd", 34 | "Kismet", 35 | "KismetCompiler", 36 | "PropertyEditor", 37 | "Slate", 38 | "SlateCore", 39 | "GraphEditor", 40 | "ToolMenus", 41 | "MDMetaDataEditorGraph", 42 | // ... add private dependencies that you statically link with here ... 43 | } ); 44 | 45 | DynamicallyLoadedModuleNames.AddRange( 46 | new string[ ] 47 | { 48 | // ... add any modules that your module loads dynamically here ... 49 | } ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Debug/Redscreen.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | // ReSharper disable once CppUnusedIncludeDirective 6 | #include "Templates/IsArrayOrRefOfType.h" 7 | 8 | class UObject; 9 | 10 | namespace Redscreens 11 | { 12 | STARFIREUTILITIES_API void Init( const UObject *WorldContext ); 13 | } 14 | 15 | STARFIREUTILITIES_API void RedscreenImpl( const UObject *WorldContext, bool bOnce, const char *File, int Line, const TCHAR *Fmt, ... ); 16 | 17 | #define Redscreen( WorldContext, Format, ... ) \ 18 | do { \ 19 | static_assert( TPointerIsConvertibleFromTo< TRemovePointer< decltype(WorldContext) >::Type, const UObject >::Value, "World Context must be a UObject type."); \ 20 | static_assert( TIsArrayOrRefOfType< decltype( Format ), TCHAR >::Value, "Formatting string must be a TCHAR array."); \ 21 | RedscreenImpl( WorldContext, false, __FILE__, __LINE__, Format, ##__VA_ARGS__ ); \ 22 | } while (false) 23 | 24 | #define RedscreenOnce( WorldContext, Format, ... ) \ 25 | do { \ 26 | static_assert( TPointerIsConvertibleFromTo< TRemovePointer< decltype(WorldContext) >::Type, const UObject >::Value, "World Context must be a UObject type."); \ 27 | static_assert( TIsArrayOrRefOfType< decltype( Format ), TCHAR >::Value, "Formatting string must be a TCHAR array."); \ 28 | RedscreenImpl( WorldContext, true, __FILE__, __LINE__, Format, ##__VA_ARGS__ ); \ 29 | } while (false) 30 | 31 | [[nodiscard]] STARFIREUTILITIES_API FString GetBlueprintCallerFunctionName( void ); -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesEditor/Public/DefaultEventsManager.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "EditorSubsystem.h" 5 | 6 | #include "DefaultEventsManager.generated.h" 7 | 8 | class IAssetEditorInstance; 9 | 10 | // Data for a class and the events that should have ghost nodes created for them when blueprints are made/opened 11 | struct FClassDefaultEvents 12 | { 13 | // The class type that should have ghost nodes created for it 14 | UClass *Type; 15 | // The events that we should make sure have ghost nodes created for them either on creation or on open 16 | TArray< FName > DefaultEvents; 17 | 18 | bool operator==( const UClass *Other ) const { return Type == Other; } 19 | }; 20 | 21 | // Editor subsystem for wrapping the DefaultEvent nodes behavior 22 | // Handles both the registration (which handles new blueprints) 23 | // and adding any that might have been added after the blueprint was created 24 | UCLASS( ) 25 | class STARFIREUTILITIESEDITOR_API UDefaultEventsManager : public UEditorSubsystem 26 | { 27 | GENERATED_BODY( ) 28 | public: 29 | // Subsystem API 30 | void Initialize( FSubsystemCollectionBase &Collection ) override; 31 | 32 | // Callback registered with the AssetEditorSubsystem to get informed about asset editing 33 | void OnEditorOpening( const TArray< UObject* > &Assets, IAssetEditorInstance *EditorInstance ); 34 | 35 | // Collection of classes and the events that should be pre-populated when they are created/opened 36 | static TArray< FClassDefaultEvents > UpdateClasses; 37 | }; -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Private/StarfirePersistenceSettings.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "StarfirePersistenceSettings.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(StarfirePersistenceSettings) 5 | 6 | #define LOCTEXT_NAMESPACE "GameSaveData_DeveloperSettings" 7 | 8 | bool UStarfirePersistenceSettings::ShouldPersistType( const UClass *ComponentType ) const 9 | { 10 | for (const auto &PersistType : ComponentsToPersist) 11 | { 12 | const auto ComponentClass = PersistType.Get( ); 13 | if (ComponentClass == nullptr) 14 | continue; // if the class isn't loaded, there can't be an instance of it anywhere, so it doesn't matter 15 | 16 | if (ComponentType->IsChildOf( ComponentClass )) 17 | return true; 18 | } 19 | 20 | return false; 21 | } 22 | 23 | FName UStarfirePersistenceSettings::GetContainerName( ) const 24 | { 25 | return FName( "Project" ); 26 | } 27 | 28 | FName UStarfirePersistenceSettings::GetCategoryName( ) const 29 | { 30 | return FName( "Game" ); 31 | } 32 | 33 | FName UStarfirePersistenceSettings::GetSectionName( ) const 34 | { 35 | return FName( "Starfire Persistence" ); 36 | } 37 | 38 | #if WITH_EDITOR 39 | FText UStarfirePersistenceSettings::GetSectionText( ) const 40 | { 41 | return LOCTEXT( "SectionText", "Starfire Persistence" ); 42 | } 43 | 44 | FText UStarfirePersistenceSettings::GetSectionDescription( ) const 45 | { 46 | return LOCTEXT( "SectionDescription", "Configuration settings for the Starfire Persistence plugin" ); 47 | } 48 | #endif 49 | 50 | #undef LOCTEXT_NAMESPACE -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Widgets/SMDMetaDataGameplayTagPicker.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "GameplayTagContainer.h" 6 | #include "Widgets/SCompoundWidget.h" 7 | 8 | /** 9 | * A custom gameplay tag picker that supports Unreal 5.1+ and works around engine bugs 10 | */ 11 | class SMDMetaDataGameplayTagPicker : public SCompoundWidget 12 | { 13 | public: 14 | DECLARE_DELEGATE_OneParam(FOnRemoveMetaData, const FName&); 15 | DECLARE_DELEGATE_TwoParams(FOnSetMetaData, const FName&, const FString& Value); 16 | 17 | SLATE_BEGIN_ARGS(SMDMetaDataGameplayTagPicker) 18 | {} 19 | SLATE_ARGUMENT_DEFAULT(bool, bMultiSelect) = false; 20 | SLATE_ARGUMENT_DEFAULT(FName, Key) = NAME_None; 21 | 22 | SLATE_ATTRIBUTE(TOptional, MetaDataValue); 23 | SLATE_EVENT(FOnRemoveMetaData, OnRemoveMetaData); 24 | SLATE_EVENT(FOnSetMetaData, OnSetMetaData); 25 | SLATE_END_ARGS() 26 | 27 | void Construct(const FArguments& InArgs); 28 | 29 | private: 30 | FText GetValue() const; 31 | FText GetValueToolTip() const; 32 | 33 | void UpdateMetaDataContainer(const TArray& Containers); 34 | 35 | void UpdateMetaDataTag(const FGameplayTag InTag); 36 | 37 | void UpdateMetaData(bool bDontUpdate); 38 | 39 | FName Key = NAME_None; 40 | bool bIsMulti = false; 41 | FGameplayTagContainer GameplayTagContainer; 42 | TAttribute> MetaDataValue; 43 | FOnRemoveMetaData OnRemoveMetaData; 44 | FOnSetMetaData OnSetMetaData; 45 | }; 46 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/AssetValidation/AssetChecks.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | class UObject; 5 | 6 | class FKismetCompilerContext; 7 | 8 | namespace AssetChecks 9 | { 10 | #define AC_Message( ... ) MessageImpl( __FILE__, __LINE__, __VA_ARGS__ ) 11 | 12 | // Simple asset check of a direct message 13 | STARFIREASSETS_API void MessageImpl( const char *File, int Line, const UObject *Asset, const FString &Message, const UObject *WorldContext, const FKismetCompilerContext *CompilerContext = nullptr ); 14 | 15 | // Asset check with additional object information that should be appended after the message 16 | STARFIREASSETS_API void MessageImpl( const char *File, int Line, const UObject *Asset, const FString &Message, const UObject *SecondaryReference, const UObject *WorldContext, const FKismetCompilerContext *CompilerContext = nullptr ); 17 | 18 | // Super-user version. Formatted string with "{}" specifiers. 19 | // Appropriate Objects or Object names from SecondaryReferences will be inserted into Message 20 | STARFIREASSETS_API void MessageImpl( const char *File, int Line, const UObject *Asset, const FString &Message, const TArray< const UObject* > &SecondaryReferences, const UObject *WorldContext, const FKismetCompilerContext *CompilerContext = nullptr ); 21 | 22 | // Temporarily change the MessageLog channel that check messages are written to 23 | struct STARFIREASSETS_API FScopedChecksChannel 24 | { 25 | explicit FScopedChecksChannel( const FString &OverrideChannel ); 26 | ~FScopedChecksChannel( ); 27 | }; 28 | } -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Private/SaveGames/GameSaveDataSubsystem.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveGames/GameSaveDataSubsystem.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(GameSaveDataSubsystem) 5 | 6 | UGameSaveDataSubsystem* UGameSaveDataSubsystem::Get( const UObject *WorldContext ) 7 | { 8 | if (!ensureAlways( WorldContext != nullptr )) 9 | return nullptr; 10 | 11 | const UWorld *World = GEngine->GetWorldFromContextObject( WorldContext, EGetWorldErrorMode::LogAndReturnNull ); 12 | if (!ensureAlways( World != nullptr )) 13 | return nullptr; 14 | 15 | return Get( World->GetGameInstance( ) ); 16 | } 17 | 18 | UGameSaveDataSubsystem* UGameSaveDataSubsystem::Get( const UGameInstance *GameInstance ) 19 | { 20 | return GameInstance->GetSubsystem< UGameSaveDataSubsystem >( ); 21 | } 22 | 23 | #define LOCTEXT_NAMESPACE "GameSaveData_DeveloperSettings" 24 | 25 | FName UGameSaveDataSettings::GetContainerName( ) const 26 | { 27 | return FName( "Project" ); 28 | } 29 | 30 | FName UGameSaveDataSettings::GetCategoryName( ) const 31 | { 32 | return FName( "Game" ); 33 | } 34 | 35 | FName UGameSaveDataSettings::GetSectionName( ) const 36 | { 37 | return FName( "Game Save Data Settings" ); 38 | } 39 | 40 | #if WITH_EDITOR 41 | FText UGameSaveDataSettings::GetSectionText( ) const 42 | { 43 | return LOCTEXT( "SectionText", "Game Save Data Settings" ); 44 | } 45 | 46 | FText UGameSaveDataSettings::GetSectionDescription( ) const 47 | { 48 | return LOCTEXT( "SectionDescription", "Configuration options regarding Game Save Data" ); 49 | } 50 | #endif 51 | 52 | #undef LOCTEXT_NAMESPACE -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Public/KismetNodes/K2Interface_SelectDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/Interface.h" 5 | 6 | #include "K2Interface_SelectDelegate.generated.h" 7 | 8 | // Static class for interface required to be compatible with the K2SelectDelegate graph node 9 | UINTERFACE( meta = (CannotImplementInterfaceInBlueprint) ) 10 | class STARFIREUTILITIESDEVELOPER_API UK2Interface_SelectDelegate : public UInterface 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | }; 15 | 16 | // Interface required to be compatible with the K2SelectDelegate graph node 17 | class STARFIREUTILITIESDEVELOPER_API IK2Interface_SelectDelegate 18 | { 19 | GENERATED_BODY( ) 20 | public: 21 | // Set new Function name (Without notifying about the change) 22 | virtual void SetDelegateFunction( FName Name ) = 0; 23 | 24 | // Get the name of the function that is currently bound to this event 25 | [[nodiscard]] virtual FName GetDelegateFunctionName( void ) const = 0; 26 | 27 | // Get the class that contains the possible functions to choose from 28 | [[nodiscard]] virtual UClass* GetScopeClass( bool bDontUseSkeletalClassForSelf = false ) const = 0; 29 | 30 | // Get the function object that defines the function signature 31 | [[nodiscard]] virtual UFunction* GetDelegateSignature( void ) const = 0; 32 | 33 | // Update for any change that have occurred but without affecting the blueprint graph 34 | virtual bool HandleAnyChangeWithoutNotifying( void ) = 0; 35 | 36 | // Update for any changes that have occurred 37 | void HandleAnyChange( bool bForceModify = false ); 38 | }; 39 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Widgets/SMDMetaDataStringComboBox.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #include "SMDMetaDataStringComboBox.h" 4 | 5 | #include "DetailLayoutBuilder.h" 6 | #include "Widgets/Input/STextComboBox.h" 7 | 8 | void SMDMetaDataStringComboBox::Construct(const FArguments& InArgs) 9 | { 10 | Key = InArgs._Key; 11 | MetaDataValue = InArgs._MetaDataValue; 12 | OnSetMetaData = InArgs._OnSetMetaData; 13 | 14 | Algo::Transform(InArgs._ValueList, ValueList, [](const FString& Value) 15 | { 16 | return MakeShared(Value); 17 | }); 18 | 19 | ChildSlot 20 | [ 21 | SNew(STextComboBox) 22 | .Font(IDetailLayoutBuilder::GetDetailFont()) 23 | .OptionsSource(&ValueList) 24 | .InitiallySelectedItem(GetCurrentValue()) 25 | .OnSelectionChanged(this, &SMDMetaDataStringComboBox::OnSelected) 26 | ]; 27 | } 28 | 29 | TSharedPtr SMDMetaDataStringComboBox::GetCurrentValue() const 30 | { 31 | const TOptional ValueStringOptional = MetaDataValue.Get(TOptional()); 32 | if (ValueStringOptional.IsSet()) 33 | { 34 | const FString& Value = ValueStringOptional.GetValue(); 35 | for (const TSharedPtr& ValuePtr : ValueList) 36 | { 37 | if (ValuePtr.IsValid() && *ValuePtr == Value) 38 | { 39 | return ValuePtr; 40 | } 41 | } 42 | } 43 | 44 | return nullptr; 45 | } 46 | 47 | void SMDMetaDataStringComboBox::OnSelected(TSharedPtr ValuePtr, ESelectInfo::Type SelectInfo) 48 | { 49 | if (ValuePtr.IsValid()) 50 | { 51 | OnSetMetaData.ExecuteIfBound(Key, *ValuePtr); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Public/K2Nodes/K2Node_NativeForEach.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "K2Node.h" 5 | 6 | #include "K2Node_NativeForEach.generated.h" 7 | 8 | UCLASS( ) 9 | class STARFIREUTILITIESDEVELOPER_API UK2Node_NativeForEach : public UK2Node 10 | { 11 | GENERATED_BODY( ) 12 | public: 13 | 14 | // Pin Accessors 15 | [[nodiscard]] UEdGraphPin* GetArrayPin( void ) const; 16 | [[nodiscard]] UEdGraphPin* GetBreakPin( void ) const; 17 | 18 | [[nodiscard]] UEdGraphPin* GetForEachPin( void ) const; 19 | [[nodiscard]] UEdGraphPin* GetElementPin( void ) const; 20 | [[nodiscard]] UEdGraphPin* GetArrayIndexPin( void ) const; 21 | [[nodiscard]] UEdGraphPin* GetCompletedPin( void ) const; 22 | 23 | // K2Node API 24 | [[nodiscard]] bool IsNodeSafeToIgnore( ) const override { return true; } 25 | 26 | // EdGraphNode API 27 | void AllocateDefaultPins( ) override; 28 | void ExpandNode( FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph ) override; 29 | void PinConnectionListChanged( UEdGraphPin* Pin ) override; 30 | void PostPasteNode( ) override; 31 | 32 | private: 33 | // Pin Names 34 | static const FName ArrayPinName; 35 | static const FName BreakPinName; 36 | static const FName ElementPinName; 37 | static const FName ArrayIndexPinName; 38 | static const FName CompletedPinName; 39 | 40 | // Determine if there is any configuration options that shouldn't be allowed 41 | [[nodiscard]] bool CheckForErrors( const FKismetCompilerContext& CompilerContext ); 42 | 43 | UPROPERTY( ) 44 | FEdGraphPinType OriginalWildcardType; 45 | 46 | UPROPERTY( ) 47 | FEdGraphPinType InputCurrentType; 48 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Public/K2Node_StartListeningForMessage_Stateful.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "K2Node_StartListeningForMessage.h" 5 | 6 | #include "K2Node_StartListeningForMessage_Stateful.generated.h" 7 | 8 | // Implementation of the Listening node for listening for stateful messages 9 | UCLASS( ) 10 | class STARFIREMESSENGERDEVELOPER_API UK2Node_StartListeningForMessage_Stateful : public UK2Node_StartListeningForMessage 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | UK2Node_StartListeningForMessage_Stateful( ); 15 | 16 | // Ed Graph Node API 17 | void AllocateDefaultPins( ) override; 18 | FText GetNodeTitle( ENodeTitleType::Type TitleType ) const override; 19 | 20 | // K2 Node API 21 | void ExpandNode( FKismetCompilerContext &CompilerContext, UEdGraph *SourceGraph ) override; 22 | 23 | // Execution pin triggered when registering as a listener when there are existing stateful messages of the desired type 24 | [[nodiscard]] UEdGraphPin* GetMessageExistingPin( ) const; 25 | // Execution pin triggered when new messages are broadcast 26 | [[nodiscard]] UEdGraphPin* GetMessageExecPin( ) const; 27 | // Execution pin trigger when a stateful message (maybe get 28 | [[nodiscard]] UEdGraphPin* GetMessageClearPin( ) const; 29 | 30 | protected: 31 | // Pin Names 32 | static const FName MessageExistingPinName; 33 | static const FName MessageExecPinName; 34 | static const FName MessageClearPinName; 35 | 36 | // Message Node Base 37 | [[nodiscard]] bool IsMessageVarPin( UEdGraphPin *Pin ) const override; 38 | [[nodiscard]] bool CheckForErrors( const FKismetCompilerContext &CompilerContext ) override; 39 | }; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsEditor/Public/DataDefinition_AssetDefinition.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "AssetDefinitionDefault.h" 5 | 6 | #include "DataDefinition_AssetDefinition.generated.h" 7 | 8 | // Common asset definition for DataDefinition asset types 9 | UCLASS( ) 10 | class STARFIREASSETSEDITOR_API UDataDefinition_AssetDefinition : public UAssetDefinitionDefault 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | // Asset Definition API 15 | FText GetAssetDisplayName() const override; 16 | FText GetAssetDisplayName(const FAssetData &AssetData) const override; 17 | TSoftClassPtr< UObject > GetAssetClass( ) const override; 18 | FLinearColor GetAssetColor() const override; 19 | const FSlateBrush* GetThumbnailBrush( const FAssetData &InAssetData, const FName InClassName ) const override; 20 | const FSlateBrush* GetIconBrush( const FAssetData &InAssetData, const FName InClassName ) const override; 21 | }; 22 | 23 | // Common asset definition for DataDefinition Extension asset types 24 | UCLASS( ) 25 | class STARFIREASSETSEDITOR_API UDataDefinitionExtension_AssetDefinition : public UAssetDefinitionDefault 26 | { 27 | GENERATED_BODY( ) 28 | public: 29 | // Asset Definition API 30 | FText GetAssetDisplayName() const override; 31 | FText GetAssetDisplayName(const FAssetData &AssetData) const override; 32 | TSoftClassPtr< UObject > GetAssetClass( ) const override; 33 | FLinearColor GetAssetColor() const override; 34 | const FSlateBrush* GetThumbnailBrush( const FAssetData &InAssetData, const FName InClassName ) const override; 35 | const FSlateBrush* GetIconBrush( const FAssetData &InAssetData, const FName InClassName ) const override; 36 | }; -------------------------------------------------------------------------------- /StarfireMessenger/StarfireMessenger.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "5.7.0", 5 | "FriendlyName": "Starfire Messenger", 6 | "Description": "A generalized message bus for intersystem communication.", 7 | "Category": "Other", 8 | "CreatedBy": "Russell Aasland", 9 | "CreatedByURL": "https://github.com/MagForceSeven/Starfire/tree/main/StarfireMessenger", 10 | "DocsURL": "https://github.com/MagForceSeven/Starfire/blob/main/StarfireMessenger/README.md", 11 | "MarketplaceURL": "", 12 | "SupportURL": "https://github.com/MagForceSeven/Starfire", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "Installed": false, 16 | "EnabledByDefault": false, 17 | "EditorCustomVirtualPath": "Starfire", 18 | "SupportedTargetPlatforms": [ 19 | "Win64", 20 | "Linux", 21 | "LinuxArm64" 22 | ], 23 | "Modules": [ 24 | { 25 | "Name": "StarfireMessenger", 26 | "Type": "Runtime", 27 | "LoadingPhase": "Default" 28 | }, 29 | { 30 | "Name": "StarfireMessengerDeveloper", 31 | "Type": "UncookedOnly", 32 | "LoadingPhase": "Default" 33 | }, 34 | { 35 | "Name": "StarfireMessengerEditor", 36 | "Type": "Editor", 37 | "LoadingPhase": "Default" 38 | }, 39 | { 40 | "Name": "MDMetaDataEditor", 41 | "Type": "Editor", 42 | "LoadingPhase": "PostEngineInit" 43 | }, 44 | { 45 | "Name": "MDMetaDataEditorGraph", 46 | "Type": "UncookedOnly", 47 | "LoadingPhase": "PostEngineInit" 48 | } 49 | ], 50 | "Plugins": [ 51 | { 52 | "Name": "StarfireUtilities", 53 | "Enabled": true 54 | }, 55 | { 56 | "Name": "GameplayTagsEditor", 57 | "Enabled": true 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Misc/LatentAction_Simple.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "LatentActions.h" 5 | 6 | struct FLatentActionInfo; 7 | 8 | // Enumeration for specifying how to respond to a particular frame update 9 | enum class ELatentActionResponse 10 | { 11 | None = 0, 12 | 13 | Trigger = 1 << 0, 14 | Finish = 1 << 1, 15 | 16 | TriggerAndFinish = Trigger | Finish 17 | }; 18 | ENUM_CLASS_FLAGS( ELatentActionResponse ) 19 | 20 | // An abstract utility base class for easier creation of latent actions that stores data from FLatentActionInfo 21 | class STARFIREUTILITIES_API FLatentAction_Simple : public FPendingLatentAction 22 | { 23 | public: 24 | explicit FLatentAction_Simple( const FLatentActionInfo& LatentInfo ); 25 | ~FLatentAction_Simple() override = default; 26 | 27 | // we're taking over this API, derived types shouldn't use this part anymore 28 | void UpdateOperation( FLatentResponse &Response ) final; 29 | 30 | protected: 31 | template< class type_t, class ... Args_t > 32 | [[nodiscard]] static type_t* CreateAndAddAction( const UObject *WorldContextObject, const FLatentActionInfo &LatentInfo, Args_t&&... Args ); 33 | 34 | // Hook for derived types to implement their per-frame updates and decide how to respond 35 | [[nodiscard]] virtual ELatentActionResponse Update( void ) = 0; 36 | 37 | private: 38 | 39 | // Data copied from LatentActionInfo for execution later 40 | FName ExecutionFunction; 41 | int32 Linkage; 42 | FWeakObjectPtr CallbackTarget; 43 | }; 44 | 45 | #define __LATENT_ACTION_SIMPLE_IMPLEMENTATION 46 | #include "../../Private/Misc/LatentAction_Simple.hpp" 47 | #undef __LATENT_ACTION_SIMPLE_IMPLEMENTATION -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Public/SaveData/SaveDataCommon.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/ObjectMacros.h" 5 | 6 | #include "SaveDataCommon.generated.h" 7 | 8 | class USaveDataHeader; 9 | class USaveData; 10 | 11 | DECLARE_LOG_CATEGORY_EXTERN( LogStarfireSaveData, Log, All ); 12 | 13 | DECLARE_MULTICAST_DELEGATE( FSaveDataAccessStarted ); 14 | DECLARE_MULTICAST_DELEGATE( FSaveDataAccessEnded ); 15 | 16 | // Possible results when trying to load save game data from disk 17 | UENUM( ) 18 | enum class ESaveDataLoadResult : uint8 19 | { 20 | // Everything worked great 21 | Success, 22 | 23 | // The header is not currently included in the cache of headers 24 | NotCached, 25 | 26 | // Something was wrong with the inputs requesting the file load 27 | RequestFailure, 28 | 29 | // File was unable to be opened 30 | FailedToOpen, 31 | 32 | // Something wrong with the file tag. Maybe an invalid or corrupt file 33 | InvalidFileTag, 34 | 35 | // File hashes don't match, something is corrupt with the file 36 | CorruptFile, 37 | 38 | // The type of the header in the file and the header being filled in are different types 39 | HeaderTypeMismatch, 40 | 41 | // The FileTypeTag in the file and specified by the header are 42 | FileTypeMismatch, 43 | 44 | // The type of the save data in the file and the save data being filled in are different types 45 | SaveDataTypeMismatch, 46 | 47 | // There's a version problem and the file can't be loaded by this version of the game 48 | IncompatibleVersion, 49 | 50 | // Something happened during serialization 51 | SerializationFailed, 52 | 53 | // Content required for the save is not available 54 | ContentMismatch 55 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/BlueprintDevUtilities.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Kismet/BlueprintFunctionLibrary.h" 5 | 6 | #include "BlueprintDevUtilities.generated.h" 7 | 8 | // Types of builds that may be running 9 | UENUM( ) 10 | enum class EBuildType : uint8 11 | { 12 | // Non-user build for developers only 13 | Development, 14 | 15 | // Non-user build close to shipping for testing 16 | Testing, 17 | 18 | // User build that could be shipped to customers 19 | Shipping, 20 | }; 21 | 22 | UCLASS( ) 23 | class UBlueprintDevUtilities : public UBlueprintFunctionLibrary 24 | { 25 | GENERATED_BODY( ) 26 | public: 27 | 28 | // A non fatal, but halting error that will also be output to the log 29 | UFUNCTION( BlueprintCallable, Category = "Dev Utilities", meta = (DevelopmentOnly, AutoCreateRefTerm = "Message") ) 30 | static void Ensure( bool Condition, const FString &Message ); 31 | 32 | // A fatal and halting error 33 | UFUNCTION( BlueprintCallable, Category = "Dev Utilities", meta = (DevelopmentOnly, AutoCreateRefTerm = "Message") ) 34 | static void Check( bool Condition, const FString &Message ); 35 | 36 | // Determine the current type of build that is running (since blueprint doesn't have another good way for conditional compiles) 37 | UFUNCTION( BlueprintCallable, Category = "Dev Utilities", BlueprintPure ) 38 | [[nodiscard]] static EBuildType GetCurrentBuildType( ); 39 | 40 | // Branch the execution based on the current type of build that is running (since blueprint doesn't have another good way for conditional compiles) 41 | UFUNCTION( BlueprintCallable, Category = "Dev Utilities", meta = (ExpandEnumAsExecs = Exec) ) 42 | static void SwitchOnBuildType( EBuildType &Exec ); 43 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Misc/StarfireMath.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Kismet/BlueprintFunctionLibrary.h" 5 | 6 | #include "StarfireMath.generated.h" 7 | 8 | UENUM( ) 9 | enum class ERoundingStyle : uint8 10 | { 11 | /** Rounds to the nearest place, equidistant ties go to the value which is closest to an even value: 1.5 becomes 2, 0.5 becomes 0 */ 12 | HalfToEven, 13 | /** Rounds to nearest place, equidistant ties go to the value which is further from zero: -0.5 becomes -1.0, 0.5 becomes 1.0 */ 14 | HalfFromZero, 15 | /** Rounds to nearest place, equidistant ties go to the value which is closer to zero: -0.5 becomes 0, 0.5 becomes 0. */ 16 | HalfToZero, 17 | /** Rounds to the value which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1 */ 18 | FromZero, 19 | /** Rounds to the value which is closer to zero, "smaller" in absolute value: 0.1 becomes 0, -0.1 becomes 0 */ 20 | ToZero, 21 | /** Rounds to the value which is more negative: 0.1 becomes 0, -0.1 becomes -1 */ 22 | ToNegativeInfinity, 23 | /** Rounds to the value which is more positive: 0.1 becomes 1, -0.1 becomes 0 */ 24 | ToPositiveInfinity, 25 | }; 26 | 27 | UCLASS( ) 28 | class STARFIREUTILITIES_API UStarfireMath : public UBlueprintFunctionLibrary 29 | { 30 | GENERATED_BODY( ) 31 | public: 32 | // Round a float to the nearest integer 33 | UFUNCTION( BlueprintCallable, BlueprintPure = true, Category = "Core|Math" ) 34 | static int RoundToInt( float A, ERoundingStyle Style ); 35 | 36 | // Round a float to the nearest integer but keep it as a floating type 37 | UFUNCTION( BlueprintCallable, BlueprintPure = true, Category = "Core|Math" ) 38 | static float RoundToFloat( float A, ERoundingStyle Style ); 39 | }; -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorCustomizationBase.h: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "IDetailCustomization.h" 6 | #include "Input/Reply.h" 7 | #include "Layout/Visibility.h" 8 | #include "Runtime/Launch/Resources/Version.h" 9 | #include "UObject/WeakFieldPtr.h" 10 | 11 | class IDetailGroup; 12 | 13 | namespace ETextCommit 14 | { 15 | #if ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 2 16 | enum Type : int; 17 | #else 18 | enum Type; 19 | #endif 20 | } 21 | 22 | class IBlueprintEditor; 23 | class SWidget; 24 | class UBlueprint; 25 | class UK2Node_CustomEvent; 26 | class UK2Node_FunctionEntry; 27 | class UK2Node_Tunnel; 28 | enum class ECheckBoxState : uint8; 29 | struct FMDMetaDataKey; 30 | 31 | class FMDMetaDataEditorCustomizationBase : public IDetailCustomization 32 | { 33 | public: 34 | FMDMetaDataEditorCustomizationBase(const TWeakPtr& BlueprintEditor, TWeakObjectPtr&& BlueprintPtr); 35 | 36 | virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override; 37 | // This version doesn't actually get called (see FBlueprintGraphActionDetails::CustomizeDetails and https://github.com/EpicGames/UnrealEngine/pull/11137) 38 | // virtual void CustomizeDetails(const TSharedPtr& DetailBuilder) override; 39 | 40 | UBlueprint* GetBlueprint() const { return BlueprintPtr.Get(); } 41 | 42 | virtual void RefreshDetails(); 43 | 44 | private: 45 | virtual void CustomizeObject(IDetailLayoutBuilder& DetailLayout, UObject* Obj) = 0; 46 | 47 | TWeakPtr BlueprintEditor; 48 | TWeakObjectPtr BlueprintPtr; 49 | 50 | IDetailLayoutBuilder* DetailBuilderPtr = nullptr; 51 | }; 52 | -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Misc/StarfireMath.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Misc/StarfireMath.h" 3 | 4 | #include UE_INLINE_GENERATED_CPP_BY_NAME(StarfireMath) 5 | 6 | int UStarfireMath::RoundToInt( float A, ERoundingStyle Style ) 7 | { 8 | switch (Style) 9 | { 10 | case ERoundingStyle::FromZero: 11 | return FMath::RoundFromZero( A ); 12 | 13 | case ERoundingStyle::HalfFromZero: 14 | return FMath::RoundHalfFromZero( A ); 15 | 16 | case ERoundingStyle::HalfToEven: 17 | return FMath::RoundHalfToEven( A ); 18 | 19 | case ERoundingStyle::HalfToZero: 20 | return FMath::RoundHalfToZero( A ); 21 | 22 | case ERoundingStyle::ToNegativeInfinity: 23 | return FMath::RoundToNegativeInfinity( A ); 24 | 25 | case ERoundingStyle::ToPositiveInfinity: 26 | return FMath::RoundToPositiveInfinity( A ); 27 | 28 | case ERoundingStyle::ToZero: 29 | return FMath::RoundToZero( A ); 30 | } 31 | 32 | checkNoEntry( ); 33 | return 0; 34 | } 35 | 36 | float UStarfireMath::RoundToFloat( float A, ERoundingStyle Style ) 37 | { 38 | switch (Style) 39 | { 40 | case ERoundingStyle::FromZero: 41 | return FMath::RoundFromZero( A ); 42 | 43 | case ERoundingStyle::HalfFromZero: 44 | return FMath::RoundHalfFromZero( A ); 45 | 46 | case ERoundingStyle::HalfToEven: 47 | return FMath::RoundHalfToEven( A ); 48 | 49 | case ERoundingStyle::HalfToZero: 50 | return FMath::RoundHalfToZero( A ); 51 | 52 | case ERoundingStyle::ToNegativeInfinity: 53 | return FMath::RoundToNegativeInfinity( A ); 54 | 55 | case ERoundingStyle::ToPositiveInfinity: 56 | return FMath::RoundToPositiveInfinity( A ); 57 | 58 | case ERoundingStyle::ToZero: 59 | return FMath::RoundToZero( A ); 60 | } 61 | 62 | checkNoEntry( ); 63 | return 0; 64 | } -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Types/MDMetaDataKey.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #include "MDMetaDataKey.h" 4 | 5 | bool FMDMetaDataKey::DoesSupportBlueprint(const UBlueprint* Blueprint) const 6 | { 7 | if (!IsValid(Blueprint)) 8 | { 9 | return false; 10 | } 11 | 12 | for (const TSoftClassPtr& BPClass : SupportedBlueprints) 13 | { 14 | if (Blueprint->IsA(BPClass.Get())) 15 | { 16 | return true; 17 | } 18 | } 19 | 20 | return false; 21 | } 22 | 23 | bool FMDMetaDataKey::DoesSupportProperty(const FProperty* Property) const 24 | { 25 | if (Property == nullptr) 26 | { 27 | return false; 28 | } 29 | 30 | for (const FMDMetaDataEditorPropertyType& PropertyType : SupportedPropertyTypes) 31 | { 32 | if (PropertyType.DoesMatchProperty(Property)) 33 | { 34 | return true; 35 | } 36 | } 37 | 38 | return false; 39 | } 40 | 41 | FText FMDMetaDataKey::GetKeyDisplayText() const 42 | { 43 | if (bUseDisplayNameOverride) 44 | { 45 | return DisplayNameOverride; 46 | } 47 | else 48 | { 49 | return FText::FromString(FName::NameToDisplayString(Key.ToString(), false)); 50 | } 51 | } 52 | 53 | FText FMDMetaDataKey::GetToolTipText() const 54 | { 55 | FString ToolTip = Description; 56 | if (bUseDisplayNameOverride) 57 | { 58 | ToolTip += "\r\n\r\nMeta Data Key: \"" + Key.ToString() + "\""; 59 | } 60 | return FText::FromString(ToolTip); 61 | } 62 | 63 | FText FMDMetaDataKey::GetFilterText() const 64 | { 65 | FString Filter = Key.ToString(); 66 | if (bUseDisplayNameOverride) 67 | { 68 | Filter += TEXT(" ") + DisplayNameOverride.ToString(); 69 | } 70 | return FText::FromString(Filter); 71 | } 72 | 73 | bool FMDMetaDataKey::operator==(const FMDMetaDataKey& Other) const 74 | { 75 | return Key == Other.Key && KeyType == Other.KeyType; 76 | } 77 | -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssetsEditor/Private/Module/StarfireAssetsEditor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Module/StarfireAssetsEditor.h" 3 | 4 | #include "AssetValidation/VerifiableContent.h" 5 | #include "AssetValidation/AssetChecks.h" 6 | 7 | // Core 8 | #include "Logging/MessageLog.h" 9 | 10 | #define LOCTEXT_NAMESPACE "StarfireAssetsEditor" 11 | 12 | void FStarfireAssetsEditor::StartupModule( ) 13 | { 14 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 15 | VerifiableOnSaveHandle = FCoreUObjectDelegates::OnObjectPreSave.AddRaw( this, &FStarfireAssetsEditor::OnSaveVerifiableAsset ); 16 | } 17 | 18 | void FStarfireAssetsEditor::ShutdownModule( ) 19 | { 20 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 21 | // we call this function before unloading the module. 22 | 23 | if (VerifiableOnSaveHandle.IsValid( )) 24 | FCoreUObjectDelegates::OnObjectPreSave.Remove( VerifiableOnSaveHandle ); 25 | } 26 | 27 | // ReSharper disable once CppMemberFunctionMayBeStatic 28 | // ReSharper disable once CppMemberFunctionMayBeConst 29 | void FStarfireAssetsEditor::OnSaveVerifiableAsset( UObject *Asset, FObjectPreSaveContext Context ) 30 | { 31 | if (const auto Verifiable = Cast< IVerifiableAsset >( Asset )) 32 | { 33 | const auto VerifyLogChannel = FString::Format( TEXT( "Asset Save: {0}" ), { Asset->GetName( ) } ); 34 | const AssetChecks::FScopedChecksChannel ScopedChannel( VerifyLogChannel ); 35 | FMessageLog VerifyLog( *VerifyLogChannel ); 36 | VerifyLog.NewPage( FText::FromString( VerifyLogChannel ) ); 37 | 38 | Verifiable->Verify( nullptr ); 39 | 40 | VerifyLog.Open( ); 41 | } 42 | } 43 | 44 | #undef LOCTEXT_NAMESPACE 45 | 46 | IMPLEMENT_MODULE( FStarfireAssetsEditor, StarfireAssetsEditor ) -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Private/GameFeatures/StarfireFeatureData.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GameFeatures/StarfireFeatureData.h" 3 | 4 | #include "AssetValidation/AssetChecks.h" 5 | 6 | // Core 7 | #include "Logging/MessageLog.h" 8 | 9 | // Engine 10 | #include "Engine/AssetManagerTypes.h" 11 | 12 | #include UE_INLINE_GENERATED_CPP_BY_NAME(StarfireFeatureData) 13 | 14 | UE_DEFINE_GAMEPLAY_TAG_COMMENT( UStarfireFeatureData::ContentType_Root, "Content.Type", "Type IDs Root" ); 15 | UE_DEFINE_GAMEPLAY_TAG_COMMENT( UStarfireFeatureData::ContentFlag_Root, "Content.Flag", "Content Flags Root" ); 16 | UE_DEFINE_GAMEPLAY_TAG_COMMENT( UStarfireFeatureData::ContentFlag_BuiltIn, "Content.Flag.BuiltIn", "This bundle is always treated as owned by the player" ); 17 | UE_DEFINE_GAMEPLAY_TAG_COMMENT( UStarfireFeatureData::ContentFlag_Development, "Content.Flag.BuiltIn.Dev", "This bundle is not owned by the player in shipping builds" ); 18 | 19 | FPrimaryAssetId UStarfireFeatureData::GetPrimaryAssetId( ) const 20 | { 21 | return FPrimaryAssetId( UGameFeatureData::StaticClass( )->GetFName( ), GetFName( ) ); 22 | } 23 | 24 | void UStarfireFeatureData::Verify( const UObject *WorldContext ) 25 | { 26 | if (!ContentType.IsValid( ) || ContentType.MatchesTagExact( ContentType_Root )) 27 | AssetChecks::AC_Message( this, TEXT( "Content Package Data not configured with a valid Content Type!" ), WorldContext ); 28 | 29 | if (ContentFlags.HasTagExact( ContentFlag_Root )) 30 | AssetChecks::AC_Message( this, TEXT( "Content Package Data specifies an invalid Content Flag: Content.Flag!" ), WorldContext ); 31 | } 32 | 33 | void UStarfireFeatureData::PostLoad( ) 34 | { 35 | Super::PostLoad( ); 36 | 37 | IVerifiableAsset::Verify( this, nullptr ); 38 | 39 | if (FMessageLog( "AssetCheck" ).NumMessages( EMessageSeverity::Warning ) > 0) 40 | FMessageLog( "AssetCheck" ).Open( ); 41 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilitiesDeveloper/Public/K2Nodes/K2Node_IsValidObject.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "K2Node.h" 5 | 6 | #include "K2Node_IsValidObject.generated.h" 7 | 8 | // Utility native-only node for simple check of valid objects 9 | UCLASS( ) 10 | class STARFIREUTILITIESDEVELOPER_API UK2Node_IsValidObject : public UK2Node 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | 15 | // Pin Accessors 16 | [[nodiscard]] UEdGraphPin* GetValidPin( ) const; 17 | [[nodiscard]] UEdGraphPin* GetInvalidPin( ) const; 18 | [[nodiscard]] UEdGraphPin* GetOutputPin( ) const; 19 | 20 | [[nodiscard]] UEdGraphPin* GetInputPin( ) const; 21 | 22 | // K2Node API 23 | [[nodiscard]] bool IsNodeSafeToIgnore( ) const override { return true; } 24 | void GetMenuActions( FBlueprintActionDatabaseRegistrar& ActionRegistrar ) const override; 25 | 26 | // EdGraphNode API 27 | void AllocateDefaultPins( ) override; 28 | void PinConnectionListChanged( UEdGraphPin* Pin ) override; 29 | void ExpandNode( FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph ) override; 30 | [[nodiscard]] FText GetNodeTitle( ENodeTitleType::Type TitleType ) const override; 31 | [[nodiscard]] FText GetTooltipText( ) const override; 32 | [[nodiscard]] FSlateIcon GetIconAndTint( FLinearColor& OutColor ) const override; 33 | 34 | private: 35 | // Static pin names for the pins constructed by this node 36 | static const FName InvalidExecPinName; 37 | static const FName InputPinName; 38 | static const FName OutputPinName; 39 | 40 | // Determine if there are any configuration errors during node expansion 41 | [[nodiscard]] bool CheckForErrors( const FKismetCompilerContext& CompilerContext ) const; 42 | 43 | // The type of object that should be output by the output pin (separate property for serialization purposes) 44 | UPROPERTY( ) 45 | TWeakObjectPtr< UObject > OutputClassType; 46 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/BlueprintAsyncActionSF.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Kismet/BlueprintAsyncActionSF.h" 3 | 4 | // Engine 5 | #include "Engine/Engine.h" 6 | #include "Tickable.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BlueprintAsyncActionSF) 9 | 10 | // Helper class to hook the async action instance to the tick-pump 11 | class FAsyncTickHook : public FTickableGameObject 12 | { 13 | public: 14 | FAsyncTickHook( UBlueprintAsyncAction_SF *InAction, UWorld *InWorld ) 15 | : Action( InAction ), World( InWorld ) 16 | { 17 | } 18 | 19 | void Tick( float fDeltaT ) override 20 | { 21 | if (const auto AsyncAction = Action.Get( )) 22 | { 23 | AsyncAction->Tick( fDeltaT ); 24 | } 25 | } 26 | 27 | UWorld* GetTickableGameObjectWorld( ) const override 28 | { 29 | return World.Get( ); 30 | } 31 | 32 | TStatId GetStatId( ) const override 33 | { 34 | RETURN_QUICK_DECLARE_CYCLE_STAT( UBlueprintAsyncAction_SF, STATGROUP_Tickables ); 35 | } 36 | 37 | TWeakObjectPtr< UBlueprintAsyncAction_SF > Action; 38 | TWeakObjectPtr< UWorld > World; 39 | }; 40 | 41 | 42 | UBlueprintAsyncAction_SF::~UBlueprintAsyncAction_SF() 43 | { 44 | if (TickHook != nullptr) 45 | { 46 | delete TickHook; 47 | } 48 | } 49 | 50 | void UBlueprintAsyncAction_SF::StartAction( UObject* WorldContext, bool bShouldTick ) 51 | { 52 | if (!bIsRunning) 53 | { 54 | bIsRunning = true; 55 | RegisterWithGameInstance( WorldContext ); 56 | 57 | if (bShouldTick) 58 | { 59 | check(TickHook == nullptr); 60 | TickHook = new FAsyncTickHook( this, GEngine->GetWorldFromContextObjectChecked( WorldContext ) ); 61 | } 62 | } 63 | } 64 | 65 | void UBlueprintAsyncAction_SF::EndAction() 66 | { 67 | if (bIsRunning) 68 | { 69 | bIsRunning = false; 70 | 71 | if (TickHook != nullptr) 72 | { 73 | delete TickHook; 74 | TickHook = nullptr; 75 | } 76 | 77 | SetReadyToDestroy( ); 78 | } 79 | } -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/SaveData.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "SaveData/SaveData.h" 3 | 4 | #include "SaveData/SaveDataVersion.h" 5 | 6 | #include "GameFeatures/FeatureContentManager.h" 7 | 8 | // CoreUObject 9 | #include "Serialization/ObjectAndNameAsStringProxyArchive.h" 10 | 11 | #include UE_INLINE_GENERATED_CPP_BY_NAME(SaveData) 12 | 13 | void USaveData::ConfigureArchiveVersions( FArchive &Ar ) const 14 | { 15 | Ar.SetUEVer( FPackageFileVersion( VER_LATEST_ENGINE_UE4, (EUnrealEngineObjectUE5Version)PackageVersion ) ); 16 | Ar.SetLicenseeUEVer( LicenseeVersion ); 17 | Ar.SetCustomVersion( SaveDataVersion, GameVersion, TEXT( "SaveData" ) ); 18 | } 19 | 20 | void USaveData::SerializeToBytes( UObject *Object, TArray< uint8 > &Bytes, const FSerializeBytesOptions &Options ) const 21 | { 22 | FMemoryWriter MemWriter( Bytes, true ); 23 | FObjectAndNameAsStringProxyArchive Archive( MemWriter, false ); 24 | ConfigureArchiveVersions( Archive ); 25 | Archive.SetWantBinaryPropertySerialization( Options.bWantBinary ); 26 | Archive.ArIsSaveGame = Options.bSaveGame; 27 | 28 | Object->Serialize( Archive ); 29 | } 30 | 31 | void USaveData::SerializeFromBytes( UObject *Object, const TArray< uint8 > &Bytes, const FSerializeBytesOptions &Options ) const 32 | { 33 | FMemoryReader MemReader( Bytes, true ); 34 | FObjectAndNameAsStringProxyArchive Archive( MemReader, true ); 35 | ConfigureArchiveVersions( Archive ); 36 | Archive.SetWantBinaryPropertySerialization( Options.bWantBinary ); 37 | Archive.ArIsSaveGame = Options.bSaveGame; 38 | 39 | Object->Serialize( Archive ); 40 | } 41 | 42 | void USaveData::FillCoreData( const UObject *WorldContext, uint32 InGameVersion ) 43 | { 44 | GameVersion = InGameVersion; 45 | 46 | if (const auto ContentEntitlements = UFeatureContentManager::GetSubsystem( WorldContext )) 47 | { 48 | ContentFeatures = ContentEntitlements->GetEnabledFeatureNames( ); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Debug/RedscreenManager.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Subsystems/WorldSubsystem.h" 5 | 6 | #include "RedscreenManager.generated.h" 7 | 8 | class UScreenBase; 9 | class URedscreenScreen; 10 | 11 | UCLASS( notplaceable, NotBlueprintable, Config = Redscreens ) 12 | class URedscreenManager final : public UWorldSubsystem 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // Singleton Accessor 17 | static URedscreenManager* GetSubsystem( const UObject *WorldContext ); 18 | 19 | // Add a message to the redscreen UI (possibly creating a screen if one is not active) 20 | void AddRedscreen( const FString &Message, bool bOnce ); 21 | 22 | // Hook for the match having actually started (so that we know BeginPlay has been dispatched to everyone) 23 | void OnMatchStarted( const UObject *WorldContext ); 24 | 25 | // world Subsystem API 26 | bool DoesSupportWorldType( const EWorldType::Type WorldType ) const override; 27 | // Subsystem API 28 | void Initialize(FSubsystemCollectionBase &Collection) override; 29 | void Deinitialize( ) override; 30 | 31 | protected: 32 | // The type of screen that should be created that can display redscreen messages 33 | UPROPERTY( Config ) 34 | TSoftClassPtr< URedscreenScreen > RedscreenWidgetType; 35 | 36 | // A reference to an active screen that is displaying messages 37 | UPROPERTY( ) 38 | TObjectPtr ScreenWidget = nullptr; 39 | 40 | // A hook to be notified when the screen widget is closed (removed from the view) 41 | UFUNCTION( ) 42 | void OnScreenClosed( URedscreenScreen *Screen ); 43 | 44 | // Whether or not the screen is currently visible 45 | bool bVisible = false; 46 | 47 | // Messages that should be shown the next time a redscreen manager is available 48 | TArray< FString > QueuedMessages; 49 | 50 | // CRCs for the error messages that have been seen so that they're only seen once 51 | TSet< uint32 > SeenOnceCRCs; 52 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/BlueprintContainerExtensions.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Kismet/BlueprintContainerExtensions.h" 3 | 4 | #include "Kismet/BlueprintMapLibrary.h" 5 | #include "Kismet/BlueprintSetLibrary.h" 6 | 7 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BlueprintContainerExtensions) 8 | 9 | DEFINE_FUNCTION( UBlueprintContainerExtensions::execSet_Get ) 10 | { 11 | UBlueprintSetLibrary::execSet_GetItemByIndex( Context, Stack, Z_Param__Result ); 12 | } 13 | 14 | void UBlueprintContainerExtensions::GenericSet_Get( void *TargetSet, const FSetProperty *SetProperty, int32 Index, void *Item ) 15 | { 16 | UBlueprintSetLibrary::GenericSet_GetItemByIndex( TargetSet, SetProperty, Index, Item ); 17 | } 18 | 19 | DEFINE_FUNCTION( UBlueprintContainerExtensions::execSet_LastIndex ) 20 | { 21 | UBlueprintSetLibrary::execSet_GetLastIndex( Context, Stack, Z_Param__Result ); 22 | } 23 | 24 | int32 UBlueprintContainerExtensions::GenericSet_LastIndex( const void* TargetSet, const FSetProperty* SetProperty ) 25 | { 26 | return UBlueprintSetLibrary::GenericSet_GetLastIndex( TargetSet, SetProperty ); 27 | } 28 | 29 | DEFINE_FUNCTION( UBlueprintContainerExtensions::execMap_Get ) 30 | { 31 | UBlueprintMapLibrary::execMap_GetKeyValueByIndex( Context, Stack, Z_Param__Result ); 32 | } 33 | 34 | void UBlueprintContainerExtensions::GenericMap_Get( const void *TargetMap, const FMapProperty *MapProperty, int32 Index, void *Key, void *Item ) 35 | { 36 | UBlueprintMapLibrary::GenericMap_GetKeyValueByIndex( TargetMap, MapProperty, Index, Key, Item ); 37 | } 38 | 39 | DEFINE_FUNCTION( UBlueprintContainerExtensions::execMap_LastIndex ) 40 | { 41 | UBlueprintMapLibrary::execMap_GetLastIndex( Context, Stack, Z_Param__Result ); 42 | } 43 | 44 | int32 UBlueprintContainerExtensions::GenericMap_LastIndex( const void* TargetMap, const FMapProperty* MapProperty ) 45 | { 46 | return UBlueprintMapLibrary::GenericMap_GetLastIndex( TargetMap, MapProperty ); 47 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Misc/ExecSF.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Misc/CoreMisc.h" 5 | #include "Delegates/Delegate.h" 6 | 7 | class UWorld; 8 | class FOutputDevice; 9 | 10 | namespace ExecSF_Params 11 | { 12 | // Template utility for parsing command parameters 13 | template < typename First_t, typename... Args_t > 14 | int GetParams( const TCHAR *&Cmd, First_t &First, Args_t&... Args ); 15 | 16 | template < typename type_t > 17 | int GetParams( const TCHAR *&Cmd, type_t &output ) { checkNoEntry( ); return 0; } 18 | 19 | // Concrete utilities for parsing command parameters 20 | template < > 21 | STARFIREUTILITIES_API int GetParams( const TCHAR *&Cmd, int &output ); 22 | template < > 23 | STARFIREUTILITIES_API int GetParams( const TCHAR *&Cmd, float &output ); 24 | template < > 25 | STARFIREUTILITIES_API int GetParams( const TCHAR *&Cmd, FString &output ); 26 | template < > 27 | STARFIREUTILITIES_API int GetParams( const TCHAR *&Cmd, FName &output ); 28 | template < > 29 | STARFIREUTILITIES_API int GetParams( const TCHAR *&Cmd, bool &output ); 30 | } 31 | 32 | // Utility class to aid in the creation of console commands and the parsing of console command input strings 33 | struct STARFIREUTILITIES_API FExecSF : FSelfRegisteringExec 34 | { 35 | // Delegate type for the console command functions 36 | DECLARE_DELEGATE_ThreeParams( FExecDelegate, const UWorld*, const TCHAR*, FOutputDevice& ); 37 | 38 | // Self Registering Exec API 39 | bool Exec( UWorld *pWorld, const TCHAR *Cmd, FOutputDevice &Ar ) override; 40 | 41 | // Add a console command that can be dispatched by this instance 42 | void AddExec( const TCHAR *Cmd, const TCHAR *Help, const FExecDelegate &CmdDelegate ); 43 | 44 | private: 45 | // The console commands registered with this utility 46 | TMap< FString, FExecDelegate > RegisteredExecs; 47 | }; 48 | 49 | #if CPP 50 | #define SF_EXEC_HPP 51 | #include "../../Private/Misc/ExecSF.hpp" 52 | #undef SF_EXEC_HPP 53 | #endif -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorCustomizationBase.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #include "MDMetaDataEditorCustomizationBase.h" 4 | 5 | #include "Config/MDMetaDataEditorConfig.h" 6 | #include "Config/MDMetaDataEditorUserConfig.h" 7 | #include "DetailCategoryBuilder.h" 8 | #include "DetailLayoutBuilder.h" 9 | #include "DetailWidgetRow.h" 10 | #include "Engine/UserDefinedStruct.h" 11 | #include "HAL/PlatformApplicationMisc.h" 12 | #include "IDetailGroup.h" 13 | #include "K2Node_CustomEvent.h" 14 | #include "K2Node_FunctionEntry.h" 15 | #include "K2Node_FunctionResult.h" 16 | #include "K2Node_Tunnel.h" 17 | #include "Kismet2/BlueprintEditorUtils.h" 18 | #include "ScopedTransaction.h" 19 | #include "Widgets/Input/SButton.h" 20 | #include "Widgets/Input/SCheckBox.h" 21 | #include "Widgets/Input/SEditableTextBox.h" 22 | #include "Widgets/Input/SNumericEntryBox.h" 23 | #include "Widgets/SMDMetaDataGameplayTagPicker.h" 24 | #include "Widgets/SMDMetaDataStringComboBox.h" 25 | #include "Widgets/Text/STextBlock.h" 26 | 27 | FMDMetaDataEditorCustomizationBase::FMDMetaDataEditorCustomizationBase(const TWeakPtr& BlueprintEditor, TWeakObjectPtr&& BlueprintPtr) 28 | : BlueprintEditor(BlueprintEditor) 29 | , BlueprintPtr(MoveTemp(BlueprintPtr)) 30 | {} 31 | 32 | void FMDMetaDataEditorCustomizationBase::CustomizeDetails(IDetailLayoutBuilder& DetailLayout) 33 | { 34 | DetailBuilderPtr = &DetailLayout; 35 | 36 | TArray> ObjectsBeingCustomized; 37 | DetailLayout.GetObjectsBeingCustomized(ObjectsBeingCustomized); 38 | if (ObjectsBeingCustomized.Num() != 1) 39 | { 40 | return; 41 | } 42 | 43 | CustomizeObject(DetailLayout, ObjectsBeingCustomized[0].Get()); 44 | } 45 | 46 | void FMDMetaDataEditorCustomizationBase::RefreshDetails() 47 | { 48 | if (DetailBuilderPtr != nullptr) 49 | { 50 | DetailBuilderPtr->ForceRefreshDetails(); 51 | DetailBuilderPtr = nullptr; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorStructChangeHandler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | 4 | #include "MDMetaDataEditorStructChangeHandler.h" 5 | 6 | #include "UObject/MetaData.h" 7 | #include "UObject/Package.h" 8 | 9 | void FMDMetaDataEditorStructChangeHandler::PreChange(const UUserDefinedStruct* Struct, FStructureEditorUtils::EStructureEditorChangeInfo Info) 10 | { 11 | if (IsValid(Struct)) 12 | { 13 | FMDMetaDataEditorCachedStructMetadata& Cache = CachedStructMetadata.FindOrAdd(Struct); 14 | if (Cache.Count++ == 0) 15 | { 16 | if (TMap* MetaDataMap = FMetaData::GetMapForObject(Struct)) 17 | { 18 | Cache.StructMetadata = *MetaDataMap; 19 | } 20 | 21 | for (TFieldIterator PropertyIter(Struct); PropertyIter; ++PropertyIter) 22 | { 23 | if (const TMap* PropertyMetaDataMap = PropertyIter->GetMetaDataMap()) 24 | { 25 | Cache.PropertyMetadata.FindOrAdd(PropertyIter->GetFName()) = *PropertyMetaDataMap; 26 | } 27 | } 28 | } 29 | } 30 | } 31 | 32 | void FMDMetaDataEditorStructChangeHandler::PostChange(const UUserDefinedStruct* Struct, FStructureEditorUtils::EStructureEditorChangeInfo Info) 33 | { 34 | if (IsValid(Struct)) 35 | { 36 | if (FMDMetaDataEditorCachedStructMetadata* Cache = CachedStructMetadata.Find(Struct)) 37 | { 38 | if (--Cache->Count == 0) 39 | { 40 | TMap& MetaDataMap = Struct->GetOutermost()->GetMetaData().ObjectMetaDataMap.FindOrAdd(Struct); 41 | MetaDataMap.Append(MoveTemp(Cache->StructMetadata)); 42 | 43 | for (TFieldIterator PropertyIter(Struct); PropertyIter; ++PropertyIter) 44 | { 45 | if (TMap* PropertyMetaDataMap = Cache->PropertyMetadata.Find(PropertyIter->GetFName())) 46 | { 47 | PropertyIter->AppendMetaData(*PropertyMetaDataMap); 48 | } 49 | } 50 | 51 | CachedStructMetadata.Remove(Struct); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /StarfireMessenger/Source/StarfireMessengerDeveloper/Private/SGraphPinMessengerType.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | //*********************************************************************** 5 | // This was duplicated from the Engine's SGraphPinStruct class 6 | // Messenger nodes have pins for selecting structure types, but we need to filter them based on inheritance 7 | // Which the SGraphPinStruct doesn't do. 8 | // We swap in this SGraphPin type instead of the SGraphPinStruct using the MessengerPinFactory 9 | 10 | #pragma once 11 | 12 | #include "Framework/SlateDelegates.h" 13 | #include "Input/Reply.h" 14 | #include "Internationalization/Text.h" 15 | #include "KismetPins/SGraphPinObject.h" 16 | #include "Templates/SharedPointer.h" 17 | #include "Widgets/DeclarativeSyntaxSupport.h" 18 | 19 | class SWidget; 20 | class UEdGraphPin; 21 | class UScriptStruct; 22 | 23 | ///////////////////////////////////////////////////// 24 | // SGraphPinEventType 25 | 26 | class SGraphPinMessengerType : public SGraphPinObject 27 | { 28 | public: 29 | SLATE_BEGIN_ARGS(SGraphPinMessengerType) {} 30 | SLATE_END_ARGS() 31 | 32 | void Construct( const FArguments& InArgs, UEdGraphPin* InGraphPinObj, bool bImmediate, bool bStateful, bool bAbstract ); 33 | void Construct( const FArguments& InArgs, UEdGraphPin* InGraphPinObj, UScriptStruct *BaseType, bool bAbstract ); 34 | 35 | protected: 36 | // Called when a new struct was picked via the asset picker 37 | void OnPickedNewStruct( const UScriptStruct* ChosenStruct ) const; 38 | 39 | //~ Begin SGraphPinObject Interface 40 | FReply OnClickUse() override; 41 | bool AllowSelfPinWidget() const override { return false; } 42 | TSharedRef GenerateAssetPicker() override; 43 | FText GetDefaultComboText() const override; 44 | FOnClicked GetOnUseButtonDelegate() override; 45 | //~ End SGraphPinObject Interface 46 | 47 | bool bAllowImmediate = false; 48 | bool bAllowStateful = false; 49 | bool bAllowAbstract = false; 50 | 51 | UScriptStruct *BaseAllowedType = nullptr; 52 | }; -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Private/SaveData/BatchHeaderLoader.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/Object.h" 5 | 6 | #include "SaveData/SaveDataUtilities.h" 7 | 8 | #include "BatchHeaderLoader.generated.h" 9 | 10 | // Utility class for doing batch loading of save game headers 11 | UCLASS( ) 12 | class UBatchHeaderLoader : public UObject 13 | { 14 | GENERATED_BODY( ) 15 | public: 16 | // Begin the batch loading process of headers with callbacks for completion and individual header loading and a filter for the headers that should be returned 17 | void Start( int32 UserIndex, const TSubclassOf< USaveDataHeader > &HeaderType, const USaveDataUtilities::FEnumerateHeadersComplete_Core &OnCompletion, const USaveDataUtilities::FSaveFilter_Core &Filter, const USaveDataUtilities::FLoadHeaderAsyncCallback_Core &OnSingleHeader ); 18 | 19 | private: 20 | // Handler for the completion of the SlotName enumeration task 21 | void OnSlotNamesComplete( const TArray< FString > &SlotNames ); 22 | // Handler for the completion of a single header being loaded 23 | void OnHeaderLoaded( const FString &SlotName, int32 UserIndex, ESaveDataLoadResult Result, const USaveDataHeader *Header ); 24 | 25 | // The User that we should be loading headers for 26 | int32 UserIndex; 27 | // The type of header that is expected 28 | TSubclassOf< USaveDataHeader > HeaderType; 29 | // Delegate for the completion of the batch loading process 30 | USaveDataUtilities::FEnumerateHeadersComplete_Core OnCompletion; 31 | // Delegate to filter headers that are included in the returned set 32 | USaveDataUtilities::FSaveFilter_Core Filter; 33 | // Delegate for the completion of loading an individual header 34 | USaveDataUtilities::FLoadHeaderAsyncCallback_Core OnSingleHeader; 35 | 36 | // The out-standing slots that are being waited on for loading 37 | TArray< FString > SlotNames; 38 | // The headers that have been successfully loaded and passed the filter 39 | TArray< USaveDataUtilities::FEnumeratedHeader_Core > Headers; 40 | }; -------------------------------------------------------------------------------- /StarfireAssets/Source/StarfireAssets/Public/GameFeatures/StarfireFeatureData.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "GameFeatureData.h" 5 | #include "AssetValidation/VerifiableContent.h" 6 | 7 | #include "NativeGameplayTags_SF.h" 8 | 9 | // Gameplay Tags 10 | #include "GameplayTagContainer.h" 11 | 12 | #include "StarfireFeatureData.generated.h" 13 | 14 | // Asset for additional information regarding content packages 15 | UCLASS( ) 16 | class STARFIREASSETS_API UStarfireFeatureData : public UGameFeatureData, public IVerifiableAsset 17 | { 18 | GENERATED_BODY( ) 19 | public: 20 | UE_DECLARE_GAMEPLAY_TAG_SCOPED( ContentType_Root ); 21 | UE_DECLARE_GAMEPLAY_TAG_SCOPED( ContentFlag_Root ); 22 | UE_DECLARE_GAMEPLAY_TAG_SCOPED( ContentFlag_BuiltIn ); 23 | UE_DECLARE_GAMEPLAY_TAG_SCOPED( ContentFlag_Development ); 24 | 25 | // Player-facing name of the package 26 | UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Content Data" ) 27 | FText DisplayName; 28 | 29 | // A shorter player facing name of the package 30 | UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Content Data" ) 31 | FText ShortName; 32 | 33 | // Player-facing long description of the package 34 | UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Content Data", meta = (MultiLine = true) ) 35 | FText Description; 36 | 37 | // Identifier for an overall category of content represented by this package (dlc, expansion, game mode, etc) 38 | UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Content Data", meta = (Categories = "Content.Type") ) 39 | FGameplayTag ContentType; 40 | 41 | // Misc flags regarding how to treat this bundle of content 42 | UPROPERTY( EditDefaultsOnly, BlueprintReadOnly, Category = "Content Data", meta = (Categories = "Content.Flag") ) 43 | FGameplayTagContainer ContentFlags; 44 | 45 | // Verifiable Asset API 46 | void Verify( const UObject *WorldContext ) override; 47 | 48 | // Object API 49 | void PostLoad( ) override; 50 | FPrimaryAssetId GetPrimaryAssetId( ) const override; 51 | }; -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Private/Kismet/BlueprintUtilitiesSF.hpp: -------------------------------------------------------------------------------- 1 | 2 | // ReSharper disable once CppMissingIncludeGuard 3 | #ifndef SF_BLUEPRINT_UTILITIES_HPP 4 | #error You shouldn't be including this file directly 5 | #endif 6 | 7 | template < class type_t > 8 | const TArray< type_t* >& BlueprintCompatibilityCast( const TArray< const type_t* > &NativeArray ) 9 | { 10 | return *reinterpret_cast< const TArray< type_t* >* >( &NativeArray ); 11 | } 12 | template < class type_t > 13 | TArray< type_t* >& BlueprintCompatibilityCast( TArray< const type_t* > &NativeArray ) 14 | { 15 | return *reinterpret_cast< TArray< type_t* >* >( &NativeArray ); 16 | } 17 | 18 | template < class type_t > 19 | const TArray< type_t* >& BlueprintCompatibilityCast( const TArray< TObjectPtr< const type_t > > &NativeArray ) 20 | { 21 | return *reinterpret_cast< const TArray< type_t* >* >( &NativeArray ); 22 | } 23 | template < class type_t > 24 | TArray< type_t* >& BlueprintCompatibilityCast( TArray< TObjectPtr< const type_t > > &NativeArray ) 25 | { 26 | return *reinterpret_cast< TArray< type_t* >* >( &NativeArray ); 27 | } 28 | 29 | template < class type_t > 30 | TArray< const type_t* >& NativeCompatibilityCast( TArray< type_t* > &BlueprintArray ) 31 | { 32 | return *reinterpret_cast< TArray< const type_t* >* >( &BlueprintArray ); 33 | } 34 | template < class type_t > 35 | const TArray< const type_t* >& NativeCompatibilityCast( const TArray< type_t* > &BlueprintArray ) 36 | { 37 | return *reinterpret_cast< const TArray< const type_t* >* >( &BlueprintArray ); 38 | } 39 | 40 | template < class type_t > 41 | TArray< const type_t* >& NativeCompatibilityCast( TArray< TObjectPtr< type_t > > &BlueprintArray ) 42 | { 43 | return *reinterpret_cast< TArray< const type_t* >* >( &BlueprintArray ); 44 | } 45 | template < class type_t > 46 | const TArray< const type_t* >& NativeCompatibilityCast( const TArray< TObjectPtr< type_t > > &BlueprintArray ) 47 | { 48 | return *reinterpret_cast< const TArray< const type_t* >* >( &BlueprintArray ); 49 | } -------------------------------------------------------------------------------- /StarfireUtilities/Source/StarfireUtilities/Public/Templates/ContainerRandUtilities.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // collection of utilities for random operations on containers 5 | namespace ContainerRand 6 | { 7 | // Shuffle any container with a fisher-yates that supports Num( ) & Swap( index, index ) functions 8 | template < class container_t > 9 | requires requires( container_t C) { { C.Num( ) } -> std::same_as< int >; C.Swap( int( ), int( ) ); } 10 | void Shuffle( container_t &Container ); 11 | 12 | // Select a random element from an array 13 | // TODO: get this working with a requires clause - first tries couldn't narrow this version to TArray vs TMap/TSet 14 | template < class type_t > 15 | auto RandElement( const TArray< type_t > &Container ); 16 | 17 | // Select a random element from a container that supports a Num( ) function and a forward iterator accessed through a CreateConstIterator function 18 | template < class container_t > 19 | requires requires( container_t C) { { C.Num( ) } -> std::same_as< int >; C.CreateConstIterator( ); ++C.CreateConstIterator( ); } 20 | auto RandElement( const container_t &Container ); 21 | 22 | // Select and remove a random element from an array (with an option to swap the element instead of contracting it) 23 | // TODO: maybe this could be through a requires clause - swapping might be too TArray specific 24 | template < class type_t > 25 | auto RandRemove( TArray< type_t > &Container, bool bSwap = false ); 26 | 27 | // Select and remove a random element from a container that supports a Num( ) function and a forward iterator, created with a CreateIterator function and has a RemoveCurrent function 28 | template < class container_t > 29 | requires requires( container_t C) { { C.Num( ) } -> std::same_as< int >; C.CreateIterator( ); ++C.CreateIterator( ); C.CreateIterator( ).RemoveCurrent( ); } 30 | auto RandRemove( container_t &Container ); 31 | ; 32 | } 33 | 34 | #define CONTAINER_RAND_UTILITIES_HPP 35 | #include "../../Private/Templates/ContainerRandUtilities.hpp" 36 | #undef CONTAINER_RAND_UTILITIES_HPP -------------------------------------------------------------------------------- /StarfireMessenger/Source/MDMetaDataEditor/Private/Customizations/MDMetaDataEditorStructCustomization.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dylan Dumesnil. All Rights Reserved. 2 | 3 | #include "MDMetaDataEditorStructCustomization.h" 4 | 5 | #include "Config/MDMetaDataEditorConfig.h" 6 | #include "Customizations/MDMetaDataEditorFieldView.h" 7 | #include "DetailLayoutBuilder.h" 8 | #include "Engine/UserDefinedStruct.h" 9 | #include "Kismet2/StructureEditorUtils.h" 10 | 11 | FMDMetaDataEditorStructCustomization::FMDMetaDataEditorStructCustomization(TWeakPtr InStructMetaDataView) 12 | : FMDMetaDataEditorCustomizationBase(nullptr, nullptr) 13 | , StructMetaDataViewPtr(InStructMetaDataView) 14 | { 15 | 16 | } 17 | 18 | void FMDMetaDataEditorStructCustomization::CustomizeObject(IDetailLayoutBuilder& DetailLayout, UObject* Obj) 19 | { 20 | UUserDefinedStruct* UserDefinedStruct = Cast(Obj); 21 | if (IsValid(UserDefinedStruct)) 22 | { 23 | UserDefinedStructPtr = UserDefinedStruct; 24 | 25 | TMap GroupMap; 26 | StructFieldView = MakeShared(UserDefinedStruct); 27 | StructFieldView->RequestRefresh.BindSP(this, &FMDMetaDataEditorStructCustomization::RefreshDetails); 28 | StructFieldView->GenerateMetadataEditor(DetailLayout, GroupMap); 29 | 30 | for (TFieldIterator PropertyIter(UserDefinedStruct); PropertyIter; ++PropertyIter) 31 | { 32 | TSharedPtr PropertyFieldView = MakeShared(*PropertyIter, UserDefinedStruct); 33 | PropertyFieldView->RequestRefresh.BindSP(this, &FMDMetaDataEditorStructCustomization::RefreshDetails); 34 | PropertyFieldView->GenerateMetadataEditor(DetailLayout, GroupMap); 35 | PropertyFieldViews.Emplace(MoveTemp(PropertyFieldView)); 36 | } 37 | } 38 | } 39 | 40 | void FMDMetaDataEditorStructCustomization::RefreshDetails() 41 | { 42 | FMDMetaDataEditorCustomizationBase::RefreshDetails(); 43 | 44 | FStructureEditorUtils::OnStructureChanged(UserDefinedStructPtr.Get()); 45 | } 46 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/SaveDataExample/Public/SaveGames/GameSaveDataVersion.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // ReSharper disable once CppUnusedIncludeDirective 5 | #include "SaveData/SaveDataVersion.h" 6 | 7 | #if !defined SF_BUILD_RTM 8 | #define SF_BUILD_RTM 0 9 | #endif 10 | 11 | #if WITH_EDITOR // Editor builds should be able to load development, regardless of branch 12 | #define SF_SAVES_ALLOW_DEV 1 13 | #elif SF_BUILD_RTM // RTM builds should only load saves from RTM builds 14 | #define SF_SAVES_ALLOW_DEV 0 15 | #else // Any other build is a developer build 16 | #define SF_SAVES_ALLOW_DEV 1 17 | #endif 18 | 19 | // Versioning data for the save game data 20 | enum class EGameSaveDataVersion : uint32 21 | { 22 | Development = 0x00000001, 23 | 24 | // Add all format change versions above this entry 25 | Current_Plus_One, 26 | Latest = Current_Plus_One - 1, 27 | 28 | RTM = 0x80000000, 29 | 30 | // The minimum version allowed on either build 31 | Development_Minimum = Development, 32 | RTM_Minimum = RTM | Development, 33 | 34 | #if !SF_BUILD_RTM 35 | Build_Minimum = Development_Minimum, 36 | #else 37 | Build_Minimum = RTM_Minimum, 38 | #endif 39 | 40 | // The current version for this type of build 41 | #if !SF_BUILD_RTM 42 | Build_Latest = Latest, 43 | #else 44 | Build_Latest = RTM | Latest, 45 | #endif 46 | }; 47 | 48 | // Utility for stripping the RTM bit from a version so that versioning can be compared across build types 49 | constexpr EGameSaveDataVersion GameSaveData_StripRTM( EGameSaveDataVersion Version ) { return (EGameSaveDataVersion)((int)Version & ~(int)EGameSaveDataVersion::RTM); } 50 | 51 | static_assert( GameSaveData_StripRTM(EGameSaveDataVersion::RTM_Minimum) >= EGameSaveDataVersion::Development_Minimum, "RTM shouldn't have a lower minimum version than Development!" ); 52 | static_assert( EGameSaveDataVersion::Current_Plus_One < EGameSaveDataVersion::RTM, "SaveData Version value collision!" ); // just in case 53 | 54 | // Utility to get the build agnostic save game version that is associated with an Archive 55 | SAVEDATAEXAMPLE_API EGameSaveDataVersion Ex_GetSaveGameVersion( const FArchive &Ar ); 56 | -------------------------------------------------------------------------------- /StarfirePersistence/Source/StarfirePersistence/Public/PersistenceManager.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "Subsystems/WorldSubsystem.h" 5 | 6 | #include "PersistenceManager.generated.h" 7 | 8 | // Manager for tracking alive and destroyed persistent actors 9 | UCLASS( BlueprintType ) 10 | class STARFIREPERSISTENCE_API UPersistenceManager : public UWorldSubsystem 11 | { 12 | GENERATED_BODY( ) 13 | public: 14 | // Native accessor to the subsystem 15 | [[nodiscard]] static UPersistenceManager* GetSubsystem( const UObject *WorldContext ); 16 | 17 | // Find an actor based on the GUID 18 | [[nodiscard]] TOptional< AActor* > FindActor( const FGuid &ID ) const; 19 | 20 | // Track actors that have been destroyed and that state should be persisted on load 21 | UFUNCTION( BlueprintCallable ) 22 | void TrackActorAsDestroyed( AActor *Actor ); 23 | void TrackActorAsDestroyed( const FGuid &ID ); 24 | 25 | // Clear the tracking of a destroyed actor (actor will be present on next load) 26 | UFUNCTION( BlueprintCallable ) 27 | void ClearTrackedActor( const FGuid &ID ); 28 | 29 | // World Subsystem API 30 | void OnWorldBeginPlay( UWorld &InWorld ) override; 31 | bool DoesSupportWorldType( const EWorldType::Type WorldType ) const override; 32 | 33 | // Subsystem API 34 | void Deinitialize( ) override; 35 | 36 | protected: 37 | friend class UPersistenceComponent; 38 | friend class FPersistentActorWriter; 39 | friend class FPersistentActorReader; 40 | 41 | // Internal management of actor tracking 42 | void AddSpawnedActor( AActor *Actor, const FGuid &ID ); 43 | void RemoveSpawnedActor( const FGuid &ID ); 44 | 45 | // Hooks into the level loading process 46 | void OnLevelVisible( UWorld *World, const ULevelStreaming *StreamingLevel, ULevel *LoadedLevel ); 47 | void OnLevelInvisible( UWorld *World, const ULevelStreaming *StreamingLevel, ULevel *LoadedLevel ); 48 | 49 | // Collection of id's of the destroyed actors that should be re-destroyed on next load 50 | TSet< FGuid > DestroyedActors; 51 | 52 | // The collection of all known persistent actors 53 | UPROPERTY( ) 54 | TMap< FGuid, TObjectPtr< AActor > > PersistentActors; 55 | }; 56 | -------------------------------------------------------------------------------- /StarfireSaveData/Source/StarfireSaveData/Public/SaveData/SaveData.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "UObject/Object.h" 5 | 6 | #include "SaveData.generated.h" 7 | 8 | // Options available for modifying the Serialize To/From Bytes calls 9 | struct FSerializeBytesOptions 10 | { 11 | // Configures the 'WantsBinarySerialization' option of FArchive 12 | bool bWantBinary = false; 13 | 14 | // Configures the 'ArIsSaveGame' option of FArchive 15 | bool bSaveGame = false; 16 | }; 17 | 18 | // Base class for save game data compatible with custom core save utilities 19 | UCLASS( Abstract ) 20 | class STARFIRESAVEDATA_API USaveData : public UObject 21 | { 22 | GENERATED_BODY( ) 23 | public: 24 | // The engine version at the time this save was created 25 | UPROPERTY( ) 26 | uint32 PackageVersion = (uint32)EUnrealEngineObjectUE5Version::AUTOMATIC_VERSION; 27 | 28 | // Our custom version of the engine at the time this save was created 29 | UPROPERTY( ) 30 | int32 LicenseeVersion = GPackageFileLicenseeUEVersion; 31 | 32 | // A custom version specific to the game 33 | UPROPERTY( ) 34 | uint32 GameVersion = 0; 35 | 36 | // The content packages that were enabled for that play session 37 | UPROPERTY( ) 38 | TArray< FString > ContentFeatures; 39 | 40 | // Fill the CoreSaveGame members with data for the specified world context 41 | void FillCoreData( const UObject *WorldContext, uint32 InGameVersion ); 42 | 43 | // Hooks for save game version-ing information 44 | [[nodiscard]] virtual bool IsCompatible( uint32 InVersion ) const { return true; } 45 | 46 | // Configure an archive with all the applicable version information 47 | void ConfigureArchiveVersions( FArchive &Ar ) const; 48 | // Utility to convert an object into a collection of bytes 49 | void SerializeToBytes( UObject *Object, TArray< uint8 > &Bytes, const FSerializeBytesOptions &Options = { } ) const; 50 | // Utility to convert a collection of bytes back into an object 51 | void SerializeFromBytes( UObject *Object, const TArray< uint8 > &Bytes, const FSerializeBytesOptions &Options = { } ) const; 52 | 53 | // UObject API 54 | bool IsPostLoadThreadSafe( ) const override { return true; } 55 | }; --------------------------------------------------------------------------------