mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
epic check in interop instead of qsbcore
This commit is contained in:
parent
ac5a688eea
commit
3efb07896a
@ -5,9 +5,6 @@ using static EntitlementsManager;
|
||||
|
||||
namespace EpicRerouter.ProcessSide
|
||||
{
|
||||
/// <summary>
|
||||
/// runs on process side
|
||||
/// </summary>
|
||||
public static class EpicEntitlementRetriever
|
||||
{
|
||||
private const string _eosDlcItemID = "49a9ac61fe464cbf8c8c73f46b3f1133";
|
||||
|
@ -5,9 +5,6 @@ using System;
|
||||
|
||||
namespace EpicRerouter.ProcessSide
|
||||
{
|
||||
/// <summary>
|
||||
/// runs on process side
|
||||
/// </summary>
|
||||
public static class EpicPlatformManager
|
||||
{
|
||||
private const string _eosProductID = "prod-starfish";
|
||||
|
@ -1,14 +1,12 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using static EntitlementsManager;
|
||||
|
||||
namespace EpicRerouter.ProcessSide
|
||||
{
|
||||
/// <summary>
|
||||
/// runs on process side
|
||||
/// </summary>
|
||||
internal static class Program
|
||||
public static class Program
|
||||
{
|
||||
public static string ProductName;
|
||||
public static string Version;
|
||||
@ -17,10 +15,15 @@ namespace EpicRerouter.ProcessSide
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var assemblyLocation in args)
|
||||
ProductName = args[1];
|
||||
Console.WriteLine($"product name = {ProductName}");
|
||||
Version = args[2];
|
||||
Console.WriteLine($"version = {Version}");
|
||||
|
||||
foreach (var assemblyLocation in args.Skip(2))
|
||||
{
|
||||
var assembly = Assembly.LoadFile(assemblyLocation);
|
||||
Console.WriteLine($"loaded {assembly}");
|
||||
Console.WriteLine($"loaded {assembly} at {assemblyLocation}");
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
@ -9,15 +9,18 @@ using Debug = UnityEngine.Debug;
|
||||
|
||||
namespace EpicRerouter.QsbSide
|
||||
{
|
||||
/// <summary>
|
||||
/// runs on qsb side
|
||||
/// </summary>
|
||||
public static class Interop
|
||||
{
|
||||
public static AsyncOwnershipStatus OwnershipStatus { get; private set; } = AsyncOwnershipStatus.NotReady;
|
||||
|
||||
public static void Go()
|
||||
{
|
||||
if (typeof(EpicPlatformManager).GetField("_platformInterface", BindingFlags.NonPublic | BindingFlags.Instance) == null)
|
||||
{
|
||||
Log("not epic. don't reroute");
|
||||
// return;
|
||||
}
|
||||
|
||||
Log("go");
|
||||
|
||||
Harmony.CreateAndPatchAll(typeof(Patches));
|
||||
|
@ -2,11 +2,8 @@
|
||||
|
||||
namespace EpicRerouter.QsbSide
|
||||
{
|
||||
/// <summary>
|
||||
/// runs on qsb side
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(ProcessSide.EpicPlatformManager))]
|
||||
internal static class Patches
|
||||
public static class Patches
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("instance", MethodType.Getter)]
|
||||
|
@ -52,10 +52,7 @@ namespace QSB
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
if (true || typeof(EpicPlatformManager).Assembly.GetTypes().Any(x => x.Name == "EpicEntitlementRetriever"))
|
||||
{
|
||||
EpicRerouter.QsbSide.Interop.Go();
|
||||
}
|
||||
EpicRerouter.QsbSide.Interop.Go();
|
||||
|
||||
UIHelper.ReplaceUI(UITextType.PleaseUseController,
|
||||
"<color=orange>Quantum Space Buddies</color> is best experienced with friends...");
|
||||
|
Loading…
x
Reference in New Issue
Block a user