Skip to content

Commit 6534579

Browse files
Merge branch '5.2_dev' into 5.2
2 parents 0cc854d + e63bde5 commit 6534579

13 files changed

+320
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ DerivedDataCache/*
7878
.idea/*
7979
Config/UpdateConfig.ini
8080
*.zip
81+
*.png~

ActorInteractionPlugin.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 4,
4-
"VersionName": "4.2.1.52",
4+
"VersionName": "4.2.3.52",
55
"FriendlyName": "Mountea Interaction System",
66
"Description": "Mountea Interaction System is an Open-source Mountea Framework components-based simple framework providing utilities for smart Actor Interaction with other Actors.\nDeveloped with Game Developers in mind to allow as easy as possible implementation while maintaining high scalability and diverse options to tweak everything.",
77
"Category": "Mountea Framework",

Resources/tutorialPage_icon.png

5.19 KB
Loading

Resources/youtube_icon.png

-4.18 KB
Loading

Source/ActorInteractionPlugin/Private/Components/Interactable/ActorInteractableComponentBase.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ void UActorInteractableComponentBase::SetLifecycleCount_Implementation(const int
968968
switch (LifecycleMode)
969969
{
970970
case EInteractableLifecycle::EIL_Cycled:
971-
if (NewLifecycleCount < -1)
971+
if (NewLifecycleCount <= -1)
972972
{
973973
LifecycleCount = -1;
974974
OnLifecycleCountChanged.Broadcast(LifecycleCount);
@@ -1001,8 +1001,8 @@ void UActorInteractableComponentBase::SetCooldownPeriod_Implementation(const flo
10011001
switch (LifecycleMode)
10021002
{
10031003
case EInteractableLifecycle::EIL_Cycled:
1004-
LifecycleCount = FMath::Max(0.1f, NewCooldownPeriod);
1005-
OnLifecycleCountChanged.Broadcast(LifecycleCount);
1004+
CooldownPeriod = FMath::Max(0.1f, NewCooldownPeriod);
1005+
OnCooldownPeriodChanged.Broadcast(CooldownPeriod);
10061006
break;
10071007
case EInteractableLifecycle::EIL_OnlyOnce:
10081008
case EInteractableLifecycle::Default:
@@ -2086,7 +2086,7 @@ void UActorInteractableComponentBase::ProcessStartHighlight()
20862086
{
20872087
case EHighlightType::EHT_PostProcessing:
20882088
{
2089-
for (const auto Itr : HighlightableComponents)
2089+
for (const auto& Itr : HighlightableComponents)
20902090
{
20912091
Itr->SetRenderCustomDepth(bInteractionHighlight);
20922092
Itr->SetCustomDepthStencilValue(StencilID);
@@ -2095,7 +2095,7 @@ void UActorInteractableComponentBase::ProcessStartHighlight()
20952095
break;
20962096
case EHighlightType::EHT_OverlayMaterial:
20972097
{
2098-
for (const auto Itr : HighlightableComponents)
2098+
for (const auto& Itr : HighlightableComponents)
20992099
{
21002100
Itr->SetOverlayMaterial(HighlightMaterial);
21012101
}
@@ -2113,15 +2113,15 @@ void UActorInteractableComponentBase::ProcessStopHighlight()
21132113
{
21142114
case EHighlightType::EHT_PostProcessing:
21152115
{
2116-
for (const auto Itr : HighlightableComponents)
2116+
for (const auto& Itr : HighlightableComponents)
21172117
{
21182118
Itr->SetCustomDepthStencilValue(0);
21192119
}
21202120
}
21212121
break;
21222122
case EHighlightType::EHT_OverlayMaterial:
21232123
{
2124-
for (const auto Itr : HighlightableComponents)
2124+
for (const auto& Itr : HighlightableComponents)
21252125
{
21262126
Itr->SetOverlayMaterial(nullptr);
21272127
}
@@ -2210,6 +2210,8 @@ void UActorInteractableComponentBase::SetState_Server_Implementation(const EInte
22102210

22112211
void UActorInteractableComponentBase::PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent)
22122212
{
2213+
Super::PostEditChangeChainProperty(PropertyChangedEvent);
2214+
22132215
const FName PropertyName = (PropertyChangedEvent.MemberProperty != nullptr) ? PropertyChangedEvent.GetPropertyName() : NAME_None;
22142216

22152217
FString interactableName = GetName();

Source/ActorInteractionPlugin/Public/Helpers/ActorInteractionPluginLog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Log category definition
1111
DEFINE_LOG_CATEGORY(LogActorInteraction);
1212

13-
void PrintLog(const ELogVerbosity::Type Verbosity, const FString& Message, FLinearColor Color, float Duration)
13+
void PrintInteractionLog(const ELogVerbosity::Type Verbosity, const FString& Message, FLinearColor Color, float Duration)
1414
{
1515
if (!GWorld) return;
1616

Source/ActorInteractionPlugin/Public/Helpers/ActorInteractionPluginLog.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
ACTORINTERACTIONPLUGIN_API DECLARE_LOG_CATEGORY_EXTERN(LogActorInteraction, Display, All);
99

1010
// Forward declaration of the logging function
11-
void PrintLog(const ELogVerbosity::Type Verbosity, const FString& Message, FLinearColor Color, float Duration);
11+
void PrintInteractionLog(const ELogVerbosity::Type Verbosity, const FString& Message, FLinearColor Color, float Duration);
1212

1313
// Logging macro definitions
1414
#define LOG_INFO(Format, ...) \
1515
{ \
1616
FString FormattedMessage = FString::Printf(Format, ##__VA_ARGS__); \
17-
PrintLog(ELogVerbosity::Log, FormattedMessage, FLinearColor(0.0f, 1.0f, 0.0f), 5.0f); \
17+
PrintInteractionLog(ELogVerbosity::Log, FormattedMessage, FLinearColor(0.0f, 1.0f, 0.0f), 5.0f); \
1818
}
1919

2020
#define LOG_WARNING(Format, ...) \
2121
{ \
2222
FString FormattedMessage = FString::Printf(Format, ##__VA_ARGS__); \
23-
PrintLog(ELogVerbosity::Warning, FormattedMessage, FLinearColor(1.0f, 1.0f, 0.0f), 10.0f); \
23+
PrintInteractionLog(ELogVerbosity::Warning, FormattedMessage, FLinearColor(1.0f, 1.0f, 0.0f), 10.0f); \
2424
}
2525

2626
#define LOG_ERROR(Format, ...) \
2727
{ \
2828
FString FormattedMessage = FString::Printf(Format, ##__VA_ARGS__); \
29-
PrintLog(ELogVerbosity::Error, FormattedMessage, FLinearColor(1.0f, 0.0f, 0.0f), 15.0f); \
29+
PrintInteractionLog(ELogVerbosity::Error, FormattedMessage, FLinearColor(1.0f, 0.0f, 0.0f), 15.0f); \
3030
}

Source/ActorInteractionPluginEditor/ActorInteractionPluginEditor.Build.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public ActorInteractionPluginEditor(ReadOnlyTargetRules Target) : base(Target)
6161

6262
"UMG",
6363

64-
"GameplayTags"
64+
"GameplayTags",
65+
66+
"WorkspaceMenuStructure"
6567
}
6668
);
6769

Source/ActorInteractionPluginEditor/Private/ActorInteractionPluginEditor.cpp

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#include "AssetActions/InteractionSettingsConfig.h"
2626
#include "DetailsPanel/MounteaInteractableBase_DetailsPanel.h"
2727
#include "ISettingsModule.h"
28+
#include "WorkspaceMenuStructure.h"
29+
#include "WorkspaceMenuStructureModule.h"
30+
#include "HelpButton/InteractionSystemTutorialPage.h"
2831
#include "Interfaces/IHttpResponse.h"
2932

3033
#include "Interfaces/IMainFrameModule.h"
@@ -50,7 +53,7 @@ void FActorInteractionPluginEditor::StartupModule()
5053

5154
// Register Category
5255
{
53-
FAssetToolsModule::GetModule().Get().RegisterAdvancedAssetCategory(FName("MounteaInteraction"), FText::FromString(TEXT("\U0001F539 Mountea Interaction")));
56+
FAssetToolsModule::GetModule().Get().RegisterAdvancedAssetCategory(FName("MounteaInteraction"), FText::FromString(TEXT("👉🏻 Mountea Interaction")));
5457
}
5558

5659
// Thumbnails and Icons
@@ -180,6 +183,11 @@ void FActorInteractionPluginEditor::StartupModule()
180183

181184
UToolMenus::RegisterStartupCallback(FSimpleMulticastDelegate::FDelegate::CreateRaw(this, &FActorInteractionPluginEditor::RegisterMenus));
182185
}
186+
187+
// Register Tab Spawner
188+
{
189+
RegisterTabSpawners(FGlobalTabmanager::Get());
190+
}
183191
}
184192

185193
void FActorInteractionPluginEditor::ShutdownModule()
@@ -421,6 +429,31 @@ void FActorInteractionPluginEditor::LauncherButtonClicked() const
421429
}
422430
}
423431

432+
void FActorInteractionPluginEditor::RegisterTabSpawners(const TSharedRef<FTabManager>& TabManager)
433+
{
434+
TabManager->RegisterTabSpawner("InteractionSystemTutorial",
435+
FOnSpawnTab::CreateRaw(this, &FActorInteractionPluginEditor::OnSpawnInteractionSystemTutorialTab))
436+
.SetDisplayName(FText::FromString("Interaction System Tutorial"))
437+
.SetTooltipText(FText::FromString("Learn about the Mountea Interaction System"))
438+
.SetGroup(WorkspaceMenu::GetMenuStructure().GetDeveloperToolsMiscCategory())
439+
.SetIcon(FSlateIcon(FAppStyle::GetAppStyleSetName(), "InputBindingEditor.OutputLog"));
440+
}
441+
442+
TSharedRef<SDockTab> FActorInteractionPluginEditor::OnSpawnInteractionSystemTutorialTab(const FSpawnTabArgs& SpawnTabArgs)
443+
{
444+
return SNew(SDockTab)
445+
.TabRole(ETabRole::NomadTab)
446+
.Label(FText::FromString("Interaction System Tutorial"))
447+
[
448+
SNew(SInteractionSystemTutorialPage)
449+
];
450+
}
451+
452+
void FActorInteractionPluginEditor::TutorialButtonClicked() const
453+
{
454+
FGlobalTabmanager::Get()->TryInvokeTab(FName("InteractionSystemTutorial"));
455+
}
456+
424457
void FActorInteractionPluginEditor::RegisterMenus()
425458
{
426459
// Owner will be used for cleanup in call to UToolMenus::UnregisterOwner
@@ -478,6 +511,20 @@ void FActorInteractionPluginEditor::RegisterMenus()
478511
TSharedRef<SWidget> FActorInteractionPluginEditor::MakeMounteaMenuWidget() const
479512
{
480513
FMenuBuilder MenuBuilder(true, PluginCommands);
514+
MenuBuilder.BeginSection("MounteaMenu_Tools", LOCTEXT("MounteaMenuOptions_Tutorial", "Mountea Interaction Tutorial"));
515+
{
516+
MenuBuilder.AddMenuEntry(
517+
LOCTEXT("MounteaSystemEditor_TutorialButton_Label", "Interaction System Tutorial"),
518+
LOCTEXT("MounteaSystemEditor_TutorialButton_ToolTip", "📖 Open the Mountea Interaction System Tutorial"),
519+
FSlateIcon(FAIntPHelpStyle::GetStyleSetName(), "AIntPStyleSet.Tutorial"),
520+
FUIAction(
521+
FExecuteAction::CreateRaw(this, &FActorInteractionPluginEditor::TutorialButtonClicked)
522+
)
523+
);
524+
525+
};
526+
MenuBuilder.EndSection();
527+
481528
MenuBuilder.BeginSection("MounteaMenu_Tools", LOCTEXT("MounteaMenuOptions_Settings", "Mountea Interaction Settings"));
482529
{
483530
MenuBuilder.AddMenuEntry(

Source/ActorInteractionPluginEditor/Private/HelpButton/AIntPHelpStyle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ TSharedRef<FSlateStyleSet> FAIntPHelpStyle::Create()
8787
Style->Set("AIntPStyleSet.Icon.UBIcon", new IMAGE_BRUSH(TEXT("UnrealBucketIcon"), Icon16x16));
8888
Style->Set("AIntPStyleSet.Icon.MoneyIcon", new IMAGE_BRUSH(TEXT("MoneyIcon"), Icon16x16));
8989

90+
Style->Set("AIntPStyleSet.Tutorial", new IMAGE_BRUSH(TEXT("tutorialPage_icon"), Icon40x40));
9091
return Style;
9192
}
9293

0 commit comments

Comments
 (0)