Skip to content

Commit 41f9df3

Browse files
Merge branch '5.3_dev' into 5.3
2 parents 1b32c1f + 0f55c9a commit 41f9df3

14 files changed

+321
-16
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.53",
4+
"VersionName": "4.2.3.53",
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
@@ -972,7 +972,7 @@ void UActorInteractableComponentBase::SetLifecycleCount_Implementation(const int
972972
switch (LifecycleMode)
973973
{
974974
case EInteractableLifecycle::EIL_Cycled:
975-
if (NewLifecycleCount < -1)
975+
if (NewLifecycleCount <= -1)
976976
{
977977
LifecycleCount = -1;
978978
OnLifecycleCountChanged.Broadcast(LifecycleCount);
@@ -1005,8 +1005,8 @@ void UActorInteractableComponentBase::SetCooldownPeriod_Implementation(const flo
10051005
switch (LifecycleMode)
10061006
{
10071007
case EInteractableLifecycle::EIL_Cycled:
1008-
LifecycleCount = FMath::Max(0.1f, NewCooldownPeriod);
1009-
OnLifecycleCountChanged.Broadcast(LifecycleCount);
1008+
CooldownPeriod = FMath::Max(0.1f, NewCooldownPeriod);
1009+
OnCooldownPeriodChanged.Broadcast(CooldownPeriod);
10101010
break;
10111011
case EInteractableLifecycle::EIL_OnlyOnce:
10121012
case EInteractableLifecycle::Default:
@@ -2090,7 +2090,7 @@ void UActorInteractableComponentBase::ProcessStartHighlight()
20902090
{
20912091
case EHighlightType::EHT_PostProcessing:
20922092
{
2093-
for (const auto Itr : HighlightableComponents)
2093+
for (const auto& Itr : HighlightableComponents)
20942094
{
20952095
Itr->SetRenderCustomDepth(bInteractionHighlight);
20962096
Itr->SetCustomDepthStencilValue(StencilID);
@@ -2099,7 +2099,7 @@ void UActorInteractableComponentBase::ProcessStartHighlight()
20992099
break;
21002100
case EHighlightType::EHT_OverlayMaterial:
21012101
{
2102-
for (const auto Itr : HighlightableComponents)
2102+
for (const auto& Itr : HighlightableComponents)
21032103
{
21042104
Itr->SetOverlayMaterial(HighlightMaterial);
21052105
}
@@ -2117,15 +2117,15 @@ void UActorInteractableComponentBase::ProcessStopHighlight()
21172117
{
21182118
case EHighlightType::EHT_PostProcessing:
21192119
{
2120-
for (const auto Itr : HighlightableComponents)
2120+
for (const auto& Itr : HighlightableComponents)
21212121
{
21222122
Itr->SetCustomDepthStencilValue(0);
21232123
}
21242124
}
21252125
break;
21262126
case EHighlightType::EHT_OverlayMaterial:
21272127
{
2128-
for (const auto Itr : HighlightableComponents)
2128+
for (const auto& Itr : HighlightableComponents)
21292129
{
21302130
Itr->SetOverlayMaterial(nullptr);
21312131
}
@@ -2219,6 +2219,8 @@ void UActorInteractableComponentBase::ResetDefaults()
22192219

22202220
void UActorInteractableComponentBase::PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent)
22212221
{
2222+
Super::PostEditChangeChainProperty(PropertyChangedEvent);
2223+
22222224
const FName PropertyName = (PropertyChangedEvent.MemberProperty != nullptr) ? PropertyChangedEvent.GetPropertyName() : NAME_None;
22232225

22242226
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)