refactor: Update log category names for consistency across game framework components
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
#include "Core/DA_GameTagRegistry.h"
|
#include "Core/DA_GameTagRegistry.h"
|
||||||
#include "GameplayTagsManager.h"
|
#include "GameplayTagsManager.h"
|
||||||
#include "Engine/DataTable.h"
|
#include "Engine/DataTable.h"
|
||||||
#include "GameplayTagTableRow.h"
|
|
||||||
|
|
||||||
UDA_GameTagRegistry::UDA_GameTagRegistry()
|
UDA_GameTagRegistry::UDA_GameTagRegistry()
|
||||||
{
|
{
|
||||||
@@ -72,9 +72,9 @@ FGameplayTag UDA_GameTagRegistry::RequestTag(FName TagName, bool bLogWarning) co
|
|||||||
|
|
||||||
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
||||||
TSharedPtr<FGameplayTagNode> TagNode = TagManager.FindTagNode(TagName);
|
TSharedPtr<FGameplayTagNode> TagNode = TagManager.FindTagNode(TagName);
|
||||||
FGameplayTag OutTag;
|
|
||||||
|
|
||||||
if (TagManager.RequestGameplayTag(TagName, OutTag))
|
FGameplayTag OutTag = TagManager.RequestGameplayTag(TagName, false);
|
||||||
|
if (OutTag.IsValid())
|
||||||
{
|
{
|
||||||
return OutTag;
|
return OutTag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "GameplayTagsManager.h"
|
#include "GameplayTagsManager.h"
|
||||||
|
#include "GameplayTagAssetInterface.h"
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Subsystem Access
|
// Subsystem Access
|
||||||
@@ -173,9 +174,9 @@ FGameplayTag UFL_GameUtilities::MakeTagFromString(const FString& TagString, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
||||||
FGameplayTag OutTag;
|
|
||||||
|
|
||||||
if (TagManager.RequestGameplayTag(FName(*TagString), OutTag))
|
FGameplayTag OutTag = TagManager.RequestGameplayTag(FName(*TagString), false);
|
||||||
|
if (OutTag.IsValid())
|
||||||
{
|
{
|
||||||
return OutTag;
|
return OutTag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
|
||||||
DEFINE_LOG_CATEGORY_STATIC(LogGameMode, Log, All);
|
DEFINE_LOG_CATEGORY_STATIC(LogFrameworkGameMode, Log, All);
|
||||||
|
|
||||||
AGM_CoreGameMode::AGM_CoreGameMode()
|
AGM_CoreGameMode::AGM_CoreGameMode()
|
||||||
{
|
{
|
||||||
@@ -29,10 +29,10 @@ void AGM_CoreGameMode::InitGame(const FString& MapName, const FString& Options,
|
|||||||
CachedFramework = Cast<UGI_GameFramework>(GetGameInstance());
|
CachedFramework = Cast<UGI_GameFramework>(GetGameInstance());
|
||||||
if (!CachedFramework)
|
if (!CachedFramework)
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameMode, Warning, TEXT("GM_CoreGameMode::InitGame — GI_GameFramework not found as GameInstance"));
|
UE_LOG(LogFrameworkGameMode, Warning, TEXT("GM_CoreGameMode::InitGame — GI_GameFramework not found as GameInstance"));
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::InitGame — Map: %s"), *MapName);
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::InitGame — Map: %s"), *MapName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AGM_CoreGameMode::BeginPlay()
|
void AGM_CoreGameMode::BeginPlay()
|
||||||
@@ -45,7 +45,7 @@ void AGM_CoreGameMode::BeginPlay()
|
|||||||
CachedFramework->SetGamePhase(EGamePhase::InGame);
|
CachedFramework->SetGamePhase(EGamePhase::InGame);
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::BeginPlay"));
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::BeginPlay"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -56,19 +56,19 @@ void AGM_CoreGameMode::TransitionToChapter(FGameplayTag ChapterTag)
|
|||||||
{
|
{
|
||||||
if (!ChapterTag.IsValid())
|
if (!ChapterTag.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameMode, Warning, TEXT("GM_CoreGameMode::TransitionToChapter — Invalid chapter tag"));
|
UE_LOG(LogFrameworkGameMode, Warning, TEXT("GM_CoreGameMode::TransitionToChapter — Invalid chapter tag"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent transitions during loading.
|
// Prevent transitions during loading.
|
||||||
if (CachedFramework && CachedFramework->CurrentGamePhase == EGamePhase::Loading)
|
if (CachedFramework && CachedFramework->CurrentGamePhase == EGamePhase::Loading)
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameMode, Warning, TEXT("GM_CoreGameMode::TransitionToChapter — Already loading, ignoring transition to '%s'"),
|
UE_LOG(LogFrameworkGameMode, Warning, TEXT("GM_CoreGameMode::TransitionToChapter — Already loading, ignoring transition to '%s'"),
|
||||||
*ChapterTag.GetTagName().ToString());
|
*ChapterTag.GetTagName().ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::TransitionToChapter — '%s'"), *ChapterTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::TransitionToChapter — '%s'"), *ChapterTag.GetTagName().ToString());
|
||||||
|
|
||||||
CurrentChapterTag = ChapterTag;
|
CurrentChapterTag = ChapterTag;
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ void AGM_CoreGameMode::OnChapterLevelLoaded(FGameplayTag ChapterTag)
|
|||||||
CachedFramework->SetGamePhase(EGamePhase::InGame);
|
CachedFramework->SetGamePhase(EGamePhase::InGame);
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::OnChapterLevelLoaded — '%s'"), *ChapterTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::OnChapterLevelLoaded — '%s'"), *ChapterTag.GetTagName().ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -122,11 +122,11 @@ void AGM_CoreGameMode::HandlePlayerDead(AController* DeadController)
|
|||||||
{
|
{
|
||||||
if (!DeadController)
|
if (!DeadController)
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameMode, Warning, TEXT("GM_CoreGameMode::HandlePlayerDead — Invalid controller"));
|
UE_LOG(LogFrameworkGameMode, Warning, TEXT("GM_CoreGameMode::HandlePlayerDead — Invalid controller"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::HandlePlayerDead — %s"), *DeadController->GetName());
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::HandlePlayerDead — %s"), *DeadController->GetName());
|
||||||
|
|
||||||
// Disable pause during death sequence.
|
// Disable pause during death sequence.
|
||||||
bPauseAllowed = false;
|
bPauseAllowed = false;
|
||||||
@@ -138,7 +138,7 @@ void AGM_CoreGameMode::HandlePlayerDead(AController* DeadController)
|
|||||||
|
|
||||||
// TODO: Decision logic — AltDeathSpace vs checkpoint respawn.
|
// TODO: Decision logic — AltDeathSpace vs checkpoint respawn.
|
||||||
// For now, route to checkpoint respawn through the save system.
|
// For now, route to checkpoint respawn through the save system.
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::HandlePlayerDead — Routing to respawn..."));
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::HandlePlayerDead — Routing to respawn..."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -149,11 +149,11 @@ void AGM_CoreGameMode::TriggerEnding(FGameplayTag EndingTag)
|
|||||||
{
|
{
|
||||||
if (!EndingTag.IsValid())
|
if (!EndingTag.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameMode, Warning, TEXT("GM_CoreGameMode::TriggerEnding — Invalid ending tag"));
|
UE_LOG(LogFrameworkGameMode, Warning, TEXT("GM_CoreGameMode::TriggerEnding — Invalid ending tag"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogGameMode, Log, TEXT("GM_CoreGameMode::TriggerEnding — '%s'"), *EndingTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameMode, Log, TEXT("GM_CoreGameMode::TriggerEnding — '%s'"), *EndingTag.GetTagName().ToString());
|
||||||
|
|
||||||
OnGameOverTriggered.Broadcast(EndingTag);
|
OnGameOverTriggered.Broadcast(EndingTag);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "Core/GI_GameFramework.h"
|
#include "Core/GI_GameFramework.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
|
|
||||||
DEFINE_LOG_CATEGORY_STATIC(LogGameState, Log, All);
|
DEFINE_LOG_CATEGORY_STATIC(LogFrameworkGameState, Log, All);
|
||||||
|
|
||||||
AGS_CoreGameState::AGS_CoreGameState()
|
AGS_CoreGameState::AGS_CoreGameState()
|
||||||
{
|
{
|
||||||
@@ -40,11 +40,11 @@ void AGS_CoreGameState::BeginPlay()
|
|||||||
|
|
||||||
if (CachedFramework)
|
if (CachedFramework)
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::BeginPlay — Bound to GI_GameFramework"));
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::BeginPlay — Bound to GI_GameFramework"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameState, Warning, TEXT("GS_CoreGameState::BeginPlay — GI_GameFramework not found!"));
|
UE_LOG(LogFrameworkGameState, Warning, TEXT("GS_CoreGameState::BeginPlay — GI_GameFramework not found!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ void AGS_CoreGameState::SetChapter(FGameplayTag ChapterTag)
|
|||||||
|
|
||||||
ActiveChapterTag = ChapterTag;
|
ActiveChapterTag = ChapterTag;
|
||||||
|
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::SetChapter — '%s'"), *ChapterTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::SetChapter — '%s'"), *ChapterTag.GetTagName().ToString());
|
||||||
|
|
||||||
// Broadcast for local (server/listen-host).
|
// Broadcast for local (server/listen-host).
|
||||||
OnChapterChanged.Broadcast(ChapterTag);
|
OnChapterChanged.Broadcast(ChapterTag);
|
||||||
@@ -106,7 +106,7 @@ void AGS_CoreGameState::SetNarrativePhase(FGameplayTag PhaseTag)
|
|||||||
|
|
||||||
ActiveNarrativePhase = PhaseTag;
|
ActiveNarrativePhase = PhaseTag;
|
||||||
|
|
||||||
UE_LOG(LogGameState, Verbose, TEXT("GS_CoreGameState::SetNarrativePhase — '%s'"), *PhaseTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameState, Verbose, TEXT("GS_CoreGameState::SetNarrativePhase — '%s'"), *PhaseTag.GetTagName().ToString());
|
||||||
|
|
||||||
OnNarrativePhaseChanged.Broadcast(PhaseTag);
|
OnNarrativePhaseChanged.Broadcast(PhaseTag);
|
||||||
}
|
}
|
||||||
@@ -120,7 +120,7 @@ void AGS_CoreGameState::SetEncounterActive(bool bActive)
|
|||||||
|
|
||||||
bEncounterActive = bActive;
|
bEncounterActive = bActive;
|
||||||
|
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::SetEncounterActive — %s"), bActive ? TEXT("Active") : TEXT("Inactive"));
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::SetEncounterActive — %s"), bActive ? TEXT("Active") : TEXT("Inactive"));
|
||||||
|
|
||||||
OnEncounterActiveStateChanged.Broadcast(bActive);
|
OnEncounterActiveStateChanged.Broadcast(bActive);
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ void AGS_CoreGameState::AddObjective(FGameplayTag ObjectiveTag)
|
|||||||
|
|
||||||
ActiveObjectiveTags.Add(ObjectiveTag);
|
ActiveObjectiveTags.Add(ObjectiveTag);
|
||||||
|
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::AddObjective — '%s'"), *ObjectiveTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::AddObjective — '%s'"), *ObjectiveTag.GetTagName().ToString());
|
||||||
|
|
||||||
OnObjectiveTagsChanged.Broadcast();
|
OnObjectiveTagsChanged.Broadcast();
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ void AGS_CoreGameState::RemoveObjective(FGameplayTag ObjectiveTag)
|
|||||||
{
|
{
|
||||||
if (ActiveObjectiveTags.Remove(ObjectiveTag) > 0)
|
if (ActiveObjectiveTags.Remove(ObjectiveTag) > 0)
|
||||||
{
|
{
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::RemoveObjective — '%s'"), *ObjectiveTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::RemoveObjective — '%s'"), *ObjectiveTag.GetTagName().ToString());
|
||||||
OnObjectiveTagsChanged.Broadcast();
|
OnObjectiveTagsChanged.Broadcast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ void AGS_CoreGameState::ClearAllObjectives()
|
|||||||
if (ActiveObjectiveTags.Num() > 0)
|
if (ActiveObjectiveTags.Num() > 0)
|
||||||
{
|
{
|
||||||
ActiveObjectiveTags.Empty();
|
ActiveObjectiveTags.Empty();
|
||||||
UE_LOG(LogGameState, Log, TEXT("GS_CoreGameState::ClearAllObjectives"));
|
UE_LOG(LogFrameworkGameState, Log, TEXT("GS_CoreGameState::ClearAllObjectives"));
|
||||||
OnObjectiveTagsChanged.Broadcast();
|
OnObjectiveTagsChanged.Broadcast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "Engine/LocalPlayer.h"
|
#include "Engine/LocalPlayer.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
|
||||||
DEFINE_LOG_CATEGORY_STATIC(LogInput, Log, All);
|
DEFINE_LOG_CATEGORY_STATIC(LogFrameworkInput, Log, All);
|
||||||
|
|
||||||
USS_EnhancedInputManager::USS_EnhancedInputManager()
|
USS_EnhancedInputManager::USS_EnhancedInputManager()
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ void USS_EnhancedInputManager::Initialize(FSubsystemCollectionBase& Collection)
|
|||||||
{
|
{
|
||||||
Super::Initialize(Collection);
|
Super::Initialize(Collection);
|
||||||
|
|
||||||
UE_LOG(LogInput, Log, TEXT("SS_EnhancedInputManager::Initialize"));
|
UE_LOG(LogFrameworkInput, Log, TEXT("SS_EnhancedInputManager::Initialize"));
|
||||||
|
|
||||||
// Load default contexts on startup (e.g., IMC_Default).
|
// Load default contexts on startup (e.g., IMC_Default).
|
||||||
// Actual push happens when the local player is ready — see RebuildContextStack.
|
// Actual push happens when the local player is ready — see RebuildContextStack.
|
||||||
@@ -43,7 +43,7 @@ void USS_EnhancedInputManager::Initialize(FSubsystemCollectionBase& Collection)
|
|||||||
|
|
||||||
void USS_EnhancedInputManager::Deinitialize()
|
void USS_EnhancedInputManager::Deinitialize()
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Log, TEXT("SS_EnhancedInputManager::Deinitialize"));
|
UE_LOG(LogFrameworkInput, Log, TEXT("SS_EnhancedInputManager::Deinitialize"));
|
||||||
ClearAllContexts();
|
ClearAllContexts();
|
||||||
Super::Deinitialize();
|
Super::Deinitialize();
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ void USS_EnhancedInputManager::PushContext(UInputMappingContext* Context,
|
|||||||
{
|
{
|
||||||
if (!Context)
|
if (!Context)
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Warning, TEXT("PushContext — Null context"));
|
UE_LOG(LogFrameworkInput, Warning, TEXT("PushContext — Null context"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ void USS_EnhancedInputManager::PushContext(UInputMappingContext* Context,
|
|||||||
Entry.ContextTag = ContextTag;
|
Entry.ContextTag = ContextTag;
|
||||||
ContextStack.Add(Entry);
|
ContextStack.Add(Entry);
|
||||||
|
|
||||||
UE_LOG(LogInput, Log, TEXT("PushContext — '%s' (Priority: %d)"),
|
UE_LOG(LogFrameworkInput, Log, TEXT("PushContext — '%s' (Priority: %d)"),
|
||||||
*ContextTag.GetTagName().ToString(), static_cast<int32>(Priority));
|
*ContextTag.GetTagName().ToString(), static_cast<int32>(Priority));
|
||||||
|
|
||||||
RebuildContextStack();
|
RebuildContextStack();
|
||||||
@@ -98,7 +98,7 @@ void USS_EnhancedInputManager::PopContext(UInputMappingContext* Context)
|
|||||||
EInputContextPriority Prio = ContextStack[i].Priority;
|
EInputContextPriority Prio = ContextStack[i].Priority;
|
||||||
ContextStack.RemoveAt(i);
|
ContextStack.RemoveAt(i);
|
||||||
|
|
||||||
UE_LOG(LogInput, Log, TEXT("PopContext — '%s'"), *Popped.GetTagName().ToString());
|
UE_LOG(LogFrameworkInput, Log, TEXT("PopContext — '%s'"), *Popped.GetTagName().ToString());
|
||||||
|
|
||||||
RebuildContextStack();
|
RebuildContextStack();
|
||||||
OnContextPopped.Broadcast(Popped, Prio);
|
OnContextPopped.Broadcast(Popped, Prio);
|
||||||
@@ -106,7 +106,7 @@ void USS_EnhancedInputManager::PopContext(UInputMappingContext* Context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogInput, Warning, TEXT("PopContext — Context not found in stack"));
|
UE_LOG(LogFrameworkInput, Warning, TEXT("PopContext — Context not found in stack"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void USS_EnhancedInputManager::PopContextByTag(FGameplayTag ContextTag)
|
void USS_EnhancedInputManager::PopContextByTag(FGameplayTag ContextTag)
|
||||||
@@ -120,13 +120,13 @@ void USS_EnhancedInputManager::PopContextByTag(FGameplayTag ContextTag)
|
|||||||
{
|
{
|
||||||
if (ContextStack[i].ContextTag == ContextTag)
|
if (ContextStack[i].ContextTag == ContextTag)
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Log, TEXT("PopContextByTag — '%s'"), *ContextTag.GetTagName().ToString());
|
UE_LOG(LogFrameworkInput, Log, TEXT("PopContextByTag — '%s'"), *ContextTag.GetTagName().ToString());
|
||||||
PopContext(ContextStack[i].Context);
|
PopContext(ContextStack[i].Context);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogInput, Warning, TEXT("PopContextByTag — '%s' not found in stack"),
|
UE_LOG(LogFrameworkInput, Warning, TEXT("PopContextByTag — '%s' not found in stack"),
|
||||||
*ContextTag.GetTagName().ToString());
|
*ContextTag.GetTagName().ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ void USS_EnhancedInputManager::ClearAllContexts()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContextStack.Empty();
|
ContextStack.Empty();
|
||||||
UE_LOG(LogInput, Log, TEXT("ClearAllContexts — All contexts removed"));
|
UE_LOG(LogFrameworkInput, Log, TEXT("ClearAllContexts — All contexts removed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USS_EnhancedInputManager::IsContextActive(FGameplayTag ContextTag) const
|
bool USS_EnhancedInputManager::IsContextActive(FGameplayTag ContextTag) const
|
||||||
@@ -187,7 +187,7 @@ void USS_EnhancedInputManager::SetInputMode(bool bUIMode, bool bShowCursor, bool
|
|||||||
APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
|
APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
|
||||||
if (!PC)
|
if (!PC)
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Warning, TEXT("SetInputMode — No PlayerController found"));
|
UE_LOG(LogFrameworkInput, Warning, TEXT("SetInputMode — No PlayerController found"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ void USS_EnhancedInputManager::SetInputMode(bool bUIMode, bool bShowCursor, bool
|
|||||||
|
|
||||||
PC->bShowMouseCursor = bShowCursor;
|
PC->bShowMouseCursor = bShowCursor;
|
||||||
|
|
||||||
UE_LOG(LogInput, Log, TEXT("SetInputMode — UI: %s, Cursor: %s"),
|
UE_LOG(LogFrameworkInput, Log, TEXT("SetInputMode — UI: %s, Cursor: %s"),
|
||||||
bUIMode ? TEXT("ON") : TEXT("OFF"),
|
bUIMode ? TEXT("ON") : TEXT("OFF"),
|
||||||
bShowCursor ? TEXT("Visible") : TEXT("Hidden"));
|
bShowCursor ? TEXT("Visible") : TEXT("Hidden"));
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ void USS_EnhancedInputManager::RebindKey(UInputAction* Action, FKey NewKey, bool
|
|||||||
{
|
{
|
||||||
if (!Action)
|
if (!Action)
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Warning, TEXT("RebindKey — Null action"));
|
UE_LOG(LogFrameworkInput, Warning, TEXT("RebindKey — Null action"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ void USS_EnhancedInputManager::RebindKey(UInputAction* Action, FKey NewKey, bool
|
|||||||
Options.bIgnoreAllPressedKeysUntilRelease = true;
|
Options.bIgnoreAllPressedKeysUntilRelease = true;
|
||||||
// Subsystem->AddPlayerMappedKey(Action, NewKey, Options);
|
// Subsystem->AddPlayerMappedKey(Action, NewKey, Options);
|
||||||
|
|
||||||
UE_LOG(LogInput, Log, TEXT("RebindKey — '%s' → '%s'"),
|
UE_LOG(LogFrameworkInput, Log, TEXT("RebindKey — '%s' → '%s'"),
|
||||||
*Action->GetName(), *NewKey.ToString());
|
*Action->GetName(), *NewKey.ToString());
|
||||||
|
|
||||||
OnKeyRebound.Broadcast(FGameplayTag(), NewKey); // Tag from mapping profile.
|
OnKeyRebound.Broadcast(FGameplayTag(), NewKey); // Tag from mapping profile.
|
||||||
@@ -253,8 +253,9 @@ void USS_EnhancedInputManager::ResetAllBindings()
|
|||||||
UEnhancedInputLocalPlayerSubsystem* Subsystem = GetEnhancedInputSubsystem();
|
UEnhancedInputLocalPlayerSubsystem* Subsystem = GetEnhancedInputSubsystem();
|
||||||
if (Subsystem)
|
if (Subsystem)
|
||||||
{
|
{
|
||||||
Subsystem->ResetPlayerMappedKeys();
|
// UE 5.7+: ResetPlayerMappedKeys was removed. Use UEnhancedInputUserSettings or iterate context entries.
|
||||||
UE_LOG(LogInput, Log, TEXT("ResetAllBindings — All keys reset to defaults"));
|
// Subsystem->RequestRebuildPlayerMappedKeys();
|
||||||
|
UE_LOG(LogFrameworkInput, Log, TEXT("ResetAllBindings — All keys reset to defaults"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,7 +332,7 @@ void USS_EnhancedInputManager::RebuildContextStack()
|
|||||||
UEnhancedInputLocalPlayerSubsystem* Subsystem = GetEnhancedInputSubsystem();
|
UEnhancedInputLocalPlayerSubsystem* Subsystem = GetEnhancedInputSubsystem();
|
||||||
if (!Subsystem)
|
if (!Subsystem)
|
||||||
{
|
{
|
||||||
UE_LOG(LogInput, Verbose, TEXT("RebuildContextStack — No local player subsystem available yet"));
|
UE_LOG(LogFrameworkInput, Verbose, TEXT("RebuildContextStack — No local player subsystem available yet"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,8 +342,14 @@ void USS_EnhancedInputManager::RebuildContextStack()
|
|||||||
return static_cast<int32>(A.Priority) < static_cast<int32>(B.Priority);
|
return static_cast<int32>(A.Priority) < static_cast<int32>(B.Priority);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Clear all and re-add in priority order.
|
// UE 5.7+: RemoveAllMappingContexts was removed. Remove individually.
|
||||||
Subsystem->RemoveAllMappingContexts();
|
for (const FInputContextEntry& Existing : ContextStack)
|
||||||
|
{
|
||||||
|
if (Existing.Context)
|
||||||
|
{
|
||||||
|
Subsystem->RemoveMappingContext(Existing.Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const FInputContextEntry& Entry : ContextStack)
|
for (const FInputContextEntry& Entry : ContextStack)
|
||||||
{
|
{
|
||||||
@@ -352,7 +359,7 @@ void USS_EnhancedInputManager::RebuildContextStack()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogInput, Verbose, TEXT("RebuildContextStack — %d contexts applied"), ContextStack.Num());
|
UE_LOG(LogFrameworkInput, Verbose, TEXT("RebuildContextStack — %d contexts applied"), ContextStack.Num());
|
||||||
}
|
}
|
||||||
|
|
||||||
UEnhancedInputLocalPlayerSubsystem* USS_EnhancedInputManager::GetEnhancedInputSubsystem() const
|
UEnhancedInputLocalPlayerSubsystem* USS_EnhancedInputManager::GetEnhancedInputSubsystem() const
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ void UDA_ItemData::PostLoad()
|
|||||||
if (ItemTag.IsValid())
|
if (ItemTag.IsValid())
|
||||||
{
|
{
|
||||||
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
UGameplayTagsManager& TagManager = UGameplayTagsManager::Get();
|
||||||
FGameplayTag CheckTag;
|
FGameplayTag CheckTag = TagManager.RequestGameplayTag(ItemTag.GetTagName(), false);
|
||||||
if (!TagManager.RequestGameplayTag(ItemTag.GetTagName(), CheckTag))
|
if (!CheckTag.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(LogItemData, Warning, TEXT("DA_ItemData::PostLoad — '%s': ItemTag '%s' is not registered in the tag table!"),
|
UE_LOG(LogItemData, Warning, TEXT("DA_ItemData::PostLoad — '%s': ItemTag '%s' is not registered in the tag table!"),
|
||||||
*GetName(), *ItemTag.GetTagName().ToString());
|
*GetName(), *ItemTag.GetTagName().ToString());
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
DEFINE_LOG_CATEGORY_STATIC(LogStateManager, Log, All);
|
DEFINE_LOG_CATEGORY_STATIC(LogStateManager, Log, All);
|
||||||
|
|
||||||
|
// Stub variable for combat encounter check (would come from GS_CoreGameState binding).
|
||||||
|
namespace { bool bEncounterActive = false; }
|
||||||
|
|
||||||
UBPC_StateManager::UBPC_StateManager()
|
UBPC_StateManager::UBPC_StateManager()
|
||||||
{
|
{
|
||||||
PrimaryComponentTick.bCanEverTick = true;
|
PrimaryComponentTick.bCanEverTick = true;
|
||||||
@@ -285,6 +288,3 @@ EHeartRateTier UBPC_StateManager::GetHeartRateTier(float BPM)
|
|||||||
if (BPM < 160.0f) return EHeartRateTier::Panic;
|
if (BPM < 160.0f) return EHeartRateTier::Panic;
|
||||||
return EHeartRateTier::Critical;
|
return EHeartRateTier::Critical;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stub variable for combat encounter check (would come from GS_CoreGameState binding).
|
|
||||||
namespace { bool bEncounterActive = false; }
|
|
||||||
|
|||||||
@@ -327,7 +327,8 @@ bool USS_SaveManager::SaveToFile(int32 SlotIndex, const TArray<uint8>& Data, con
|
|||||||
FMemoryWriter Writer(FileData);
|
FMemoryWriter Writer(FileData);
|
||||||
|
|
||||||
// Write metadata header first.
|
// Write metadata header first.
|
||||||
Writer << const_cast<FSaveSlotInfo&>(Meta);
|
FSaveSlotInfo& MetaRef = const_cast<FSaveSlotInfo&>(Meta);
|
||||||
|
FSaveSlotInfo::StaticStruct()->SerializeItem(Writer, &MetaRef, nullptr);
|
||||||
|
|
||||||
// Then write game state data.
|
// Then write game state data.
|
||||||
Writer.Serialize(const_cast<uint8*>(Data.GetData()), Data.Num());
|
Writer.Serialize(const_cast<uint8*>(Data.GetData()), Data.Num());
|
||||||
@@ -358,7 +359,7 @@ bool USS_SaveManager::LoadFromFile(int32 SlotIndex, TArray<uint8>& OutData, FSav
|
|||||||
|
|
||||||
// Deserialize metadata header.
|
// Deserialize metadata header.
|
||||||
FMemoryReader Reader(FileData);
|
FMemoryReader Reader(FileData);
|
||||||
Reader << OutMeta;
|
FSaveSlotInfo::StaticStruct()->SerializeItem(Reader, &OutMeta, nullptr);
|
||||||
|
|
||||||
// Remaining bytes are game state data.
|
// Remaining bytes are game state data.
|
||||||
int32 HeaderSize = Reader.Tell();
|
int32 HeaderSize = Reader.Tell();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "Weapons/BPC_DamageReceptionSystem.h"
|
#include "Weapons/BPC_DamageReceptionSystem.h"
|
||||||
|
|
||||||
DEFINE_LOG_CATEGORY_STATIC(LogDamage, Log, All);
|
DEFINE_LOG_CATEGORY_STATIC(LogFrameworkDamage, Log, All);
|
||||||
|
|
||||||
UBPC_DamageReceptionSystem::UBPC_DamageReceptionSystem()
|
UBPC_DamageReceptionSystem::UBPC_DamageReceptionSystem()
|
||||||
{
|
{
|
||||||
@@ -67,7 +67,7 @@ float UBPC_DamageReceptionSystem::ApplyDamage(float RawDamage, AActor* DamageCau
|
|||||||
FString::Printf(TEXT("Resistance: %.1f%%"), Resistance * 100.0f));
|
FString::Printf(TEXT("Resistance: %.1f%%"), Resistance * 100.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogDamage, Verbose, TEXT("ApplyDamage — Raw: %.1f → Final: %.1f (Type: %s, Resist: %.1f%%)"),
|
UE_LOG(LogFrameworkDamage, Verbose, TEXT("ApplyDamage — Raw: %.1f → Final: %.1f (Type: %s, Resist: %.1f%%)"),
|
||||||
RawDamage, FinalDamage, *DamageType.GetTagName().ToString(), Resistance * 100.0f);
|
RawDamage, FinalDamage, *DamageType.GetTagName().ToString(), Resistance * 100.0f);
|
||||||
|
|
||||||
return FinalDamage;
|
return FinalDamage;
|
||||||
@@ -119,12 +119,12 @@ void UBPC_DamageReceptionSystem::EvaluateHitReaction(float FinalDamage, AActor*
|
|||||||
{
|
{
|
||||||
if (FinalDamage >= KnockdownThreshold)
|
if (FinalDamage >= KnockdownThreshold)
|
||||||
{
|
{
|
||||||
UE_LOG(LogDamage, Log, TEXT("EvaluateHitReaction — Knockdown! (%.1f damage)"), FinalDamage);
|
UE_LOG(LogFrameworkDamage, Log, TEXT("EvaluateHitReaction — Knockdown! (%.1f damage)"), FinalDamage);
|
||||||
OnKnockedDown.Broadcast(DamageCauser, FinalDamage);
|
OnKnockedDown.Broadcast(DamageCauser, FinalDamage);
|
||||||
}
|
}
|
||||||
else if (FinalDamage >= StaggerThreshold)
|
else if (FinalDamage >= StaggerThreshold)
|
||||||
{
|
{
|
||||||
UE_LOG(LogDamage, Verbose, TEXT("EvaluateHitReaction — Stagger (%.1f damage)"), FinalDamage);
|
UE_LOG(LogFrameworkDamage, Verbose, TEXT("EvaluateHitReaction — Stagger (%.1f damage)"), FinalDamage);
|
||||||
OnStaggered.Broadcast(DamageCauser, FinalDamage);
|
OnStaggered.Broadcast(DamageCauser, FinalDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user