using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using LethalLevelLoader;
using Microsoft.CodeAnalysis;
using TritePlus.Patches;
using UnityEngine;
[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("SkittyMuffins.TritePlus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: AssemblyProduct("TritePlus")]
[assembly: AssemblyTitle("SkittyMuffins.TritePlus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.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.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;
}
}
[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 TritePlus
{
[BepInPlugin("SkittyMuffins.TritePlus", "TritePlus", "1.0.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class TritePlus : BaseUnityPlugin
{
public static TritePlus Instance { get; private set; }
internal static ManualLogSource Logger { get; private set; }
internal static Harmony? Harmony { get; set; }
public static ConfigEntry<string> SceneName { get; set; }
public static ConfigEntry<bool> ImproveCompany { get; set; }
private void Awake()
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Expected O, but got Unknown
Logger = ((BaseUnityPlugin)this).Logger;
Instance = this;
SceneName = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Scene Name", "TriteScene", "The name of the scene all moons will be transformed into.");
ImproveCompany = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Patch Company Moons", false, "Whether or not to transform company/selling moons like Gordion into the chosen scene. Will softlock your lobby do not set this to true if you want to play more than one quota");
if (Harmony == null)
{
Harmony = new Harmony("SkittyMuffins.TritePlus");
}
Harmony.PatchAll(typeof(ExtendedLevelPatch));
Logger.LogInfo((object)"SkittyMuffins.TritePlus v1.0.1 has loaded!");
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "SkittyMuffins.TritePlus";
public const string PLUGIN_NAME = "TritePlus";
public const string PLUGIN_VERSION = "1.0.1";
}
}
namespace TritePlus.Patches
{
[HarmonyPatch(typeof(ExtendedLevel))]
internal class ExtendedLevelPatch
{
[HarmonyPatch("Initialize")]
[HarmonyPrefix]
public static void Initialize_Prefix(ExtendedLevel __instance)
{
if (!__instance.SelectableLevel.planetHasTime && !TritePlus.ImproveCompany.Value)
{
return;
}
TritePlus.Logger.LogInfo((object)("Patching Extended Level: " + ((Object)__instance).name));
__instance.SelectableLevel.sceneName = TritePlus.SceneName.Value;
foreach (StringWithRarity sceneSelection in __instance.SceneSelections)
{
sceneSelection.Name = TritePlus.SceneName.Value;
}
}
}
}