// Consolidated decompiled source — Azumatt-NoWires v1.0.1 // Generated by Hexium's decompiled-source browser. Best-effort concatenation of every type in this // version's manifest — decompiler output isn't guaranteed to compile as-is. using System; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Logging; using HarmonyLib; // ---- NoWires.dll :: Microsoft.CodeAnalysis.EmbeddedAttribute ---- namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } // ---- NoWires.dll :: NoWires.NoWiresPlugin ---- namespace NoWires { [BepInPlugin("Azumatt.NoWires", "NoWires", "1.0.1")] public class NoWiresPlugin : BaseUnityPlugin { internal const string ModName = "NoWires"; internal const string ModVersion = "1.0.1"; internal const string Author = "Azumatt"; private const string ModGUID = "Azumatt.NoWires"; private readonly Harmony _harmony = new Harmony("Azumatt.NoWires"); public static readonly ManualLogSource NoWiresLogger = BepInEx.Logging.Logger.CreateLogSource("NoWires"); private void Awake() { _harmony.PatchAll(); } } } // ---- NoWires.dll :: NoWires.WireAwakePatch ---- namespace NoWires { [HarmonyPatch(typeof(Wire), "Awake")] internal static class WireAwakePatch { private static void Postfix(Wire __instance) { TurnOffWire(__instance); } public static void TurnOffWire(Wire wire) { if (!(bool)AccessTools.Field(typeof(Wire), "IsFinished").GetValue(wire)) { return; } wire.lineRenderer.forceRenderingOff = true; foreach (WirePart wirePart in wire.WireParts) { wirePart.MeshRenderer.forceRenderingOff = true; } } } } // ---- NoWires.dll :: NoWires.WireCreateModelPatch ---- namespace NoWires { [HarmonyPatch(typeof(Wire), "CreateModel")] internal static class WireCreateModelPatch { private static void Postfix(Wire __instance) { WireAwakePatch.TurnOffWire(__instance); } } }