Compare commits
8 Commits
33b3723b82
...
old_repo_o
| Author | SHA1 | Date | |
|---|---|---|---|
| d97ee1d302 | |||
| 1b5d2a3ff6 | |||
| ca779b627b | |||
| a885201b81 | |||
| 07c5420bc2 | |||
| fe2abe1972 | |||
| e8fb014d29 | |||
| c4e40037ed |
51
.gitignore
vendored
51
.gitignore
vendored
@@ -1,31 +1,38 @@
|
||||
Project/Binaries
|
||||
Project/Intermediate
|
||||
Project/Saved/Crashes
|
||||
Project/Saved/SourceControl
|
||||
Project/Saved/ShaderDebugInfo
|
||||
Project/Saved/Logs
|
||||
Project/Saved/Autosaves
|
||||
Project/Saved/Config/CrashReportClient
|
||||
Project/Saved/Config/WindowsEditor
|
||||
Project/Saved/Config/WorldState
|
||||
Project/Saved/AutoScreenshot.png
|
||||
Project/Platforms
|
||||
*/Binaries/Win64/*.patch_*.*
|
||||
|
||||
Project/.idea
|
||||
Project/.vs
|
||||
Project/.vsconfig
|
||||
*.sln
|
||||
*.target
|
||||
*.modules
|
||||
Project/.idea
|
||||
|
||||
Project/Saved/Screenshots
|
||||
*/Binaries/Win64/*.patch_*.*
|
||||
Project/Saved/ImGui
|
||||
Project/Saved/ImGui/imgui.ini
|
||||
GasaGen_*.pdb
|
||||
Project/Binaries
|
||||
Project/Binaries/GasaGen.exe
|
||||
Project/Binaries/GasaGen.map
|
||||
Project/Binaries/GasaGen.obj
|
||||
Project/Binaries/vc140.pdb
|
||||
|
||||
Project/Intermediate
|
||||
|
||||
Project/Platforms
|
||||
|
||||
Project/Saved/Config/ConsoleHistory.ini
|
||||
*.pdb
|
||||
|
||||
Project/Saved/Autosaves
|
||||
Project/Saved/AutoScreenshot.png
|
||||
Project/Saved/Config/CrashReportClient
|
||||
Project/Saved/Config/WindowsEditor
|
||||
Project/Saved/Config/WorldState
|
||||
Project/Saved/Crashes
|
||||
Project/Saved/Diff
|
||||
Project/Saved/ImGui
|
||||
Project/Saved/ImGui/imgui.ini
|
||||
Project/Saved/Logs
|
||||
Project/Saved/Screenshots
|
||||
Project/Saved/ShaderDebugInfo
|
||||
Project/Saved/SourceControl
|
||||
|
||||
*.modules
|
||||
*.pdb
|
||||
*.sln
|
||||
*.target
|
||||
|
||||
GasaGen_*.pdb
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -49,6 +49,15 @@ r.ReflectionMethod=1
|
||||
r.Shadow.Virtual.Enable=1
|
||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
|
||||
r.CustomDepth=3
|
||||
r.DefaultFeature.Bloom=False
|
||||
r.DefaultFeature.AmbientOcclusion=False
|
||||
r.DefaultFeature.AmbientOcclusionStaticFraction=False
|
||||
r.DefaultFeature.AutoExposure=False
|
||||
r.DefaultFeature.MotionBlur=False
|
||||
r.AntiAliasingMethod=0
|
||||
r.MSAACount=1
|
||||
r.ScreenPercentage.Default=25.000000
|
||||
r.SupportSkyAtmosphere=False
|
||||
|
||||
[/Script/WorldPartitionEditor.WorldPartitionEditorSettings]
|
||||
CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet'
|
||||
@@ -130,3 +139,4 @@ ManualIPAddress=
|
||||
+CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic")
|
||||
+CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle")
|
||||
+CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn")
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Tag_GlobalPPV=Global_PPV
|
||||
Template_PlayerCamera=/Game/Actors/BP_CameraMount.BP_CameraMount_C
|
||||
Template_HUD_HostUI=/Game/UI/UI_Host.UI_Host_C
|
||||
Template_HostWidgetController=/Game/UI/BP_HostWidgetController.BP_HostWidgetController_C
|
||||
TaggedMessageTable=/Game/Core/Tables/DT_TaggedMessages.DT_TaggedMessages
|
||||
|
||||
[/Script/GameplayAbilities.AbilitySystemGlobals]
|
||||
bUseDebugTargetFromHud=true
|
||||
|
||||
@@ -6,11 +6,15 @@ AllowEditorTagUnloading=True
|
||||
AllowGameTagUnloading=False
|
||||
FastReplication=False
|
||||
InvalidTagCharacters="\"\',"
|
||||
+GameplayTagTableList=/Game/Core/DT_PrimaryAttributes.DT_PrimaryAttributes
|
||||
+GameplayTagTableList=/Game/Core/Tables/DT_PrimaryAttributes.DT_PrimaryAttributes
|
||||
NumBitsForContainerSize=6
|
||||
NetIndexFirstBitSegment=16
|
||||
+GameplayTagList=(Tag="Attributes.Vital.Health",DevComment="")
|
||||
+GameplayTagList=(Tag="Attributes.Vital.Mana",DevComment="")
|
||||
+GameplayTagList=(Tag="Attributes.Vital.MaxHealth",DevComment="")
|
||||
+GameplayTagList=(Tag="Attributes.Vital.MaxMana",DevComment="")
|
||||
+GameplayTagList=(Tag="Message.Crystal.Health",DevComment="")
|
||||
+GameplayTagList=(Tag="Message.Crystal.Mana",DevComment="")
|
||||
+GameplayTagList=(Tag="Message.Potion.Health",DevComment="")
|
||||
+GameplayTagList=(Tag="Message.Potion.Mana",DevComment="")
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Project/Content/Core/DT_TaggedMessages.uasset
LFS
Normal file
BIN
Project/Content/Core/DT_TaggedMessages.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Project/Content/Core/Tables/CT_Potion.uasset
LFS
Normal file
BIN
Project/Content/Core/Tables/CT_Potion.uasset
LFS
Normal file
Binary file not shown.
BIN
Project/Content/Core/Tables/DT_PrimaryAttributes.uasset
LFS
Normal file
BIN
Project/Content/Core/Tables/DT_PrimaryAttributes.uasset
LFS
Normal file
Binary file not shown.
BIN
Project/Content/Core/Tables/DT_TaggedMessages.uasset
LFS
Normal file
BIN
Project/Content/Core/Tables/DT_TaggedMessages.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Project/Content/UI/DT_StyleText_EffectMessage.uasset
LFS
Normal file
BIN
Project/Content/UI/DT_StyleText_EffectMessage.uasset
LFS
Normal file
Binary file not shown.
BIN
Project/Content/UI/Globes/MI_BlackBG.uasset
LFS
Normal file
BIN
Project/Content/UI/Globes/MI_BlackBG.uasset
LFS
Normal file
Binary file not shown.
BIN
Project/Content/UI/RTD_Default.uasset
LFS
Normal file
BIN
Project/Content/UI/RTD_Default.uasset
LFS
Normal file
Binary file not shown.
BIN
Project/Content/UI/UI_EffectMessage.uasset
LFS
Normal file
BIN
Project/Content/UI/UI_EffectMessage.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ColumnWidths":
|
||||
{
|
||||
"TextStyle": 1099
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ColumnWidths":
|
||||
{
|
||||
"Image": 487,
|
||||
"Tag": 246,
|
||||
"Message": 439,
|
||||
"MessageTemplate": 232
|
||||
}
|
||||
}
|
||||
@@ -1 +1,33 @@
|
||||
#include "GasaAbilitySystemComponent.h"
|
||||
#include "GasaAbilitySystemComponent.h"
|
||||
|
||||
#include "Engine/Engine.h"
|
||||
#include "Engine/GameViewportClient.h"
|
||||
#include "Game/GasaGameState.h"
|
||||
#include "Game/GasaPlayerController.h"
|
||||
#include "GameFramework/HUD.h"
|
||||
#include "Slate/SceneViewport.h"
|
||||
#include "UI/GasaHUD.h"
|
||||
#include "CogDebugDraw.h"
|
||||
|
||||
|
||||
using namespace Gasa;
|
||||
|
||||
void UGasaAbilitySystemComp::OnAbilityActorInfoSet()
|
||||
{
|
||||
if ( ! OnGameplayEffectAppliedDelegateToSelf.IsBoundToObject(this))
|
||||
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, & ThisClass::EffectApplied);
|
||||
}
|
||||
|
||||
void UGasaAbilitySystemComp::EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec,
|
||||
FActiveGameplayEffectHandle ActiveEffect)
|
||||
{
|
||||
Log("EFFECT APPLIED?");
|
||||
FGameplayTagContainer Tags;
|
||||
Spec.GetAllAssetTags(Tags);
|
||||
Event_OnEffectAppliedAssetTags.Broadcast(Tags);
|
||||
}
|
||||
|
||||
void UGasaAbilitySystemComp::InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor)
|
||||
{
|
||||
Super::InitAbilityActorInfo(InOwnerActor, InAvatarActor);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "AbilitySystemComponent.h"
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
||||
#include "GasaAbilitySystemComponent.generated.h"
|
||||
|
||||
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FEffectAssetTagsSig, FGameplayTagContainer const& /*Tags*/);
|
||||
|
||||
|
||||
UCLASS(BlueprintType)
|
||||
class GASA_API UGasaAbilitySystemComp : public UAbilitySystemComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
};
|
||||
|
||||
FEffectAssetTagsSig Event_OnEffectAppliedAssetTags;
|
||||
|
||||
void OnAbilityActorInfoSet();
|
||||
|
||||
void EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec, FActiveGameplayEffectHandle ActiveEffect);
|
||||
|
||||
#pragma region AbilitySystemComponent
|
||||
void InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor) override;
|
||||
#pragma endregion AbilitySystemComponent
|
||||
};
|
||||
@@ -155,12 +155,13 @@ void AGasaCharacter::PossessedBy(AController* NewController)
|
||||
if (GetMesh() && IsReplicatingMovement() && (GetRemoteRole() == ROLE_AutonomousProxy && GetNetConnection() != nullptr))
|
||||
GetMesh()->bOnlyAllowAutonomousTickPose = true;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (bAutoAbilitySystem)
|
||||
{
|
||||
// TODO(Ed): Do we need to do this for enemies?
|
||||
AbilitySystem->InitAbilityActorInfo(this, this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AGasaCharacter::SetPlayerDefaults()
|
||||
@@ -179,10 +180,12 @@ void AGasaCharacter::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
// TODO(Ed): Find out if this is the best spot todo this
|
||||
// There is also OnPossessed, PostInitializeComponents, etc...
|
||||
if (bAutoAbilitySystem)
|
||||
{
|
||||
// TODO(Ed): Do we need to do this for enemies?
|
||||
AbilitySystem->InitAbilityActorInfo(this, this);
|
||||
Cast<UGasaAbilitySystemComp>(AbilitySystem)->OnAbilityActorInfoSet();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,8 +232,7 @@ void AGasaGameMode::HandleSeamlessTravelPlayer(AController*& Controller)
|
||||
|
||||
void AGasaGameMode::InitializeHUDForPlayer_Implementation(APlayerController* NewPlayer)
|
||||
{
|
||||
// Super::InitializeHUDForPlayer_Implementation(NewPlayer);
|
||||
NewPlayer->ClientSetHUD(HUDClass);
|
||||
Super::InitializeHUDForPlayer_Implementation(NewPlayer);
|
||||
}
|
||||
|
||||
void AGasaGameMode::InitSeamlessTravelPlayer(AController* NewController)
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
#include "GasaGameState.h"
|
||||
|
||||
#include "CogAll.h"
|
||||
#include "CogWindowManager.h"
|
||||
#include "GasaPlayerState.h"
|
||||
#include "GasaGameInstance.h"
|
||||
#include "Net/UnrealNetwork.h"
|
||||
#include "Networking/GasaNetLibrary_Inlines.h"
|
||||
using namespace Gasa;
|
||||
|
||||
AGasaGameState::AGasaGameState()
|
||||
{
|
||||
// Enable ticking
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
PrimaryActorTick.SetTickFunctionEnable(true);
|
||||
PrimaryActorTick.bStartWithTickEnabled = true;
|
||||
|
||||
// Replication
|
||||
bReplicates = true;
|
||||
bNetLoadOnClient = false;
|
||||
NetDormancy = DORM_Awake;
|
||||
NetCullDistanceSquared = NetCullDist_Default;
|
||||
NetUpdateFrequency = 10.0f;
|
||||
MinNetUpdateFrequency = 1.0f;
|
||||
NetPriority = 5.0f;
|
||||
}
|
||||
|
||||
#pragma region GameFramework
|
||||
void AGasaGameState::OnGameFrameworkInitialized()
|
||||
{
|
||||
NetLog("Received gameplay framework initialization.");
|
||||
if (IsServer())
|
||||
{
|
||||
if (PlayerArray.Num() > 0)
|
||||
{
|
||||
ListenServerHost = Cast<AGasaPlayerState>(PlayerArray[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
NetLog("Was not able to assign HostingPlayer!", ELogV::Error);
|
||||
}
|
||||
}
|
||||
BP_OnGameFrameworkInitialized();
|
||||
}
|
||||
#pragma endregion GameFramework
|
||||
|
||||
#pragma region Networking
|
||||
void AGasaGameState::Client_OnRep_OnlinePlayers()
|
||||
{
|
||||
}
|
||||
#pragma endregion Networking
|
||||
|
||||
#pragma region Seamless Travel
|
||||
void AGasaGameState::Multicast_R_NotifySeamlessTravelEnd_Implementation()
|
||||
{
|
||||
NetLog("Multicast_R_NotifySeamlessTravelEnd_Implementation");
|
||||
BP_Event_OnSeamlessTravelEnd.Broadcast();
|
||||
Event_OnSeamlessTravelEnd.Broadcast();
|
||||
}
|
||||
#pragma endregion Seamless Travel
|
||||
|
||||
#pragma region GameStateBase
|
||||
void AGasaGameState::HandleBeginPlay()
|
||||
{
|
||||
Super::HandleBeginPlay();
|
||||
NetLog("HandleBeginPlay: Directly called from GM");
|
||||
}
|
||||
|
||||
void AGasaGameState::SeamlessTravelTransitionCheckpoint(bool bToTransitionMap)
|
||||
{
|
||||
Super::SeamlessTravelTransitionCheckpoint(bToTransitionMap);
|
||||
NetLog("SeamlessTravelTransitionCheckpoint");
|
||||
NetLog(FString("ToTransitionMap: ") + FString(bToTransitionMap ? "true" : "false"));
|
||||
|
||||
if (bToTransitionMap)
|
||||
{
|
||||
Event_OnSeamlessTravelStart.Broadcast();
|
||||
}
|
||||
else
|
||||
{
|
||||
Multicast_R_NotifySeamlessTravelEnd();
|
||||
}
|
||||
}
|
||||
#pragma endregion GameStateBase
|
||||
|
||||
#pragma region Actor
|
||||
void AGasaGameState::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
NetLog("BeginPlay");
|
||||
|
||||
// Notified as initialized here as any possible components should also be initialized by this point.
|
||||
UGasaGameInstance*
|
||||
GI = GetGameInstance<UGasaGameInstance>();
|
||||
GI->Event_OnGameFrameworkInitialized.AddDynamic(this, & ThisClass::OnGameFrameworkInitialized);
|
||||
GI->NotifyGameFrameworkClassReady(EGameFrameworkClassFlag::GameState);
|
||||
|
||||
#if ENABLE_COG
|
||||
CogWindowManager = NewObject<UCogWindowManager>(this);
|
||||
CogWindowManagerRef = CogWindowManager;
|
||||
|
||||
// Add all the built-in windows
|
||||
Cog::AddAllWindows(*CogWindowManager);
|
||||
#endif //ENABLE_COG
|
||||
}
|
||||
|
||||
void AGasaGameState::PostInitializeComponents()
|
||||
{
|
||||
NetLog("PostInitializeComponents");
|
||||
Super::PostInitializeComponents();
|
||||
|
||||
if ( ! GetWorld()->IsEditorWorld() && IsServer())
|
||||
{
|
||||
OnlinePlayers.Empty();
|
||||
#if 0
|
||||
const auto GI = Cast<UGasaGameInstance>(GetGameInstance());
|
||||
if (GI != nullptr)
|
||||
{
|
||||
int32 NumConnections = GI->SessionSettings.bPublicGame
|
||||
? GI->SessionSettings.PublicConnections
|
||||
: GI->SessionSettings.PrivateConnections;
|
||||
OnlinePlayers.Init(nullptr, NumConnections);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void AGasaGameState::Tick(float DeltaSeconds)
|
||||
{
|
||||
Super::Tick(DeltaSeconds);
|
||||
|
||||
#if ENABLE_COG
|
||||
if (CogWindowManager)
|
||||
CogWindowManager->Tick(DeltaSeconds);
|
||||
#endif //ENABLE_COG
|
||||
}
|
||||
#pragma endregion Actor
|
||||
|
||||
#pragma region UObject
|
||||
void AGasaGameState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
|
||||
{
|
||||
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
||||
|
||||
DOREPLIFETIME(AGasaGameState, ListenServerHost);
|
||||
DOREPLIFETIME(AGasaGameState, OnlinePlayers);
|
||||
}
|
||||
#pragma endregion UObject
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Networking/GasaNetLibrary_Inlines.h"
|
||||
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "DrawDebugHelpers.h"
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
@@ -18,6 +19,7 @@
|
||||
#include "GasaGameInstance.h"
|
||||
#include "GasaGameState.h"
|
||||
#include "GasaPlayerState.h"
|
||||
#include "AbilitySystem/GasaAbilitySystemComponent.h"
|
||||
#include "Actors/CameraMount.h"
|
||||
#include "UI/GasaHUD.h"
|
||||
#include "UI/WidgetController.h"
|
||||
@@ -66,14 +68,18 @@ void AGasaPlayerController::NetOwner_OnReady()
|
||||
if (IsClient())
|
||||
ServerRPC_R_NotifyOwningClientReady();
|
||||
|
||||
Cam = GetWorld()->SpawnActor<ACameraMount>(GetDevOptions()->Template_PlayerCamera.Get(), FActorSpawnParameters() );
|
||||
SetViewTarget(Cam);
|
||||
|
||||
AGasaPlayerState* PS = GetPlayerState();
|
||||
APlayerCharacter* PlayerChar = GetPawn<APlayerCharacter>();
|
||||
{
|
||||
PlayerChar->AbilitySystem = PS->AbilitySystem;
|
||||
PlayerChar->Attributes = PS->Attributes;
|
||||
PlayerChar->AbilitySystem->InitAbilityActorInfo(PS, this);
|
||||
Cam->AttachToActor(PlayerChar, FAttachmentTransformRules::KeepRelativeTransform);
|
||||
PS->AbilitySystem->InitAbilityActorInfo(PS, PlayerChar);
|
||||
Cast<UGasaAbilitySystemComp>(PS->AbilitySystem)->OnAbilityActorInfoSet();
|
||||
}
|
||||
Cam->AttachToActor(PlayerChar, FAttachmentTransformRules::KeepRelativeTransform);
|
||||
}
|
||||
|
||||
void AGasaPlayerController::OnGameFrameworkInitialized()
|
||||
@@ -416,15 +422,11 @@ void AGasaPlayerController::BeginPlay()
|
||||
void AGasaPlayerController::PostInitializeComponents()
|
||||
{
|
||||
Super::PostInitializeComponents();
|
||||
|
||||
Cam = GetWorld()->SpawnActor<ACameraMount>(GetDevOptions()->Template_PlayerCamera.Get(), FActorSpawnParameters() );
|
||||
SetViewTarget(Cam);
|
||||
}
|
||||
|
||||
void AGasaPlayerController::Tick(float DeltaSeconds)
|
||||
{
|
||||
Super::Tick(DeltaSeconds);
|
||||
|
||||
#if 0
|
||||
switch (HighlightState)
|
||||
{
|
||||
|
||||
@@ -84,6 +84,15 @@ public class Gasa : ModuleRules
|
||||
PrivateIncludePathModuleNames.AddRange( new string[]
|
||||
{
|
||||
"CogCommon",
|
||||
"CogAbility",
|
||||
"CogAI",
|
||||
"CogAll",
|
||||
"CogDebug",
|
||||
"CogDebugEditor",
|
||||
"CogEngine",
|
||||
"CogImgui",
|
||||
"CogInput",
|
||||
"CogWindow",
|
||||
});
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
struct FInputActionValue;
|
||||
struct FGameplayEffectContextHandle;
|
||||
struct FGameplayEffectModCallbackData;
|
||||
struct FGameplayTagContainer;
|
||||
struct FOnAttributeChangeData;
|
||||
struct FReplicationFlags;
|
||||
|
||||
@@ -44,6 +45,7 @@ class UInputAction;
|
||||
class UInputMappingContext;
|
||||
class USphereComponent;
|
||||
class USpringArmComponent;
|
||||
class UTexture2D;
|
||||
#pragma endregion Engine Forwards
|
||||
|
||||
#pragma region Engine Plugin Forwards
|
||||
@@ -72,6 +74,7 @@ class UGasaObject;
|
||||
class UGasaOverlay;
|
||||
class UGasaProgressBar;
|
||||
class UGasaSizeBox;
|
||||
class UGasaUserWidget;
|
||||
class UHostWidgetController;
|
||||
class UHUDHostWidget;
|
||||
class UWidgetController;
|
||||
@@ -160,7 +163,8 @@ namespace Gasa
|
||||
|
||||
// Works for Unreal 5.4, Win64 MSVC (untested in other scenarios, for now)
|
||||
inline
|
||||
void Log( FString Message, EGasaVerbosity Verbosity = EGasaVerbosity::Log
|
||||
void Log( FString Message
|
||||
, EGasaVerbosity Verbosity = EGasaVerbosity::Log
|
||||
, FLogCategoryBase& Category = LogGasa
|
||||
, bool DumpStack = false
|
||||
, int32 Line = __builtin_LINE()
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
||||
template<typename RowType>
|
||||
inline
|
||||
RowType* GetDataTableRowByTag(UDataTable* DT, FGameplayTag& Tag)
|
||||
{
|
||||
RowType* Row = DT->FindRow<RowType>(Tag.GetTagName(), TEXT(""));
|
||||
return Row;
|
||||
}
|
||||
|
||||
template<typename KeyType, typename ValueType>
|
||||
inline
|
||||
void RemoveKeys(TMap<KeyType, ValueType> Map, TArray<KeyType> Keys)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Engine/DataTable.h"
|
||||
#include "Engine/DeveloperSettings.h"
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
||||
#include "GasaDevOptions.generated.h"
|
||||
|
||||
|
||||
UCLASS(Config=Game, DefaultConfig, meta=(DisplayName="Gasa"))
|
||||
class GASA_API UGasaDevOptions : public UDeveloperSettings
|
||||
{
|
||||
@@ -15,6 +16,9 @@ public:
|
||||
// NOTE(Ed): Any Soft-References must have their includes defined in GasaDevOptions.cpp
|
||||
// They are used by GasaGen for the GasaDevOptionsCache
|
||||
|
||||
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="UI")
|
||||
TSoftObjectPtr<UDataTable> TaggedMessageTable;
|
||||
|
||||
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="UI")
|
||||
TSoftClassPtr<ACameraMount> Template_PlayerCamera;
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ void FGasaDevOptionsCache::CachedDevOptions()
|
||||
{
|
||||
UGasaDevOptions* DevOpts = GetMutDevOptions();
|
||||
|
||||
TaggedMessageTable = DevOpts->TaggedMessageTable.LoadSynchronous();
|
||||
ensureMsgf( TaggedMessageTable != nullptr, TEXT( "TaggedMessageTable is null, DO NOT RUN PIE or else you may get a crash if not handled in BP or C++" ) );
|
||||
|
||||
Template_PlayerCamera = DevOpts->Template_PlayerCamera.LoadSynchronous();
|
||||
ensureMsgf(
|
||||
Template_PlayerCamera != nullptr, TEXT( "Template_PlayerCamera is null, DO NOT RUN PIE or else you may get a crash if not handled in BP or C++" )
|
||||
|
||||
@@ -8,6 +8,8 @@ struct GASA_API FGasaDevOptionsCache
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY()
|
||||
UObject* TaggedMessageTable;
|
||||
UPROPERTY()
|
||||
UClass* Template_PlayerCamera;
|
||||
UPROPERTY()
|
||||
|
||||
@@ -14,12 +14,15 @@ void AGasaHUD::InitHostWidget(FWidgetControllerData const* WidgetControllerData)
|
||||
HostWidgetController = NewObject<UHostWidgetController>(this, GetDevOptions()->Template_HostWidgetController.Get());
|
||||
HostWidgetController->Data = (* WidgetControllerData);
|
||||
HostWidget->SetWidgetController(HostWidgetController);
|
||||
HostWidgetController->BindCallbacksToDependencies();
|
||||
|
||||
HostWidgetController->BroadcastInitialValues();
|
||||
HostWidget->AddToViewport();
|
||||
}
|
||||
|
||||
void AGasaHUD::DrawHUD()
|
||||
{
|
||||
Super::DrawHUD();
|
||||
}
|
||||
|
||||
#pragma region HUD
|
||||
void AGasaHUD::ShowHUD()
|
||||
{
|
||||
@@ -32,4 +35,9 @@ void AGasaHUD::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
}
|
||||
|
||||
void AGasaHUD::Tick(float DeltaSeconds)
|
||||
{
|
||||
Super::Tick(DeltaSeconds);
|
||||
}
|
||||
#pragma endregion Actor
|
||||
|
||||
@@ -21,11 +21,14 @@ public:
|
||||
|
||||
void InitHostWidget(FWidgetControllerData const* WidgetControllerData);
|
||||
|
||||
#pragma region HUD
|
||||
#pragma region HUD
|
||||
void DrawHUD() override;
|
||||
void ShowHUD() override;
|
||||
#pragma endregion HUD
|
||||
|
||||
#pragma region Actor
|
||||
void BeginPlay() override;
|
||||
|
||||
void Tick(float DeltaSeconds) override;
|
||||
#pragma endregion Actor
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "GasaUserWidget.h"
|
||||
#include "GasaUserWidget.h"
|
||||
|
||||
#include "Blueprint/WidgetBlueprintGeneratedClass.h"
|
||||
#include "Blueprint/WidgetTree.h"
|
||||
@@ -227,7 +227,7 @@ bool UGasaUserWidget::Initialize()
|
||||
|
||||
// For backward compatibility, run the initialize event on widget that doesn't have a player context only when the class authorized it.
|
||||
bool bClassWantsToRunInitialized = BGClass && BGClass->bCanCallInitializedWithoutPlayerContext;
|
||||
if (!IsDesignTime() && (PlayerContext.IsValid() || bClassWantsToRunInitialized))
|
||||
if (!IsDesignTime() && (GetPlayerContext().IsValid() || bClassWantsToRunInitialized))
|
||||
{
|
||||
NativeOnInitialized();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "GlobeProgressBar.h"
|
||||
#include "GlobeProgressBar.h"
|
||||
|
||||
#include "GasaImage.h"
|
||||
#include "GasaOverlay.h"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "AbilitySystem/GasaAbilitySystemComponent_Inlines.h"
|
||||
#include "AbilitySystem/GasaAttributeSet.h"
|
||||
#include "GameplayEffectTypes.h"
|
||||
#include "GasaDevOptions.h"
|
||||
#include "TaggedMessageRow.h"
|
||||
using namespace Gasa;
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +33,20 @@ void UHostWidgetController::MaxManaChanged( FOnAttributeChangeData const& Attrib
|
||||
}
|
||||
#pragma endregion Attribute Changed Callbacks
|
||||
|
||||
void UHostWidgetController::OnEffectAppliedAssetTags( FGameplayTagContainer const& AssetTags )
|
||||
{
|
||||
UDataTable* TaggedMessages = GetDevOptions()->TaggedMessageTable.Get();
|
||||
for ( FGameplayTag const& Tag : AssetTags )
|
||||
{
|
||||
FGameplayTag MessageTagCategory = FGameplayTag::RequestGameplayTag( FName( "Message" ) );
|
||||
if ( ! Tag.MatchesTag( MessageTagCategory ) )
|
||||
continue;
|
||||
|
||||
FTaggedMessageRow* Row = TaggedMessages->FindRow<FTaggedMessageRow>( Tag.GetTagName(), TEXT( "" ) );
|
||||
OnTaggedAssetMessage.Broadcast( *Row );
|
||||
}
|
||||
}
|
||||
|
||||
void UHostWidgetController::BroadcastInitialValues()
|
||||
{
|
||||
// This function is managed by: GenGasa/GenGasa_HostWidgetController.cpp
|
||||
@@ -66,4 +83,6 @@ void UHostWidgetController::BindCallbacksToDependencies()
|
||||
FOnGameplayAttributeValueChange& MaxManaAttributeChangedDelegate =
|
||||
AbilitySystem->GetGameplayAttributeValueChangeDelegate( GasaAttribs->GetMaxManaAttribute() );
|
||||
MaxManaAttributeChangedDelegate.AddUObject( this, &ThisClass::MaxManaChanged );
|
||||
|
||||
AbilitySystem->Event_OnEffectAppliedAssetTags.AddUObject( this, &UHostWidgetController::OnEffectAppliedAssetTags );
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "GasaCommon.h"
|
||||
#include "TaggedMessageRow.h"
|
||||
#include "WidgetController.h"
|
||||
#include "HostWidgetController.generated.h"
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FAttributeFloatChangedSig, float, NewValue );
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FAttributeChangedSig, float, NewValue );
|
||||
|
||||
UCLASS( Blueprintable, BlueprintType )
|
||||
class GASA_API UHostWidgetController : public UWidgetController
|
||||
@@ -13,16 +16,16 @@ public:
|
||||
// Attribute Events are generated by GasaGen/GasaGen_HostWidgetController.cpp
|
||||
|
||||
UPROPERTY( BlueprintAssignable, Category = "Attributes" )
|
||||
FAttributeFloatChangedSig Event_OnHealthChanged;
|
||||
FAttributeChangedSig Event_OnHealthChanged;
|
||||
|
||||
UPROPERTY( BlueprintAssignable, Category = "Attributes" )
|
||||
FAttributeFloatChangedSig Event_OnMaxHealthChanged;
|
||||
FAttributeChangedSig Event_OnMaxHealthChanged;
|
||||
|
||||
UPROPERTY( BlueprintAssignable, Category = "Attributes" )
|
||||
FAttributeFloatChangedSig Event_OnManaChanged;
|
||||
FAttributeChangedSig Event_OnManaChanged;
|
||||
|
||||
UPROPERTY( BlueprintAssignable, Category = "Attributes" )
|
||||
FAttributeFloatChangedSig Event_OnMaxManaChanged;
|
||||
FAttributeChangedSig Event_OnMaxManaChanged;
|
||||
|
||||
void HealthChanged( FOnAttributeChangeData const& Data );
|
||||
void MaxHealthChanged( FOnAttributeChangeData const& Data );
|
||||
@@ -30,6 +33,11 @@ public:
|
||||
void MaxManaChanged( FOnAttributeChangeData const& Data );
|
||||
#pragma endregion Attribute Events
|
||||
|
||||
UPROPERTY( BlueprintAssignable, Category = "Messages" )
|
||||
FTaggedMessageRowSig OnTaggedAssetMessage;
|
||||
|
||||
void OnEffectAppliedAssetTags( FGameplayTagContainer const& AssetTags );
|
||||
|
||||
#pragma region WidgetController
|
||||
void BroadcastInitialValues() override;
|
||||
void BindCallbacksToDependencies() override;
|
||||
|
||||
28
Project/Source/Gasa/UI/TaggedMessageRow.h
Normal file
28
Project/Source/Gasa/UI/TaggedMessageRow.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "GameplayTagContainer.h"
|
||||
#include "GasaCommon.h"
|
||||
#include "Engine/DataTable.h"
|
||||
#include "Templates/SubclassOf.h"
|
||||
|
||||
#include "TaggedMessageRow.generated.h"
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FTaggedMessageRow : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||
FGameplayTag Tag;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||
FText Message;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||
TSubclassOf<UGasaUserWidget> MessageTemplate;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||
UTexture2D* Image;
|
||||
};
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FTaggedMessageRowSig, FTaggedMessageRow, Message);
|
||||
@@ -72,7 +72,7 @@ void gen_UHostWidgetController()
|
||||
));
|
||||
attribute_events.append(fmt_newline);
|
||||
attribute_events.append( parse_variable(
|
||||
token_fmt( "field", (StrC) attribute_field.Name, stringize( FAttributeFloatChangedSig Event_On<field>Changed; ))
|
||||
token_fmt( "field", (StrC) attribute_field.Name, stringize( FAttributeChangedSig Event_On<field>Changed; ))
|
||||
));
|
||||
attribute_events.append(fmt_newline);
|
||||
}
|
||||
@@ -209,6 +209,8 @@ void gen_UHostWidgetController()
|
||||
UGasaAttributeSet* GasaAttribs = Cast<UGasaAttributeSet>( Data.Attributes );
|
||||
|
||||
<bindings>
|
||||
|
||||
AbilitySystem->Event_OnEffectAppliedAssetTags.AddUObject(this, & UHostWidgetController::OnEffectAppliedAssetTags);
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
83
scripts/clean_shit_up.ps1
Normal file
83
scripts/clean_shit_up.ps1
Normal file
@@ -0,0 +1,83 @@
|
||||
# PowerShell script to set up Git LFS for Content directory
|
||||
clear-host
|
||||
|
||||
$path_scripts = $PSScriptRoot
|
||||
$path_helpers = join-path $path_scripts 'helpers'
|
||||
$path_root = split-path -Parent -Path $path_scripts
|
||||
$path_ue = join-path '../../Surgo' 'UE'
|
||||
$path_project = join-path $path_root 'Project'
|
||||
|
||||
|
||||
# Set your repository paths here
|
||||
$path_content = join-path $path_project 'Content'
|
||||
|
||||
|
||||
# Function to remove Content directory from Git history
|
||||
function Remove-ContentFromGitHistory {
|
||||
push-location $path_repo
|
||||
|
||||
$cgit_filter_branch = 'filter-branch'
|
||||
$cgit_for_each_ref = 'for-each-ref'
|
||||
$cgit_update_ref = 'update-ref'
|
||||
$cgit_reflog_expire = 'reflog expire'
|
||||
$cgit_garbage_collect = 'gc'
|
||||
|
||||
$fgit_agressive = '--aggressive'
|
||||
$fgit_all = '--all'
|
||||
$fgit_cached = '--cached'
|
||||
$fgit_format = '--format'
|
||||
$fgit_expire_now = '--expire=now'
|
||||
$fgit_ignore_unmatch = '--ignore-unmatch'
|
||||
$fgit_index_filter = '--index-filter'
|
||||
$fgit_force = '--force'
|
||||
$fgit_prune_empty = '--prune-empty'
|
||||
$fgit_prune_now = '--prune=now'
|
||||
$fgit_tag_name_filter = '--tag-name-filter'
|
||||
$fgit_stdin = '--stdin'
|
||||
|
||||
$fgit_filter_concat = 'cat'
|
||||
$fgit_filter_separate = '--'
|
||||
|
||||
$fmt_delete_refs = 'delete $(refname)'
|
||||
$original_refs = 'refs/original'
|
||||
|
||||
$filter_cmd = 'git rm -r --cached'
|
||||
|
||||
# Construct filter-branch command
|
||||
$filter_branch_args = @()
|
||||
$filter_branch_args += $fgit_force
|
||||
$filter_branch_args += $fgit_index_filter
|
||||
$filter_branch_args += "git rm -r $fgit_cached $fgit_ignore_unmatch $path_content"
|
||||
$filter_branch_args += $fgit_prune_empty
|
||||
$filter_branch_args += $fgit_tag_name_filter
|
||||
$filter_branch_args += $fgit_filter_concat
|
||||
$filter_branch_args += $fgit_filter_separate
|
||||
$filter_branch_args += $fgit_all
|
||||
|
||||
# Execute filter-branch command
|
||||
& git $cgit_filter_branch $filter_branch_args
|
||||
|
||||
# Construct for-each-ref command
|
||||
$for_each_ref_args = @()
|
||||
$for_each_ref_args += "$fgit_format='$fmt_delete_refs'"
|
||||
$for_each_ref_args += $original_refs
|
||||
|
||||
# Execute for-each-ref and pipe to update-ref
|
||||
$refs_to_delete = & git $cgit_for_each_ref $for_each_ref_args
|
||||
$refs_to_delete | & git $cgit_update_ref $fgit_stdin
|
||||
|
||||
# Construct and execute reflog expire command
|
||||
$reflog_expire_args = @()
|
||||
$reflog_expire_args += $fgit_expire_now
|
||||
$reflog_expire_args += $fgit_all
|
||||
& git $cgit_reflog_expire $reflog_expire_args
|
||||
|
||||
# Construct and execute garbage collect command
|
||||
$gc_args = @()
|
||||
$gc_args += $fgit_prune_now
|
||||
$gc_args += $fgit_aggressive
|
||||
& git $cgit_garbage_collect $gc_args
|
||||
|
||||
pop-location
|
||||
}
|
||||
Remove-ContentFromGitHistory
|
||||
@@ -54,7 +54,7 @@ elseif ( $release -eq $false ) {
|
||||
else {
|
||||
$optimize = $true
|
||||
}
|
||||
|
||||
#endregion Configuration
|
||||
|
||||
. $vendor_toolchain
|
||||
. $incremental_checks
|
||||
@@ -103,3 +103,4 @@ function run-gengasa
|
||||
Pop-Location
|
||||
}
|
||||
run-gengasa
|
||||
#endregion Building
|
||||
|
||||
4
scripts/setup_content.ps1
Normal file
4
scripts/setup_content.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
clear-host
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user