using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using RamuneLib;
using RamuneLib.Utils;
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("Ramune.SkipIntroScreen")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ramune.SkipIntroScreen")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2ad61aeb-cc9d-4e06-912f-86a28175be75")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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 Ramune.SkipIntroScreen
{
[ContentWarningPlugin("com.ramune.SkipIntroScreen", "1.0.1", true)]
[BepInPlugin("com.ramune.SkipIntroScreen", "Skip Intro Screen", "1.0.1")]
[BepInProcess("Content Warning.exe")]
public class SkipIntroScreen : BaseUnityPlugin
{
public static SkipIntroScreen Instance;
public static readonly Harmony harmony = new Harmony("com.ramune.SkipIntroScreen");
public const string GUID = "com.ramune.SkipIntroScreen";
public const string Name = "Skip Intro Screen";
public const string Version = "1.0.1";
public static ManualLogSource logger => ((BaseUnityPlugin)Instance).Logger;
public void Awake()
{
Initializer.Initialize(harmony, ((BaseUnityPlugin)this).Logger, "Skip Intro Screen", "1.0.1");
}
}
}
namespace Ramune.SkipIntroScreen.Patches
{
[HarmonyPatch(typeof(IntroScreenAnimator))]
public static class IntroScreenAnimatorPatch
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void Start(IntroScreenAnimator __instance)
{
__instance.skipping = true;
((Behaviour)__instance.m_animator).enabled = false;
}
}
}
namespace RamuneLib
{
public static class Initializer
{
public static void Initialize(Harmony harmony, ManualLogSource logger, string name, string version, bool patchAll = true)
{
Variables.harmony = harmony;
Variables.logger = logger;
string text = "======================= " + name + " (" + version + ") =======================";
string message = new string('=', text.Length);
LoggerUtils.LogInfo(text);
if (patchAll)
{
LoggerUtils.LogInfo(">> Loading harmony patches for '" + name + " " + version + "'");
harmony.PatchAll();
LoggerUtils.LogInfo(">> Finished loading harmony patches for '" + name + " " + version + "'..");
}
LoggerUtils.LogInfo(message);
}
}
public static class Variables
{
public static class Paths
{
public static string PluginFolder => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static string AssetsFolder => Path.Combine(PluginFolder, "Assets");
public static string ConfigFolder()
{
string text = Path.Combine(Paths.ConfigPath, Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location));
if (!Directory.Exists(text))
{
LoggerUtils.LogWarning("Config folder not found at: '" + text + "'");
Directory.CreateDirectory(text);
LoggerUtils.LogInfo("Generated a config folder at: '" + text + "'");
}
return text;
}
}
public static Harmony harmony { get; set; }
public static ManualLogSource logger { get; set; }
}
}
namespace RamuneLib.Utils
{
public static class LoggerUtils
{
public static bool Debug;
public static void LogInfo(string message)
{
ManualLogSource logger = Variables.logger;
if (logger != null)
{
logger.LogInfo((object)message);
}
}
public static void LogDebug(string message)
{
ManualLogSource logger = Variables.logger;
if (logger != null)
{
logger.LogDebug((object)message);
}
}
public static void LogWarning(string message)
{
ManualLogSource logger = Variables.logger;
if (logger != null)
{
logger.LogWarning((object)message);
}
}
public static void LogError(string message)
{
ManualLogSource logger = Variables.logger;
if (logger != null)
{
logger.LogError((object)message);
}
}
public static void LogFatal(string message)
{
ManualLogSource logger = Variables.logger;
if (logger != null)
{
logger.LogFatal((object)message);
}
}
}
}