using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; 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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ForceMansionDine")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ForceMansionDine")] [assembly: AssemblyTitle("ForceMansionDine")] [assembly: AssemblyVersion("1.0.0.0")] 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; } } } namespace TriteethForceMansion { [BepInPlugin("com.triteeth.forcemansiondine", "ForceMansionDine", "1.0.0")] public class ForceMansionMod : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("com.triteeth.forcemansionDine"); private void Awake() { harmony.PatchAll(typeof(ForceMansionMod)); } [HarmonyPatch(typeof(RoundManager), "Start")] [HarmonyPostfix] public static void ModifyDineFlowTypes() { if ((Object)(object)StartOfRound.Instance == (Object)null || StartOfRound.Instance.levels == null) { return; } SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { if (!((Object)(object)val != (Object)null) || (val.levelID != 5 && !val.PlanetName.Contains("Dine"))) { continue; } List list = new List(); IntWithRarity[] dungeonFlowTypes = val.dungeonFlowTypes; foreach (IntWithRarity val2 in dungeonFlowTypes) { if (val2.id == 1) { val2.rarity = 9999; list.Add(val2); } } if (list.Count > 0) { val.dungeonFlowTypes = list.ToArray(); } } } } }