Files
SVSimServer/SVSim.BattleEngine/Shim/External/LooseEnds.cs
gamer147 6e9c5c059f port(m1): wave 6i — Networking/Facebook/BestHTTP CS0103 statics (210->198)
- UnityEngine.Networking: UnityWebRequestTexture, DownloadHandlerTexture, DownloadHandlerAssetBundle.
- Facebook.Unity.AccessToken (CurrentAccessToken/TokenString/UserId).
- BestHTTP.Decompression.Zlib.GZipStream.UncompressBuffer; global DllCheck.Test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 00:20:22 -04:00

176 lines
6.9 KiB
C#

// AUTHORED SHIM (not copied). Final loose ends for the M1 compile: (1) namespace
// "anchors" -- empty `using` targets in tangentially-copied files reference these
// namespaces, which must merely exist; a single internal anchor type declares them.
// (2) a few concrete tangential types referenced directly. (3) minimal third-party
// serialization/SDK surface. None is on the battle-resolution path.
namespace Wizard.AutoTest { internal class _ShimAnchor { } }
namespace Wizard.Title { internal class _ShimAnchor { } }
namespace Wizard.ErrorDialog { internal class _ShimAnchor { } }
namespace Wizard.Bingo { internal class _ShimAnchor { } }
namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase { internal class _ShimAnchor { } }
namespace Wizard.Scripts.Network.Data.TaskData.ItemPurchase { internal class _ShimAnchor { } }
namespace Wizard.Scripts.Network.Data.TaskData.SkinPurchase { internal class _ShimAnchor { } }
namespace Wizard.Scripts.Network.Data.TaskData.SpotCardExchange { internal class _ShimAnchor { } }
// These are NAMESPACES (used as `using` targets in copied files), not types.
namespace Wizard.DeckSelect.FirstDisplayPageIndexGetter { internal class _ShimAnchor { } }
namespace Wizary.StorySelectionWorld { internal class _ShimAnchor { } }
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick { internal class _ShimAnchor { } }
// IManager: a Cute manager interface implemented by NetworkManager/ResourcesManager.
namespace Cute { public interface IManager { } }
// ---- third-party serialization / SDK (minimal surface) ----
namespace MessagePack
{
public static class MessagePackSerializer
{
public static byte[] Serialize<T>(T obj) => new byte[0];
public static T Deserialize<T>(byte[] bytes) => default;
public static string ToJson(byte[] bytes) => "";
public static byte[] FromJson(string json) => new byte[0];
}
}
namespace MiniJSON
{
public static class Json
{
public static object Deserialize(string json) => null;
public static string Serialize(object obj) => "";
}
}
namespace Steamworks
{
// Steam callback wrapper. Engine constructs via Callback<T>.Create(handler).
public sealed class Callback<T>
{
public delegate void DispatchDelegate(T param);
public static Callback<T> Create(DispatchDelegate func) => new Callback<T>();
}
public enum EResult { k_EResultOK = 1 }
public struct AppId_t
{
public uint m_AppId;
public AppId_t(uint v) { m_AppId = v; }
public static explicit operator AppId_t(uint v) => new AppId_t(v);
public override string ToString() => m_AppId.ToString();
}
public struct CSteamID { public ulong m_SteamID; }
public struct HAuthTicket { }
public struct SteamNetworkingIdentity { }
// Microtransaction auth response struct (callback payload).
public struct MicroTxnAuthorizationResponse_t
{
public AppId_t m_unAppID;
public ulong m_ulOrderID;
public byte m_bAuthorized;
}
public struct GetAuthSessionTicketResponse_t
{
public HAuthTicket m_hAuthTicket;
public EResult m_eResult;
}
// Steam warning-message hook delegate.
public delegate void SteamAPIWarningMessageHook_t(int severity, System.Text.StringBuilder debugText);
public static class SteamAPI
{
public static bool Init() => false;
public static bool RestartAppIfNecessary(AppId_t appId) => false;
public static void RunCallbacks() { }
public static void Shutdown() { }
}
public static class SteamUser
{
public static HAuthTicket GetAuthSessionTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket, ref SteamNetworkingIdentity identity) { pcbTicket = 0; return default; }
public static CSteamID GetSteamID() => default;
}
public static class SteamUtils { public static AppId_t GetAppID() => default; }
public static class SteamClient { public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t hook) { } }
}
// AOT P/Invoke callback attribute (IL2CPP) + StandaloneFileBrowser anchor.
namespace AOT
{
public sealed class MonoPInvokeCallbackAttribute : System.Attribute
{
public MonoPInvokeCallbackAttribute(System.Type type) { }
}
}
namespace SFB
{
public struct ExtensionFilter
{
public string Name;
public string[] Extensions;
public ExtensionFilter(string name, params string[] extensions) { Name = name; Extensions = extensions; }
}
public static class StandaloneFileBrowser
{
public static string[] OpenFilePanel(string title, string directory, ExtensionFilter[] extensions, bool multiselect) => System.Array.Empty<string>();
public static string[] OpenFilePanel(string title, string directory, string extension, bool multiselect) => System.Array.Empty<string>();
}
}
// ---- third-party SDK namespace anchors (referenced via `using`) ----
namespace Facebook { internal class _ShimAnchor { } }
namespace Facebook.Unity
{
public interface ILoginResult
{
string Error { get; }
bool Cancelled { get; }
string RawResult { get; }
}
public delegate void FacebookDelegate<T>(T result);
public class AccessToken { public string TokenString => ""; public string UserId => ""; public static AccessToken CurrentAccessToken => null; }
public static class FB
{
public static bool IsLoggedIn => false;
public static void LogInWithReadPermissions(System.Collections.Generic.List<string> permissions, FacebookDelegate<ILoginResult> callback) { }
public static void LogOut() { }
}
}
namespace RedShellSDK
{
public static class RedShellSDK
{
public static void SetApiKey(string apiKey) { }
public static void SetUserId(string userId) { }
public static void SetVerboseLogs(bool verbose) { }
public static void MarkConversion() { }
public static void LogEvent(string type) { }
}
}
namespace ZXing
{
public enum BarcodeFormat { QR_CODE, AZTEC, CODE_128, EAN_13 }
public sealed class Result { public string Text => ""; }
public class BarcodeWriter
{
public BarcodeFormat Format { get; set; }
public ZXing.QrCode.QrCodeEncodingOptions Options { get; set; }
public UnityEngine.Color32[] Write(string contents) => System.Array.Empty<UnityEngine.Color32>();
}
public class BarcodeReader
{
public bool AutoRotate { get; set; }
public bool TryHarder { get; set; }
public Result Decode(UnityEngine.Color32[] rawColor, int width, int height) => null;
}
}
namespace ZXing.QrCode
{
public class QrCodeEncodingOptions
{
public ZXing.QrCode.Internal.ErrorCorrectionLevel ErrorCorrection { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public int Margin { get; set; }
}
}
namespace ZXing.QrCode.Internal { public enum ErrorCorrectionLevel { L, M, Q, H } }