Skip to content

Commit 7b3d1ae

Browse files
Merge branch '5.5_dev' into 5.5
2 parents 8d11364 + 881b833 commit 7b3d1ae

File tree

11 files changed

+80
-40
lines changed

11 files changed

+80
-40
lines changed

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.3.55",
4+
"VersionName": "4.2.4.55",
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/FolderIcon.png

4.64 KB
Loading

Resources/LevelIcon.png

7.93 KB
Loading

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,16 +1270,9 @@ void UActorInteractableComponentBase::InteractorFound_Implementation(const TScri
12701270
if (Execute_CanBeTriggered(this))
12711271
{
12721272
Execute_SetInteractor(this, FoundInteractor);
1273-
1274-
if (UMounteaInteractionSystemBFL::CanExecuteCosmeticEvents(GetWorld()))
1275-
{
1276-
ProcessToggleActive(true);
1277-
}
1278-
else
1279-
{
1280-
InteractorFound_Client(FoundInteractor);
1281-
ProcessToggleActive_Client(true);
1282-
}
1273+
1274+
InteractorFound_Client(FoundInteractor);
1275+
ProcessToggleActive_Client(true);
12831276

12841277
Execute_OnInteractorFoundEvent(this, FoundInteractor);
12851278
}
@@ -1303,8 +1296,6 @@ void UActorInteractableComponentBase::InteractorLost_Implementation(const TScrip
13031296

13041297
GetWorld()->GetTimerManager().ClearTimer(Timer_Interaction);
13051298
GetWorld()->GetTimerManager().ClearTimer(Timer_ProgressExpiration);
1306-
1307-
//GetWorld()->GetTimerManager().ClearTimer(Timer_Cooldown);
13081299

13091300
if (GetOwner() && GetOwner()->HasAuthority())
13101301
{
@@ -1540,19 +1531,19 @@ void UActorInteractableComponentBase::InteractionCooldownCompleted_Implementatio
15401531
{
15411532
if (Interactor->Execute_GetActiveInteractable(Interactor.GetObject()) == this)
15421533
{
1543-
ProcessToggleActive(true);
1534+
ProcessToggleActive_Client(true);
15441535

15451536
Execute_SetState(this, EInteractableStateV2::EIS_Awake);
15461537
}
15471538
else
15481539
{
1549-
ProcessToggleActive(false);
1540+
ProcessToggleActive_Client(false);
15501541
Execute_SetState(this, DefaultInteractableState);
15511542
}
15521543
}
15531544
else
15541545
{
1555-
ProcessToggleActive(false);
1546+
ProcessToggleActive_Client(false);
15561547
Execute_SetState(this, DefaultInteractableState);
15571548
}
15581549

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

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ void UActorInteractableComponentMash::OnInteractionCompletedCallback()
5555
if (Execute_TriggerCooldown(this)) return;
5656
}
5757

58-
OnInteractionCompleted.Broadcast(GetWorld()->GetTimeSeconds(), Execute_GetInteractor(this));
58+
if (ActualMashAmount >= MinMashAmountRequired)
59+
{
60+
OnInteractionCompleted.Broadcast(GetWorld()->GetTimeSeconds(), Execute_GetInteractor(this));
61+
}
62+
else
63+
{
64+
OnInteractionFailed.Broadcast();
65+
}
66+
67+
CleanupComponent();
5968
}
6069

6170
void UActorInteractableComponentMash::CleanupComponent()
@@ -133,20 +142,6 @@ void UActorInteractableComponentMash::InteractionCanceled_Implementation()
133142
CleanupComponent();
134143
}
135144

136-
void UActorInteractableComponentMash::InteractionCompleted_Implementation(const float& TimeCompleted, const TScriptInterface<IActorInteractorInterface>& CausingInteractor)
137-
{
138-
if (ActualMashAmount >= MinMashAmountRequired)
139-
{
140-
Super::InteractionCompleted_Implementation(TimeCompleted, CausingInteractor);
141-
}
142-
else
143-
{
144-
OnInteractionFailed.Broadcast();
145-
}
146-
147-
CleanupComponent();
148-
}
149-
150145
int32 UActorInteractableComponentMash::GetMinMashAmountRequired() const
151146
{ return MinMashAmountRequired; }
152147

Source/ActorInteractionPlugin/Private/Helpers/MounteaInteractionSystemBFL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@ bool UMounteaInteractionSystemBFL::IsInputKeyPairSupported(APlayerController* Pl
251251
}
252252

253253
return false;
254-
}
254+
}

Source/ActorInteractionPlugin/Public/Components/Interactable/ActorInteractableComponentMash.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class ACTORINTERACTIONPLUGIN_API UActorInteractableComponentMash : public UActor
3636
virtual void InteractionStarted_Implementation(const float& TimeStarted, const TScriptInterface<IActorInteractorInterface>& CausingInteractor) override;
3737
virtual void InteractionStopped_Implementation(const float& TimeStarted, const TScriptInterface<IActorInteractorInterface>& CausingInteractor) override;
3838
virtual void InteractionCanceled_Implementation() override;
39-
virtual void InteractionCompleted_Implementation(const float& TimeCompleted, const TScriptInterface<IActorInteractorInterface>& CausingInteractor) override;
4039

4140
protected:
4241

Source/ActorInteractionPluginEditor/Private/ActorInteractionPluginEditor.cpp

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
#include "AssetActions/InteractableComponentAssetActions.h"
1414

1515
#include "AssetToolsModule.h"
16+
#include "ContentBrowserModule.h"
17+
#include "FileHelpers.h"
1618
#include "GameplayTagsManager.h"
1719
#include "HttpModule.h"
20+
#include "IContentBrowserSingleton.h"
1821
#include "HelpButton/AIntPCommands.h"
1922
#include "HelpButton/AIntPHelpStyle.h"
2023
#include "Kismet2/KismetEditorUtilities.h"
@@ -28,6 +31,7 @@
2831
#include "WorkspaceMenuStructure.h"
2932
#include "WorkspaceMenuStructureModule.h"
3033
#include "HelpButton/InteractionSystemTutorialPage.h"
34+
#include "Helpers/MounteaInteractionSystemEditorLog.h"
3135
#include "Interfaces/IHttpResponse.h"
3236

3337
#include "Interfaces/IMainFrameModule.h"
@@ -36,7 +40,7 @@
3640

3741
DEFINE_LOG_CATEGORY(ActorInteractionPluginEditor);
3842

39-
const FString ChangelogURL = FString("https://raw.githubusercontent.com/Mountea-Framework/MounteaInteractionSystem/5.1/CHANGELOG.md");
43+
const FString ChangelogURL = FString("https://raw.githubusercontent.com/Mountea-Framework/MounteaInteractionSystem/master/CHANGELOG.md");
4044

4145
#define LOCTEXT_NAMESPACE "FActorInteractionPluginEditor"
4246

@@ -519,13 +523,43 @@ TSharedRef<SWidget> FActorInteractionPluginEditor::MakeMounteaMenuWidget() const
519523
FSlateIcon(FAIntPHelpStyle::GetStyleSetName(), "AIntPStyleSet.Tutorial"),
520524
FUIAction(
521525
FExecuteAction::CreateRaw(this, &FActorInteractionPluginEditor::TutorialButtonClicked)
522-
)
523-
);
526+
)
527+
);
528+
529+
MenuBuilder.AddMenuEntry(
530+
LOCTEXT("MounteaSystemEditor_OpenExampleLevel_Label", "Open Example Level"),
531+
LOCTEXT("MounteaSystemEditor_OpenExampleLevel_ToolTip", "🌄 Opens an example level demonstrating Mountea Interaction System"),
532+
FSlateIcon(FAIntPHelpStyle::GetStyleSetName(), "AIntPStyleSet.Level"),
533+
FUIAction(
534+
FExecuteAction::CreateLambda([]()
535+
{
536+
const FString mapPath = TEXT("/ActorInteractionPlugin/Example/M_Example");
537+
if (FPackageName::DoesPackageExist(mapPath))
538+
FEditorFileUtils::LoadMap(mapPath, false, true);
539+
else
540+
EDITOR_LOG_ERROR(TEXT("Example map not found at:\nContent/Mountea/Maps/ExampleMap.umap"))
541+
})
542+
)
543+
);
524544

545+
MenuBuilder.AddMenuEntry(
546+
LOCTEXT("MounteaSystemEditor_OpenPluginFolder_Label", "Open Plugin Folder"),
547+
LOCTEXT("MounteaSystemEditor_OpenPluginFolder_ToolTip", "📂 Open the Mountea plugin's folder on disk"),
548+
FSlateIcon(FAIntPHelpStyle::GetStyleSetName(), "AIntPStyleSet.Folder"),
549+
FUIAction(
550+
FExecuteAction::CreateLambda([]()
551+
{
552+
const FContentBrowserModule& contentBrowserModule = FModuleManager::LoadModuleChecked<FContentBrowserModule>("ContentBrowser");
553+
TArray<FString> folderPaths;
554+
folderPaths.Add(TEXT("/ActorInteractionPlugin"));
555+
contentBrowserModule.Get().SetSelectedPaths(folderPaths, true);
556+
})
557+
)
558+
);
525559
};
526560
MenuBuilder.EndSection();
527561

528-
MenuBuilder.BeginSection("MounteaMenu_Tools", LOCTEXT("MounteaMenuOptions_Settings", "Mountea Interaction Settings"));
562+
MenuBuilder.BeginSection("MounteaMenu_Settings", LOCTEXT("MounteaMenuOptions_Settings", "Mountea Interaction Settings"));
529563
{
530564
MenuBuilder.AddMenuEntry(
531565
LOCTEXT("MounteaSystemEditor_SettingsButton_Label", "Mountea Interaction Settings"),

Source/ActorInteractionPluginEditor/Private/HelpButton/AIntPHelpStyle.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ TSharedRef<FSlateStyleSet> FAIntPHelpStyle::Create()
8888
Style->Set("AIntPStyleSet.Icon.MoneyIcon", new IMAGE_BRUSH(TEXT("MoneyIcon"), Icon16x16));
8989

9090
Style->Set("AIntPStyleSet.Tutorial", new IMAGE_BRUSH(TEXT("tutorialPage_icon"), Icon40x40));
91+
92+
Style->Set("AIntPStyleSet.Level", new IMAGE_BRUSH(TEXT("LevelIcon"), Icon40x40));
93+
Style->Set("AIntPStyleSet.Folder", new IMAGE_BRUSH(TEXT("FolderIcon"), Icon40x40));
9194
return Style;
9295
}
9396

Source/ActorInteractionPluginEditor/Private/Popup/AIntPPopup.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,23 @@ void AIntPPopup::FormatTextWithTags(FString& SourceText, const FString& StartMar
102102
}
103103
}
104104

105+
bool AIntPPopup::IsVersionGreater(const FString& NewVersion, const FString& OldVersion)
106+
{
107+
TArray<FString> NewParts, OldParts;
108+
NewVersion.ParseIntoArray(NewParts, TEXT("."), true);
109+
OldVersion.ParseIntoArray(OldParts, TEXT("."), true);
110+
while (NewParts.Num() < 4) NewParts.Add(TEXT("0"));
111+
while (OldParts.Num() < 4) OldParts.Add(TEXT("0"));
112+
for (int32 i = 0; i < 4; ++i)
113+
{
114+
int32 NewNum = FCString::Atoi(*NewParts[i]);
115+
int32 OldNum = FCString::Atoi(*OldParts[i]);
116+
if (NewNum > OldNum) return true;
117+
if (NewNum < OldNum) return false;
118+
}
119+
return false;
120+
}
121+
105122
MounteaInteractionSystemPopup::FPluginVersion AIntPPopup::GetPluginVersion()
106123
{
107124
const FName PluginName = TEXT("ActorInteractionPlugin");
@@ -160,8 +177,8 @@ void AIntPPopup::Register(const FString& Changelog)
160177

161178
CurrentPluginVersion = ChangelogVersion;
162179
}
163-
164-
if (AIntPPopupConfig->PluginVersionUpdate != CurrentPluginVersion)
180+
181+
if (IsVersionGreater(CurrentPluginVersion, AIntPPopupConfig->PluginVersionUpdate))
165182
{
166183
AIntPPopupConfig->PluginVersionUpdate = CurrentPluginVersion;
167184
AIntPPopupConfig->SaveConfig(CPF_Config, *NormalizedConfigFilePath);

0 commit comments

Comments
 (0)