Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit 3787860

Browse files
committed
Add support for the weird new update
BL2/TPS came out on Epic and it does some shenanigans, this should be a valid enough fix (also update the vcxproj because I've been tinkering inside of it)
1 parent a9a95a5 commit 3787860

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Mods/ModMenuManager.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,24 @@ def HookModSelected(caller: UObject, function: UFunction, params: FStruct) -> bo
194194

195195
RunHook("WillowGame.MarketplaceGFxMovie.extOnOfferingChanged","HookModSelected", HookModSelected)
196196

197+
def HookHandleClick(caller: UObject, function: UFunction, params: FStruct) -> bool:
198+
if params.EventID == 4:
199+
gfxmovie = params.TheList.MyOwnerMovie
200+
if(gfxmovie.IsOverlayMenuOpen() == False):
201+
WPCOwner = unrealsdk.GetEngine().GamePlayers[0].Actor
202+
gfxmovie.CheckDownloadableContentListCompleted(WPCOwner.GetMyControllerId(), True)
203+
return False
204+
else:
205+
return True
206+
207+
RunHook("WillowGame.WillowScrollingListDataProviderFrontEnd.HandleClick", "HookHandleClick", HookHandleClick)
208+
209+
210+
def HookGetSubmenuForEvent(caller: UObject, function: UFunction, params: FStruct) -> bool:
211+
return (params.EventID != 4)
212+
213+
RunHook("WillowGame.WillowScrollingListDataProviderFrontEnd.GetSubmenuForEvent", "HookGetSubmenuForEvent", HookGetSubmenuForEvent)
214+
197215
def HookContentMenu(caller: UObject, function: UFunction, params: FStruct) -> bool:
198216
WPCOwner = unrealsdk.GetEngine().GamePlayers[0].Actor
199217
caller.CheckDownloadableContentListCompleted(WPCOwner.GetMyControllerId(), True)
@@ -204,7 +222,10 @@ def HookContentMenu(caller: UObject, function: UFunction, params: FStruct) -> bo
204222

205223
def HookMainMenuInput(caller: UObject, function: UFunction, params: FStruct) -> bool:
206224
if params.ukey == "M" and params.uevent == 1:
207-
caller.ShowMarketplaceMovie()
225+
gfxmovie = caller
226+
if(gfxmovie.IsOverlayMenuOpen() == False):
227+
WPCOwner = unrealsdk.GetEngine().GamePlayers[0].Actor
228+
gfxmovie.CheckDownloadableContentListCompleted(WPCOwner.GetMyControllerId(), True)
208229
return True
209230

210231

PythonSDK.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
108108
<ConfigurationType>DynamicLibrary</ConfigurationType>
109109
<UseDebugLibraries>true</UseDebugLibraries>
110-
<PlatformToolset>v140</PlatformToolset>
110+
<PlatformToolset>v142</PlatformToolset>
111111
<CharacterSet>Unicode</CharacterSet>
112112
<WholeProgramOptimization>true</WholeProgramOptimization>
113113
</PropertyGroup>
@@ -182,7 +182,7 @@
182182
<WarningLevel>Level3</WarningLevel>
183183
<Optimization>MinSpace</Optimization>
184184
<SDLCheck>false</SDLCheck>
185-
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BL2SDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
185+
<PreprocessorDefinitions>WINDOWS_IGNORE_PACKING_MISMATCH;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BL2SDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
186186
<ConformanceMode>true</ConformanceMode>
187187
<AdditionalIncludeDirectories>$(ProjectDir)src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
188188
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>

0 commit comments

Comments
 (0)