using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx.Logging; using Microsoft.CodeAnalysis; using PluginConfig.API; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Common")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+304dd3704322f5afdb700d92d726c7c4c0fd9322")] [assembly: AssemblyProduct("Common")] [assembly: AssemblyTitle("Common")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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] [Microsoft.CodeAnalysis.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; } } } namespace Common { public static class Statics { public static readonly ManualLogSource logSource = new ManualLogSource("Mods"); public static PluginConfigurator InitPluginConfig(string displayName, string guid) { string directoryName = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location); PluginConfigurator val = PluginConfigurator.Create(displayName, guid); val.SetIconWithURL("file://" + Path.Combine(directoryName, "icon.png")); return val; } public static Stream GetEmbeddedResource(string path) { string path2 = path; string fullPath = "UltrakillMods.EmbeddedResources." + path2; Stream manifestResourceStream = Assembly.GetCallingAssembly().GetManifestResourceStream(fullPath); Assert(manifestResourceStream != null, () => "Could not find embedded resource: " + path2 + " ('" + fullPath + "')"); return manifestResourceStream; } public static void Assert([DoesNotReturnIf(false)] bool cond, Func? msg = null) { if (!cond) { string text = "Assertion failed" + ((msg != null) ? (": " + msg()) : "!"); logSource.LogError((object)text); throw new Exception(text); } } public static R PrivateField(string fieldName, T instance) { string fieldName2 = fieldName; FieldInfo field = typeof(T).GetField(fieldName2, BindingFlags.Instance | BindingFlags.NonPublic); Assert(field != null, () => "Could not find field: " + fieldName2); return (R)field.GetValue(instance); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "Common"; public const string PLUGIN_NAME = "Common"; public const string PLUGIN_VERSION = "1.0.0"; } }