2024-07-04 23:59:44 +01:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using SPT.Reflection.Patching;
|
|
|
|
|
|
|
|
|
|
namespace SPT.SinglePlayer.Patches.MainMenu
|
|
|
|
|
{
|
|
|
|
|
public class PVEModeWelcomeMessagePatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
2024-08-29 11:41:21 +01:00
|
|
|
|
return AccessTools.Method(typeof(GClass1926), nameof(GClass1926.GetBoolForProfile));
|
2024-07-04 23:59:44 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPrefix]
|
2024-08-02 16:57:59 +01:00
|
|
|
|
public static bool PatchPrefix(ref bool __result, string variable)
|
2024-07-04 23:59:44 +01:00
|
|
|
|
{
|
|
|
|
|
if (variable == "pve_first_time")
|
|
|
|
|
{
|
|
|
|
|
__result = true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-28 12:52:54 +01:00
|
|
|
|
return true; // Do original method
|
2024-07-04 23:59:44 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|