using System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Conditional Config Sync Plugin")] [assembly: AssemblyDescription("BepInEx bootstrap for the Conditional Config Sync package.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("shudnal")] [assembly: AssemblyProduct("Conditional Config Sync")] [assembly: AssemblyCopyright("Copyright © shudnal 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("815dc453-badf-4351-b8aa-92321836fcb3")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/shudnal/ConditionalConfigSync")] [assembly: AssemblyMetadata("License", "Unlicense")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ConditionalConfigSync { [BepInPlugin("_shudnal.ConditionalConfigSync", "Conditional Config Sync", "1.0.0")] [Description("Standalone BepInEx bootstrap that initializes ConditionalConfigSync.dll.")] public sealed class ConditionalConfigSyncPlugin : BaseUnityPlugin { [Description("BepInEx hard-dependency identifier used by mods that consume ConditionalConfigSync.")] public const string PluginGuid = "_shudnal.ConditionalConfigSync"; [Description("Display name of the standalone BepInEx plugin.")] public const string PluginName = "Conditional Config Sync"; [Description("Package version sourced from PluginInfo.PluginVersion.")] public const string PluginVersion = "1.0.0"; private const string PluginAssemblyName = "ConditionalConfigSync.Plugin"; private const string CoreAssemblyName = "ConditionalConfigSync"; private void Awake() { string text = typeof(ConditionalConfigSyncPlugin).Assembly.GetName().Name ?? string.Empty; if (!string.Equals(text, "ConditionalConfigSync.Plugin", StringComparison.Ordinal)) { ((BaseUnityPlugin)this).Logger.LogFatal((object)("Embedded ConditionalConfigSync bootstrap detected inside assembly '" + text + "'. The bootstrap plugin must only run from ConditionalConfigSync.Plugin.dll.")); ((Behaviour)this).enabled = false; return; } string text2 = typeof(ConditionalConfigSync).Assembly.GetName().Name ?? string.Empty; if (!string.Equals(text2, "ConditionalConfigSync", StringComparison.Ordinal)) { ((BaseUnityPlugin)this).Logger.LogFatal((object)("ConditionalConfigSync core was resolved from unsupported assembly '" + text2 + "'. Remove embedded copies and install the standalone ConditionalConfigSync mod.")); ((Behaviour)this).enabled = false; } else { ConditionalConfigSync.InitializeRuntime(); } } private void OnDestroy() { ConditionalConfigSync.ShutdownRuntime(); } } }