Please disclose if your mod was created primarily 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 BlindBirdStringEnjoyersImprovements v1.13.0
BlindBirdStringEnjoyersImprovements.dll
Decompiled a week agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using BlindBirdStringEnjoyersImprovements.Patches; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("UnityEngine")] [assembly: AssemblyCompany("BlindBirdStringEnjoyersImprovements")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("General game improvements")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+999e37d2a2da266b3e36b2967851eb0d55095a99")] [assembly: AssemblyProduct("BlindBirdStringEnjoyersImprovements")] [assembly: AssemblyTitle("BlindBirdStringEnjoyersImprovements")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.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 BlindBirdStringEnjoyersImprovements { [BepInPlugin("BlindBirdStringEnjoyersImprovements", "BlindBirdStringEnjoyersImprovements", "1.0.0")] public class Plugin : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("BlindBirdStringEnjoyersImprovements"); public static ManualLogSource LogSource; private void Awake() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin BlindBirdStringEnjoyersImprovements is loaded!"); LogSource = Logger.CreateLogSource("BlindBirdStringEnjoyersImprovements"); harmony.PatchAll(typeof(GrabbableObjectPatch)); harmony.PatchAll(typeof(StormyWeatherPatch)); harmony.PatchAll(typeof(HUDManagerPatch)); harmony.PatchAll(typeof(PreInitSceneScriptPatch)); LogSource.LogInfo((object)"Patched!"); } } public static class Utils { public static void CreateScanNodeOnObject(GameObject obj, int nodeType, int minRange, int maxRange, string headerText) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ScanNode", new Type[2] { typeof(ScanNodeProperties), typeof(BoxCollider) }) { layer = LayerMask.NameToLayer("ScanNode") }; val.transform.parent = obj.transform; val.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); ScanNodeProperties component = val.GetComponent<ScanNodeProperties>(); component.nodeType = nodeType; component.minRange = minRange; component.maxRange = maxRange; component.headerText = headerText; } } public static class PluginInfo { public const string PLUGIN_GUID = "BlindBirdStringEnjoyersImprovements"; public const string PLUGIN_NAME = "BlindBirdStringEnjoyersImprovements"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace BlindBirdStringEnjoyersImprovements.Patches { public class GrabbableObjectPatch { private static HashSet<GrabbableObject> _itemsToKeepInPlace = new HashSet<GrabbableObject>(); [HarmonyPatch(typeof(GrabbableObject), "Start")] [HarmonyPrefix] private static void Start_Pre(GrabbableObject __instance) { List<Type> obj = new List<Type> { typeof(BoomboxItem), typeof(ExtensionLadderItem), typeof(FlashlightItem), typeof(JetpackItem), typeof(LockPicker), typeof(RadarBoosterItem), typeof(Shovel), typeof(SprayPaintItem), typeof(StunGrenadeItem), typeof(TetraChemicalItem), typeof(WalkieTalkie), typeof(PatcherTool), typeof(BeltBagItem) }; if (!__instance.itemProperties.isScrap) { ScanNodeProperties componentInChildren = ((Component)__instance).GetComponentInChildren<ScanNodeProperties>(); if (componentInChildren != null) { string subText = componentInChildren.subText; if (subText != null && !subText.ToLower().StartsWith("value")) { componentInChildren.subText = subText; } } } if (obj.Contains(((object)__instance).GetType()) && (Object)(object)((Component)__instance).GetComponentInChildren<ScanNodeProperties>() == (Object)null) { Utils.CreateScanNodeOnObject(((Component)__instance).gameObject, 0, 1, 13, __instance.itemProperties.itemName); } } } public static class HUDManagerPatch { [HarmonyPatch(typeof(HUDManager), "Update")] [HarmonyPostfix] private static void Update(HUDManager __instance) { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < __instance.itemSlotIcons.Length; i++) { if ((Object)(object)StartOfRound.Instance.localPlayerController == (Object)null) { continue; } StartOfRound instance = StartOfRound.Instance; GrabbableObject val = ((instance != null) ? instance.localPlayerController.ItemSlots[i] : null); if ((Object)(object)val == (Object)null || (Object)(object)StormyWeatherPatch.Instance == (Object)null) { ((Graphic)__instance.itemSlotIcons[i]).color = Color.white; continue; } Traverse obj = Traverse.Create((object)StormyWeatherPatch.Instance); GameObject val2 = ((obj != null) ? obj.Field("setStaticToObject").GetValue<GameObject>() : null); GrabbableObject val3 = null; try { if ((Object)(object)val2 != (Object)null) { val3 = val2.GetComponent<GrabbableObject>(); } } catch { } StartOfRound instance2 = StartOfRound.Instance; if (instance2 != null && !instance2.localPlayerController.isInsideFactory) { StartOfRound instance3 = StartOfRound.Instance; if (instance3 != null && !instance3.localPlayerController.isInElevator && (Object)(object)val3 != (Object)null && (Object)(object)val3 == (Object)(object)val) { ((Graphic)__instance.itemSlotIcons[i]).color = Color.red; continue; } } if ((Object)(object)StormyWeatherPatch.Instance != (Object)null && val.itemProperties.isConductiveMetal) { ((Graphic)__instance.itemSlotIcons[i]).color = Color.yellow; } else { ((Graphic)__instance.itemSlotIcons[i]).color = Color.white; } } } } public static class MaskedPlayerEnemyPatch { [HarmonyPatch(/*Could not decode attribute arguments.*/)] [HarmonyTranspiler] public static IEnumerable<CodeInstruction> MaskedPlayerEnemy_Trans_killAnimation(IEnumerable<CodeInstruction> instructions) { List<CodeInstruction> list = instructions.ToList(); MethodInfo methodInfo = AccessTools.Method(typeof(PlayerControllerB), "KillPlayer", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.DeclaredPropertyGetter(typeof(Vector3), "zero"); for (int i = 7; i < list.Count; i++) { if (list[i].opcode == OpCodes.Callvirt && (MethodInfo)list[i].operand == methodInfo && list[i - 7].opcode == OpCodes.Call && (MethodInfo)list[i - 7].operand == methodInfo2 && list[i - 6].opcode == OpCodes.Ldc_I4_0) { list[i - 6].opcode = OpCodes.Ldc_I4_1; Plugin.LogSource.LogInfo((object)"Transpiled masked patch"); return list; } } Plugin.LogSource.LogError((object)"Failed to add transpiler to masked kill"); return instructions; } } public static class PreInitSceneScriptPatch { [HarmonyPatch(typeof(PreInitSceneScript), "SkipToFinalSetting")] [HarmonyPrefix] private static bool SkipToFinalSetting(PreInitSceneScript __instance) { __instance.ChooseLaunchOption(true); return false; } } public static class StormyWeatherPatch { public static StormyWeather Instance { get; private set; } [HarmonyPatch(typeof(StormyWeather), "OnEnable")] [HarmonyPostfix] private static void OnEnable(StormyWeather __instance) { if ((Object)(object)Instance != (Object)(object)__instance) { Instance = __instance; } } [HarmonyPatch(typeof(StormyWeather), "OnDisable")] [HarmonyPostfix] private static void OnDisable() { Instance = null; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }