Renamed files

This commit is contained in:
LongLy 2025-01-09 16:05:57 -07:00
parent 2a6162c728
commit c1fd9b2c95
11 changed files with 36 additions and 37 deletions

View File

@ -1,7 +1,7 @@
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action. // © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
#include "DataAssets/OLSExperienceActionSet.h" #include "DataAssets/OLSExperienceActionSetDataAsset.h"
#if WITH_EDITOR #if WITH_EDITOR
#include "Misc/DataValidation.h" #include "Misc/DataValidation.h"
@ -14,7 +14,7 @@
#define LOCTEXT_NAMESPACE "OLSSystem" #define LOCTEXT_NAMESPACE "OLSSystem"
#if WITH_EDITOR #if WITH_EDITOR
EDataValidationResult UOLSExperienceActionSet::IsDataValid(FDataValidationContext& context) const EDataValidationResult UOLSExperienceActionSetDataAsset::IsDataValid(FDataValidationContext& context) const
{ {
EDataValidationResult result = CombineDataValidationResults(Super::IsDataValid(context), EDataValidationResult::Valid); EDataValidationResult result = CombineDataValidationResults(Super::IsDataValid(context), EDataValidationResult::Valid);
@ -40,7 +40,7 @@ EDataValidationResult UOLSExperienceActionSet::IsDataValid(FDataValidationContex
#endif #endif
#if WITH_EDITORONLY_DATA #if WITH_EDITORONLY_DATA
void UOLSExperienceActionSet::UpdateAssetBundleData() void UOLSExperienceActionSetDataAsset::UpdateAssetBundleData()
{ {
Super::UpdateAssetBundleData(); Super::UpdateAssetBundleData();

View File

@ -1,7 +1,7 @@
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action. // © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
#include "DataAssets/OLSExperienceDefinitionPrimaryDataAsset.h" #include "DataAssets/OLSExperienceDefinitionDataAsset.h"
#include "GameFeatureAction.h" #include "GameFeatureAction.h"
#if WITH_EDITOR #if WITH_EDITOR
@ -12,12 +12,12 @@
#define LOCTEXT_NAMESPACE "OLSSystem" #define LOCTEXT_NAMESPACE "OLSSystem"
UOLSExperienceDefinitionPrimaryDataAsset::UOLSExperienceDefinitionPrimaryDataAsset() UOLSExperienceDefinitionDataAsset::UOLSExperienceDefinitionDataAsset()
{ {
} }
#if WITH_EDITOR #if WITH_EDITOR
EDataValidationResult UOLSExperienceDefinitionPrimaryDataAsset::IsDataValid(FDataValidationContext& context) const EDataValidationResult UOLSExperienceDefinitionDataAsset::IsDataValid(FDataValidationContext& context) const
{ {
EDataValidationResult result = CombineDataValidationResults(Super::IsDataValid(context), EDataValidationResult::Valid); EDataValidationResult result = CombineDataValidationResults(Super::IsDataValid(context), EDataValidationResult::Valid);
@ -64,13 +64,13 @@ EDataValidationResult UOLSExperienceDefinitionPrimaryDataAsset::IsDataValid(FDat
} }
#endif #endif
FString UOLSExperienceDefinitionPrimaryDataAsset::GetIdentifierString() const FString UOLSExperienceDefinitionDataAsset::GetIdentifierString() const
{ {
return GetPrimaryAssetId().ToString(); return GetPrimaryAssetId().ToString();
} }
#if WITH_EDITOR #if WITH_EDITOR
void UOLSExperienceDefinitionPrimaryDataAsset::UpdateAssetBundleData() void UOLSExperienceDefinitionDataAsset::UpdateAssetBundleData()
{ {
Super::UpdateAssetBundleData(); Super::UpdateAssetBundleData();

View File

@ -1,9 +1,9 @@
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action. // © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
#include "DataAssets/OLSPawnPrimaryDataAsset.h" #include "DataAssets/OLSPawnDataAsset.h"
UOLSPawnPrimaryDataAsset::UOLSPawnPrimaryDataAsset(const FObjectInitializer& objectInitializer) UOLSPawnDataAsset::UOLSPawnDataAsset(const FObjectInitializer& objectInitializer)
: Super(objectInitializer) : Super(objectInitializer)
{ {
PawnClass = nullptr; PawnClass = nullptr;
@ -14,7 +14,7 @@ UOLSPawnPrimaryDataAsset::UOLSPawnPrimaryDataAsset(const FObjectInitializer& obj
// DefaultCameraMode = nullptr; // DefaultCameraMode = nullptr;
} }
FString UOLSPawnPrimaryDataAsset::GetIdentifierString() const FString UOLSPawnDataAsset::GetIdentifierString() const
{ {
return GetPrimaryAssetId().ToString(); return GetPrimaryAssetId().ToString();
} }

View File

@ -9,8 +9,8 @@
#include "GameFeatureAction.h" #include "GameFeatureAction.h"
#include "GameFeaturesSubsystemSettings.h" #include "GameFeaturesSubsystemSettings.h"
#include "TimerManager.h" #include "TimerManager.h"
#include "DataAssets/OLSExperienceActionSet.h" #include "DataAssets/OLSExperienceActionSetDataAsset.h"
#include "DataAssets/OLSExperienceDefinitionPrimaryDataAsset.h" #include "DataAssets/OLSExperienceDefinitionDataAsset.h"
#include "Net/UnrealNetwork.h" #include "Net/UnrealNetwork.h"
#include "Systems/OLSAssetManager.h" #include "Systems/OLSAssetManager.h"
@ -138,7 +138,7 @@ bool UOLSExperienceManagerComponent::ShouldShowLoadingScreen(FString& outReason)
return false; return false;
} }
const UOLSExperienceDefinitionPrimaryDataAsset* UOLSExperienceManagerComponent::GetCurrentExperienceChecked() const const UOLSExperienceDefinitionDataAsset* UOLSExperienceManagerComponent::GetCurrentExperienceChecked() const
{ {
check(LoadState == EOLSExperienceLoadState::Loaded); check(LoadState == EOLSExperienceLoadState::Loaded);
check(CurrentExperience != nullptr); check(CurrentExperience != nullptr);
@ -149,9 +149,9 @@ void UOLSExperienceManagerComponent::SetCurrentExperience(FPrimaryAssetId experi
{ {
UOLSAssetManager& assetManager = UOLSAssetManager::Get(); UOLSAssetManager& assetManager = UOLSAssetManager::Get();
FSoftObjectPath assetPath = assetManager.GetPrimaryAssetPath(experienceId); FSoftObjectPath assetPath = assetManager.GetPrimaryAssetPath(experienceId);
TSubclassOf<UOLSExperienceDefinitionPrimaryDataAsset> assetClass = Cast<UClass>(assetPath.TryLoad()); TSubclassOf<UOLSExperienceDefinitionDataAsset> assetClass = Cast<UClass>(assetPath.TryLoad());
check(assetClass); check(assetClass);
const UOLSExperienceDefinitionPrimaryDataAsset* experience = GetDefault<UOLSExperienceDefinitionPrimaryDataAsset>(assetClass); const UOLSExperienceDefinitionDataAsset* experience = GetDefault<UOLSExperienceDefinitionDataAsset>(assetClass);
check(experience != nullptr); check(experience != nullptr);
check(CurrentExperience == nullptr); check(CurrentExperience == nullptr);
@ -226,7 +226,7 @@ void UOLSExperienceManagerComponent::StartExperienceLoad()
bundleAssetList.Add(CurrentExperience->GetPrimaryAssetId()); bundleAssetList.Add(CurrentExperience->GetPrimaryAssetId());
for (const TObjectPtr<UOLSExperienceActionSet>& actionSet : CurrentExperience->ActionSets) for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
{ {
if (actionSet != nullptr) if (actionSet != nullptr)
{ {

View File

@ -24,7 +24,7 @@ const T* AOLSPlayerState::GetPawnData() const
return Cast<T>(PawnData); return Cast<T>(PawnData);
} }
void AOLSPlayerState::SetPawnData(const UOLSPawnPrimaryDataAsset* pawnData) void AOLSPlayerState::SetPawnData(const UOLSPawnDataAsset* pawnData)
{ {
check(pawnData); check(pawnData);

View File

@ -4,7 +4,7 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameplayTagContainer.h" #include "GameplayTagContainer.h"
#include "OLSPawnPrimaryDataAsset.h" #include "OLSPawnDataAsset.h"
#include "OLSAbilitySetPrimaryDataAsset.generated.h" #include "OLSAbilitySetPrimaryDataAsset.generated.h"
/** /**
* /** * /**
@ -104,7 +104,7 @@ protected:
}; };
UCLASS() UCLASS()
class OLS_API UOLSAbilitySetPrimaryDataAsset : public UOLSPawnPrimaryDataAsset class OLS_API UOLSAbilitySetPrimaryDataAsset : public UOLSPawnDataAsset
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -3,14 +3,14 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "OLSPawnPrimaryDataAsset.h" #include "OLSPawnDataAsset.h"
#include "OLSExperienceActionSet.generated.h" #include "OLSExperienceActionSetDataAsset.generated.h"
/** /**
* Definition of a set of actions to perform as part of entering an experience * Definition of a set of actions to perform as part of entering an experience
*/ */
UCLASS(BlueprintType, NotBlueprintable) UCLASS(BlueprintType, NotBlueprintable)
class OLS_API UOLSExperienceActionSet : public UOLSPawnPrimaryDataAsset class OLS_API UOLSExperienceActionSetDataAsset : public UOLSPrimaryDataAsset
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -5,19 +5,19 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "DataAssets/OLSPrimaryDataAsset.h" #include "DataAssets/OLSPrimaryDataAsset.h"
#include "Engine/DataAsset.h" #include "Engine/DataAsset.h"
#include "OLSExperienceDefinitionPrimaryDataAsset.generated.h" #include "OLSExperienceDefinitionDataAsset.generated.h"
/** /**
* Definition of an experience * Definition of an experience
*/ */
UCLASS(BlueprintType, Const) UCLASS(BlueprintType, Const)
class OLS_API UOLSExperienceDefinitionPrimaryDataAsset : public UOLSPrimaryDataAsset class OLS_API UOLSExperienceDefinitionDataAsset : public UOLSPrimaryDataAsset
{ {
GENERATED_BODY() GENERATED_BODY()
public: public:
UOLSExperienceDefinitionPrimaryDataAsset(); UOLSExperienceDefinitionDataAsset();
//~ Begin UObject interface //~ Begin UObject interface
#if WITH_EDITOR #if WITH_EDITOR
@ -43,7 +43,7 @@ public:
/** The default pawn class to spawn for players */ /** The default pawn class to spawn for players */
UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition") UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
TObjectPtr<const class UOLSPawnPrimaryDataAsset> DefaultPawnData = nullptr; TObjectPtr<const class UOLSPawnDataAsset> DefaultPawnData = nullptr;
// List of actions to perform as this experience is loaded/activated/deactivated/unloaded // List of actions to perform as this experience is loaded/activated/deactivated/unloaded
UPROPERTY(EditDefaultsOnly, Instanced, Category = "OLSExperienceDefinition") UPROPERTY(EditDefaultsOnly, Instanced, Category = "OLSExperienceDefinition")
@ -51,5 +51,5 @@ public:
// List of additional action sets to compose into this experience // List of additional action sets to compose into this experience
UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition") UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
TArray<TObjectPtr<class UOLSExperienceActionSet>> ActionSets; TArray<TObjectPtr<class UOLSExperienceActionSetDataAsset>> ActionSets;
}; };

View File

@ -5,8 +5,7 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "OLSPrimaryDataAsset.h" #include "OLSPrimaryDataAsset.h"
#include "Engine/DataAsset.h" #include "Engine/DataAsset.h"
#include "Interfaces/OLSPrimaryDataAssetInterface.h" #include "OLSPawnDataAsset.generated.h"
#include "OLSPawnPrimaryDataAsset.generated.h"
/** /**
* UOLSPawnPrimaryDataAsset * UOLSPawnPrimaryDataAsset
@ -14,13 +13,13 @@
* Non-mutable data asset that contains properties used to define a pawn. * Non-mutable data asset that contains properties used to define a pawn.
*/ */
UCLASS(BlueprintType, Const, Meta = (DisplayName = "OLS Pawn Primary Data", ShortTooltip = "Data asset used to define a Pawn.")) UCLASS(BlueprintType, Const, Meta = (DisplayName = "OLS Pawn Primary Data", ShortTooltip = "Data asset used to define a Pawn."))
class OLS_API UOLSPawnPrimaryDataAsset : public UOLSPrimaryDataAsset class OLS_API UOLSPawnDataAsset : public UOLSPrimaryDataAsset
{ {
GENERATED_BODY() GENERATED_BODY()
public: public:
UOLSPawnPrimaryDataAsset(const FObjectInitializer& objectInitializer); UOLSPawnDataAsset(const FObjectInitializer& objectInitializer);
//~ Begin UOLSPrimaryDataAsset interface //~ Begin UOLSPrimaryDataAsset interface
virtual FString GetIdentifierString() const override; virtual FString GetIdentifierString() const override;

View File

@ -9,7 +9,7 @@
namespace UE::GameFeatures { struct FResult; } namespace UE::GameFeatures { struct FResult; }
DECLARE_MULTICAST_DELEGATE_OneParam(FOnOLSExperienceLoaded, const class UOLSExperienceDefinitionPrimaryDataAsset* /*experience*/); DECLARE_MULTICAST_DELEGATE_OneParam(FOnOLSExperienceLoaded, const class UOLSExperienceDefinitionDataAsset* /*experience*/);
enum class EOLSExperienceLoadState enum class EOLSExperienceLoadState
{ {
@ -44,7 +44,7 @@ public:
// This returns the current experience if it is fully loaded, asserting otherwise // This returns the current experience if it is fully loaded, asserting otherwise
// (i.e., if you called it too soon) // (i.e., if you called it too soon)
const UOLSExperienceDefinitionPrimaryDataAsset* GetCurrentExperienceChecked() const; const UOLSExperienceDefinitionDataAsset* GetCurrentExperienceChecked() const;
// Tries to set the current experience, either a UI or gameplay one // Tries to set the current experience, either a UI or gameplay one
void SetCurrentExperience(FPrimaryAssetId experienceId); void SetCurrentExperience(FPrimaryAssetId experienceId);
@ -83,7 +83,7 @@ private:
private: private:
UPROPERTY(ReplicatedUsing = OnRep_CurrentExperience) UPROPERTY(ReplicatedUsing = OnRep_CurrentExperience)
TObjectPtr<const class UOLSExperienceDefinitionPrimaryDataAsset> CurrentExperience = nullptr; TObjectPtr<const class UOLSExperienceDefinitionDataAsset> CurrentExperience = nullptr;
private: private:

View File

@ -39,7 +39,7 @@ public:
template <class T> template <class T>
const T* GetPawnData() const; const T* GetPawnData() const;
void SetPawnData(const class UOLSPawnPrimaryDataAsset* pawnData); void SetPawnData(const class UOLSPawnDataAsset* pawnData);
protected: protected:
@ -49,5 +49,5 @@ protected:
protected: protected:
UPROPERTY(ReplicatedUsing = OnRep_PawnData) UPROPERTY(ReplicatedUsing = OnRep_PawnData)
TObjectPtr<const class UOLSPawnPrimaryDataAsset> PawnData = nullptr; TObjectPtr<const class UOLSPawnDataAsset> PawnData = nullptr;
}; };