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 NoFacingFireExit v1.0.0
NoFacingFireExit.dll
Decompiled 2 years agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using GameNetcodeStuff; using HarmonyLib; 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("NoFacingFireExit")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NoFacingFireExit")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d6d6aa11-447d-429c-be1e-2e551da0e6ed")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace NoFacingFireExitBase; [BepInPlugin("Karma.LCNoFacingFireExit", "NoFacingFireExit", "1.0.0")] public class NoFacingFireExitBase : BaseUnityPlugin { private const string modGUID = "Karma.LCNoFacingFireExit"; private const string modName = "NoFacingFireExit"; private const string modVersion = "1.0.0"; private readonly Harmony harmony = new Harmony("Karma.LCNoFacingFireExit"); internal static NoFacingFireExitBase Instance; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } harmony.PatchAll(typeof(NoFacingFireExitBase)); harmony.PatchAll(typeof(EntrancePatch)); } } [HarmonyPatch(typeof(EntranceTeleport))] internal class EntrancePatch { [HarmonyPatch("TeleportPlayer")] [HarmonyPostfix] private static void adjustCamera(ref StartOfRound ___playersManager, ref bool ___isEntranceToBuilding, ref int ___entranceId) { PlayerControllerB localPlayerController = ___playersManager.localPlayerController; if (___isEntranceToBuilding && localPlayerController.isInsideFactory && ___entranceId != 0) { localPlayerController.thisPlayerBody.Rotate(0f, 180f, 0f, (Space)1); } } }