Skip to content

Commit

Permalink
Merge branch 'dev-4.0-new-remap' into dev-4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchangelWTF committed Jan 18, 2025
2 parents 3e82c94 + 348b806 commit 9c46ce2
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 19 deletions.
12 changes: 6 additions & 6 deletions Fika.Headless/FikaHeadlessPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ protected void Awake()
new ValidateFormatPatch2().Enable();
new ValidateFormatPatch3().Enable();
new GameWorld_OnGameStarted_Patch().Enable();
new MainMenuController_method_48_Patch().Enable();
new MainMenuControllerClass_method_48_Patch().Enable();
new ConsoleScreen_OnProfileReceive_Patch().Enable();
new Class442_Run_Patch().Enable();
new Player_VisualPass_Patch().Enable();
new IsReflexAvailablePatch().Enable();
new AudioSource_Play_Transpiler().Enable();
new LevelSettings_ApplySettings_Transpiler().Enable();
new LevelSettings_ApplyTreeWindSettings_Transpiler().Enable();
new MainMenuController_method_45_Patch().Enable();
new MainMenuController_method_46_Patch().Enable();
new MainMenuController_method_73_Patch().Enable();
new MainMenuController_method_74_Patch().Enable();
new MainMenuControllerClass_method_45_Patch().Enable();
new MainMenuControllerClass_method_46_Patch().Enable();
new MainMenuControllerClass_method_73_Patch().Enable();
new MainMenuControllerClass_method_74_Patch().Enable();
new LocaleManagerClass_String_0_Patch().Enable();
new TarkovApplication_method_39_Patch().Enable();
new MovementContext_AnimatorStatesLateUpdate_Update().Enable();
Expand Down Expand Up @@ -372,7 +372,7 @@ private IEnumerator BeginFikaStartRaid(StartHeadlessRequest request, ISession se
raidSettings.RaidMode = ERaidMode.Local;
raidSettings.IsPveOffline = true;

MainMenuController mmc = Traverse.Create(tarkovApplication).Field<MainMenuController>("mainMenuController").Value;
MainMenuControllerClass mmc = Traverse.Create(tarkovApplication).Field<MainMenuControllerClass>("mainMenuController").Value;
Traverse mmcTraverse = Traverse.Create(mmc);
mmcTraverse.Field<RaidSettings>("raidSettings_0").Value = raidSettings;
mmcTraverse.Field<RaidSettings>("raidSettings_1").Value = raidSettings;
Expand Down
21 changes: 21 additions & 0 deletions Fika.Headless/Patches/DestroyGraphics/RainFallDrops_Awake_Patch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using SPT.Reflection.Patching;
using UnityEngine;
using System.Reflection;

namespace Fika.Headless.Patches.DestroyGraphics
{
internal class RainFallDrops_Awake_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(RainFallDrops).GetMethod(nameof(RainFallDrops.smethod_0));
}

[PatchPrefix]
public static bool Prefix(int count, ref Mesh __result)
{
__result = new();
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ namespace Fika.Headless.Patches
/// <summary>
/// This patch simulates clicking "Next" by calling the method bound to the event of the button
/// </summary>
internal class MainMenuController_method_45_Patch : ModulePatch
internal class MainMenuControllerClass_method_45_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(MainMenuController).GetMethod(nameof(MainMenuController.method_45));
return typeof(MainMenuControllerClass).GetMethod(nameof(MainMenuControllerClass.method_45));
}

[PatchPrefix]
public static bool Prefix(MainMenuController __instance)
public static bool Prefix(MainMenuControllerClass __instance)
{
__instance.method_77();
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ namespace Fika.Headless.Patches
/// <summary>
/// This patch simulates clicking "Next" by calling the method bound to the event of the button
/// </summary>
internal class MainMenuController_method_46_Patch : ModulePatch
internal class MainMenuControllerClass_method_46_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(MainMenuController).GetMethod(nameof(MainMenuController.method_46));
return typeof(MainMenuControllerClass).GetMethod(nameof(MainMenuControllerClass.method_46));
}

[PatchPrefix]
public static bool Prefix(MainMenuController __instance)
public static bool Prefix(MainMenuControllerClass __instance)
{
__instance.method_47();
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Fika.Headless.Patches
/// <summary>
/// This patch skips checking for keys (e.g. Labs)
/// </summary>
public class MainMenuController_method_48_Patch : ModulePatch
public class MainMenuControllerClass_method_48_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(MainMenuController).GetMethod(nameof(MainMenuController.method_48));
return typeof(MainMenuControllerClass).GetMethod(nameof(MainMenuControllerClass.method_48));
}

[PatchPrefix]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Fika.Headless.Patches
/// <summary>
/// This patch skips a bunch of unneccesary methods
/// </summary>
internal class MainMenuController_method_73_Patch : ModulePatch
internal class MainMenuControllerClass_method_73_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(MainMenuController).GetMethod(nameof(MainMenuController.method_73));
return typeof(MainMenuControllerClass).GetMethod(nameof(MainMenuControllerClass.method_73));
}

[PatchPrefix]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ namespace Fika.Headless.Patches
/// <summary>
/// This patch ensures that the raid settings are skipped if you are playing as a scav
/// </summary>
internal class MainMenuController_method_74_Patch : ModulePatch
internal class MainMenuControllerClass_method_74_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(MainMenuController).GetMethod(nameof(MainMenuController.method_74));
return typeof(MainMenuControllerClass).GetMethod(nameof(MainMenuControllerClass.method_74));
}

[PatchPostfix]
public static void Postfix(MainMenuController __instance, RaidSettings ___raidSettings_0)
public static void Postfix(MainMenuControllerClass __instance, RaidSettings ___raidSettings_0)
{
if (___raidSettings_0.IsScav)
{
Expand Down
Binary file modified References/hollowed.dll
Binary file not shown.
Binary file modified References/spt-common.dll
Binary file not shown.
Binary file modified References/spt-core.dll
Binary file not shown.
Binary file modified References/spt-custom.dll
Binary file not shown.
Binary file modified References/spt-debugging.dll
Binary file not shown.
Binary file modified References/spt-reflection.dll
Binary file not shown.
Binary file modified References/spt-singleplayer.dll
Binary file not shown.

0 comments on commit 9c46ce2

Please sign in to comment.