Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of No Startup Logo v1.1.4
plugins/A2.NoStartupLogo.dll
Decompiled a week agousing System; using System.Diagnostics; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using A2.NoStartupLogo.Reflection; using BepInEx; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("No Startup Logo")] [assembly: AssemblyDescription("Disables Coffee Stain and Iron Gate logos displayed at startup.")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("No Startup Logo")] [assembly: AssemblyCopyright("")] [assembly: Guid("c8fa7bd8-319c-3746-62a4-7a1a1222af68")] [assembly: AssemblyFileVersion("1.1.4.0")] [assembly: AssemblyVersion("1.1.4.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; } } } internal static class PluginInfo { public const string PluginGUID = "A2.NoStartupLogo"; public const string PluginName = "No Startup Logo"; public const string PluginDescription = "Disables Coffee Stain and Iron Gate logos displayed at startup."; public const string PluginSemanticVersion = "1.1.4"; public const string PluginFullVersion = "1.1.4.0"; } namespace A2.NoStartupLogo { [BepInPlugin("A2.NoStartupLogo", "No Startup Logo", "1.1.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] internal class Plugin : BaseUnityPlugin { private static readonly Harmony _harmony = new Harmony("A2.NoStartupLogo"); private static bool _isPatched = false; public void Awake() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 if ((int)SystemInfo.graphicsDeviceType != 4) { _isPatched = true; _harmony.PatchAll(); } } public void OnDestroy() { if (_isPatched) { _harmony.UnpatchSelf(); } } } } namespace A2.NoStartupLogo.Reflection { internal static class ReflectionCompiler<TInstance> { public static Action<TInstance, TField> CompileFieldSetter<TField>(string fieldName) { if (fieldName == null) { throw new ArgumentNullException("fieldName"); } FieldInfo field = typeof(TInstance).GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) ?? throw new ArgumentException("Field " + fieldName + " does not exist."); ParameterExpression parameterExpression = Expression.Parameter(typeof(TInstance), string.Empty); ParameterExpression parameterExpression2 = Expression.Parameter(typeof(TField), string.Empty); return Expression.Lambda<Action<TInstance, TField>>(Expression.Assign(Expression.Field(parameterExpression, field), parameterExpression2), new ParameterExpression[2] { parameterExpression, parameterExpression2 }).Compile(); } } } namespace A2.NoStartupLogo.Patches { public static class SceneLoaderPatch { [HarmonyPatch(typeof(SceneLoader), "Awake")] public static class Awake { public static void Postfix(SceneLoader __instance) { set_SceneLoader_showLogos(__instance, arg2: false); } } private static readonly Action<SceneLoader, bool> set_SceneLoader_showLogos = ReflectionCompiler<SceneLoader>.CompileFieldSetter<bool>("_showLogos"); } }