Decompiled source of WesleysInteriors v4.1.12
WesleysInteriorShenanigans.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using DunGen; using DunGen.Tags; using HarmonyLib; using Microsoft.CodeAnalysis; [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("WesleysInteriorShenanigans")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WesleysInteriorShenanigans")] [assembly: AssemblyTitle("WesleysInteriorShenanigans")] [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 WesleysInteriorShenanigans { [BepInPlugin("MW.MagicWesleyInteriors", "Wesley's interior shenanigans", "1.0.0")] public class InteriorModifier : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("MW.MagicWesleyInteriors"); internal ManualLogSource help; private TileConnectionRule acRule; private TileConnectionRule gaRule; public Tag dungRoomTag = new Tag(8886); public Tag dungTransRoomTag = new Tag(8887); public Tag normRoomTag = new Tag(8888); public Tag catRoomTag = new Tag(8889); public Tag hallRoomTag = new Tag(38843); private static readonly List<Tag> GrandDoorwayTags = new List<Tag> { new Tag(7770), new Tag(7771), new Tag(7772), new Tag(7763), new Tag(7774) }; private void Awake() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown help = Logger.CreateLogSource("The man in the rubber rooms"); help.LogError((object)"You made a mistake.. but it's fine.. the world will survive.. I think.."); harmony.PatchAll(); help.LogError((object)"Maybe not."); acRule = new TileConnectionRule(new CanTilesConnectDelegate(CitadelConnections), 0); DoorwayPairFinder.CustomConnectionRules.Add(acRule); gaRule = new TileConnectionRule(new CanTilesConnectDelegate(ArmoryConnections), 0); DoorwayPairFinder.CustomConnectionRules.Add(gaRule); } private ConnectionResult CitadelConnections(Tile tileA, Tile tileB, Doorway doorwayA, Doorway doorwayB) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) bool flag = tileA.Tags.HasTag(normRoomTag); bool flag2 = tileB.Tags.HasTag(catRoomTag); bool flag3 = tileA.Tags.HasTag(dungRoomTag); bool flag4 = tileB.Tags.HasTag(dungTransRoomTag); bool flag5 = doorwayA.Tags.HasTag(hallRoomTag); bool flag6 = doorwayB.Tags.HasTag(hallRoomTag); if ((flag && flag2) || (flag3 && flag4) || (flag5 && flag6)) { return (ConnectionResult)1; } return (ConnectionResult)2; } private ConnectionResult ArmoryConnections(Tile tileA, Tile tileB, Doorway doorwayA, Doorway doorwayB) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) foreach (Tag tag in doorwayA.Tags) { if (GrandDoorwayTags.Contains(tag) && !((IEnumerable<Tag>)doorwayB.Tags).Contains(tag)) { return (ConnectionResult)1; } } return (ConnectionResult)2; } } }
DilapidatedManor.dll
Decompiled 2 weeks agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; [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("DilapidatedManor")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DilapidatedManor")] [assembly: AssemblyTitle("DilapidatedManor")] [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 DilapidatedManor.Features { internal class AnimationManager : MonoBehaviour { public Animator animator; public string animationString; public void Changebool(bool b) { animator.SetBool(animationString, b); } } internal class DisablePower : NetworkBehaviour { [CompilerGenerated] private sealed class <KillPower>d__3 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DisablePower <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <KillPower>d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.roundManager.FlickerLights(false, false); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.roundManager.FlickerLights(false, false); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.roundManager.FlickerLights(false, false); <>2__current = (object)new WaitForSeconds(2.5f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.roundManager.SwitchPower(false); <>4__this.roundManager.powerOffPermanently = true; <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 4; return true; case 4: <>1__state = -1; HUDManager.Instance.RadiationWarningHUD(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private RoundManager roundManager; private void Start() { roundManager = Object.FindObjectOfType<RoundManager>(); } public void DisableFacilityPower() { ((MonoBehaviour)this).StartCoroutine(KillPower()); } [IteratorStateMachine(typeof(<KillPower>d__3))] private IEnumerator KillPower() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <KillPower>d__3(0) { <>4__this = this }; } } internal class RadioReceiver : MonoBehaviour { public int ReceiverId; [SerializeField] private UnityEvent ReceiveEvent; public void MessageReceiveEvent() { ReceiveEvent.Invoke(); } } public class RadioSender : MonoBehaviour { [SerializeField] private int SenderId; private RadioReceiver receiver; public void FindSignal() { if (!(Object.FindObjectsOfType(typeof(RadioReceiver)) is RadioReceiver[] array)) { return; } RadioReceiver[] array2 = array; foreach (RadioReceiver radioReceiver in array2) { if (SenderId == radioReceiver.ReceiverId) { receiver = radioReceiver; } } } public void SendReceiverSignal() { receiver.MessageReceiveEvent(); } } }