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 NOVISOR v0.0.1
NOVISOR.dll
Decompiled 2 months agousing 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 GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; 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(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("NOVISOR")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Removes Visor and Outlines for v81 Beta")] [assembly: AssemblyFileVersion("0.0.1.0")] [assembly: AssemblyInformationalVersion("0.0.1")] [assembly: AssemblyProduct("NOVISOR")] [assembly: AssemblyTitle("NOVISOR")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace NOVISOR { [BepInPlugin("MADMAN.NOVISOR", "No Visor - v81 Optimized", "0.0.1")] public class Remover : BaseUnityPlugin { private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("MADMAN.NOVISOR"); val.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"NOVISOR (v81 Beta) Remake Loaded."); } } [HarmonyPatch(typeof(HUDManager), "Start")] public class HudManagerFix { private static void Postfix(HUDManager __instance) { if ((Object)(object)__instance.mainCustomPass != (Object)null) { ((Behaviour)__instance.mainCustomPass).enabled = false; Debug.Log((object)"[NOVISOR] Outlines Disabled via mainCustomPass."); } if ((Object)(object)__instance.visorCracksObject != (Object)null) { __instance.visorCracksObject.SetActive(false); Debug.Log((object)"[NOVISOR] Visor cracks hidden."); } } } [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] public class PlayerMeshFix { private static void Postfix(PlayerControllerB __instance) { if (!((NetworkBehaviour)__instance).IsOwner || !((Object)(object)__instance.localVisor != (Object)null)) { return; } MeshRenderer[] componentsInChildren = ((Component)__instance.localVisor).GetComponentsInChildren<MeshRenderer>(); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val in array) { string name = ((Object)((Component)val).gameObject).name; if (name.Contains("Visor") || name.Contains("Helmet")) { ((Renderer)val).enabled = false; Debug.Log((object)("[NOVISOR] Hidden Mesh: " + name)); } } } } }