0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 08:30:45 -05:00

Fixed LoadOfflineRaidScreenPatch

This commit is contained in:
Chomp 2024-12-26 21:45:39 +00:00
parent 97eb3ef6ee
commit 89b5b44558

View File

@ -32,7 +32,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
_ = MatchmakerPlayerControllerClass.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!! _ = MatchmakerPlayerControllerClass.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
// `MatchmakerInsuranceScreen` OnShowNextScreen // `MatchmakerInsuranceScreen` OnShowNextScreen
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_46)); _onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_47));
_isLocalField = AccessTools.Field(typeof(MainMenuController), "bool_0"); _isLocalField = AccessTools.Field(typeof(MainMenuController), "bool_0");
_menuControllerField = typeof(TarkovApplication).GetFields(PatchConstants.PrivateFlags).FirstOrDefault(x => x.FieldType == typeof(MainMenuController)); _menuControllerField = typeof(TarkovApplication).GetFields(PatchConstants.PrivateFlags).FirstOrDefault(x => x.FieldType == typeof(MainMenuController));
@ -46,7 +46,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
{ {
// `MatchMakerSelectionLocationScreen` OnShowNextScreen // `MatchMakerSelectionLocationScreen` OnShowNextScreen
return AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_73)); return AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_74));
} }
[PatchTranspiler] [PatchTranspiler]
@ -131,7 +131,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen; gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
// `MatchmakerOfflineRaidScreen` OnShowReadyScreen // `MatchmakerOfflineRaidScreen` OnShowReadyScreen
gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, nameof(MainMenuController.method_77)); gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, nameof(MainMenuController.method_78));
gclass.ShowScreen(EScreenState.Queued); gclass.ShowScreen(EScreenState.Queued);
} }