quantum-space-buddies/EpicRerouter/ModSide/Patches.cs

44 lines
1.0 KiB
C#
Raw Normal View History

2022-02-07 05:38:14 +00:00
using HarmonyLib;
2022-02-07 08:45:22 +00:00
using static EntitlementsManager;
2022-02-07 05:38:14 +00:00
2022-02-07 07:09:55 +00:00
namespace EpicRerouter.ModSide
2022-02-07 05:38:14 +00:00
{
public static class Patches
2022-02-07 06:05:24 +00:00
{
2022-02-07 08:45:22 +00:00
public static void Apply() => Harmony.CreateAndPatchAll(typeof(Patches));
2022-02-07 07:09:55 +00:00
[HarmonyPrefix]
[HarmonyPatch("instance", MethodType.Getter)]
private static bool GetInstance()
{
Interop.Log("instance get called. return nothing");
return false;
}
[HarmonyPrefix]
[HarmonyPatch("instance", MethodType.Setter)]
private static bool SetInstance()
{
Interop.Log("instance set called. do nothing");
return false;
}
[HarmonyPrefix]
[HarmonyPatch("platformInterface", MethodType.Getter)]
private static bool GetPlatformInterface()
{
Interop.Log("platformInterface get called. return nothing");
return false;
}
2022-02-07 08:45:22 +00:00
[HarmonyPrefix]
[HarmonyPatch(typeof(EntitlementsManager), nameof(EntitlementsManager.IsDlcOwned))]
private static bool IsDlcOwned(out AsyncOwnershipStatus __result)
{
__result = Interop.OwnershipStatus;
Interop.Log($"ownership status = {__result}");
2022-02-07 06:05:24 +00:00
return false;
}
}
2022-02-07 05:38:14 +00:00
}