mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 21:59:16 +00:00
38 lines
1004 B
C#
38 lines
1004 B
C#
using HarmonyLib;
|
|
using Microsoft.Xbox;
|
|
using QSB.Patches;
|
|
using QSB.Utility;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace QSB.SaveSync.Patches;
|
|
|
|
[HarmonyPatch(typeof(Gdk))]
|
|
internal class GdkPatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnModStart;
|
|
public override GameVendor PatchVendor => GameVendor.Gamepass;
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch("QueryBlobsCompleted")]
|
|
public static bool QueryBlobsCompleted(int hresult, Dictionary<string, uint> blobs)
|
|
{
|
|
if (!Gdk.Succeeded(hresult, "Query blobs"))
|
|
{
|
|
DebugLog.DebugWrite("[GDK] Query blobs failed!");
|
|
return false;
|
|
}
|
|
|
|
Debug.Log(string.Format("[GDK] Save system setup complete. Blobs returned: {0}", blobs.Count));
|
|
foreach (var keyValuePair in blobs)
|
|
{
|
|
DebugLog.DebugWrite(keyValuePair.Key);
|
|
}
|
|
|
|
QSBMSStoreProfileManager.SharedInstance.InvokeProfileSignInComplete();
|
|
QSBMSStoreProfileManager.SharedInstance.InvokeSaveSetupComplete();
|
|
SpinnerUI.Hide();
|
|
return false;
|
|
}
|
|
}
|