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 Embudos ModPack v1.0.0
plugins/FovAdjust.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using Unity.Netcode; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("FovAdjust")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("FovAdjust")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("dfb6681a-9f25-4737-a7fe-10b3c23f65b3")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace FovAdjust; [BepInPlugin("Rozebud.FovAdjust", "FOV Adjust", "1.1.1")] public class FovAdjustBase : BaseUnityPlugin { private const string modGUID = "Rozebud.FovAdjust"; private const string modName = "FOV Adjust"; private const string modVer = "1.1.1"; private readonly Harmony harmony = new Harmony("Rozebud.FovAdjust"); private static FovAdjustBase Instance; public static ManualLogSource log; public static ConfigEntry<float> configFov; public static ConfigEntry<bool> configHideVisor; public static bool inDebugMode; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } log = Logger.CreateLogSource("Rozebud.FovAdjust"); log.LogInfo((object)"Starting."); configFov = ((BaseUnityPlugin)this).Config.Bind<float>("General", "fov", 66f, "Change the field of view of the camera. Clamped from 66 to 130 for my sanity. Also keep in mind that this is vertical FOV."); configHideVisor = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "hideVisor", false, "Changes whether the first person visor is visible."); PlayerControllerBPatches.newTargetFovBase = Mathf.Clamp(configFov.Value, 66f, 130f); PlayerControllerBPatches.hideVisor = configHideVisor.Value; log.LogInfo((object)"Configs DONE!"); PlayerControllerBPatches.calculateVisorStuff(); harmony.PatchAll(typeof(PlayerControllerBPatches)); harmony.PatchAll(typeof(HUDManagerPatches)); log.LogInfo((object)"All FOV Adjust patches have loaded successfully."); } } public class PlayerControllerBPatches { public static float newTargetFovBase = 66f; private static float prefixCamFov = 0f; public static bool hideVisor = false; private static Vector3 visorScale; public static Vector3 visorScaleBottom = new Vector3(0.68f, 0.8f, 0.95f); public static Vector3 visorScaleTop = new Vector3(0.68f, 0.35f, 0.99f); public static float linToSinLerp = 0.6f; public static float visorScaleTopRefFOV = 130f; [HarmonyPatch(typeof(PlayerControllerB), "Awake")] [HarmonyPostfix] private static void Awake_Postfix(PlayerControllerB __instance) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (!filterPlayerControllers(__instance)) { __instance.localVisor.localScale = visorScale; } } [HarmonyPatch(typeof(PlayerControllerB), "Update")] [HarmonyPrefix] private static void Update_Prefix(PlayerControllerB __instance) { //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) if (filterPlayerControllers(__instance)) { return; } prefixCamFov = __instance.gameplayCamera.fieldOfView; if (FovAdjustBase.inDebugMode) { if (((ButtonControl)Keyboard.current.minusKey).wasPressedThisFrame) { visorScale.x -= 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } else if (((ButtonControl)Keyboard.current.equalsKey).wasPressedThisFrame) { visorScale.x += 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } if (((ButtonControl)Keyboard.current.leftBracketKey).wasPressedThisFrame) { visorScale.y -= 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } else if (((ButtonControl)Keyboard.current.rightBracketKey).wasPressedThisFrame) { visorScale.y += 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } if (((ButtonControl)Keyboard.current.semicolonKey).wasPressedThisFrame) { visorScale.z -= 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } else if (((ButtonControl)Keyboard.current.quoteKey).wasPressedThisFrame) { visorScale.z += 0.00049999997f; FovAdjustBase.log.LogMessage((object)visorScale); } } if (__instance.localVisor.localScale != visorScale) { __instance.localVisor.localScale = visorScale; } } [HarmonyPatch(typeof(PlayerControllerB), "Update")] [HarmonyPostfix] private static void Update_Postfix(PlayerControllerB __instance) { if (!filterPlayerControllers(__instance)) { float num = newTargetFovBase; if (__instance.inTerminalMenu) { num = 60f; } else if (__instance.IsInspectingItem) { num = 46f; } else if (__instance.isSprinting) { num *= 1.03f; } __instance.gameplayCamera.fieldOfView = Mathf.Lerp(prefixCamFov, num, 6f * Time.deltaTime); } } [HarmonyPatch(typeof(PlayerControllerB), "LateUpdate")] [HarmonyPostfix] private static void LateUpdate_Postfix(PlayerControllerB __instance) { //IL_0033: 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) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (!filterPlayerControllers(__instance) && (newTargetFovBase > 66f || FovAdjustBase.inDebugMode)) { __instance.localVisor.position = __instance.localVisor.position + __instance.localVisor.rotation * new Vector3(0f, 0f, -0.06f); } } private static float easeOutSine(float x) { return Mathf.Sin(x * (float)Math.PI / 2f); } public static void calculateVisorStuff() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (hideVisor) { visorScale = new Vector3(0f, 0f, 0f); } else if (newTargetFovBase > 66f || FovAdjustBase.inDebugMode) { float num = (newTargetFovBase - 66f) / (visorScaleTopRefFOV - 66f); num = Mathf.Lerp(num, easeOutSine(num), linToSinLerp); visorScale = Vector3.LerpUnclamped(visorScaleBottom, visorScaleTop, num); } else { visorScale = new Vector3(0.36f, 0.49f, 0.49f); } } private static bool filterPlayerControllers(PlayerControllerB player) { return !((NetworkBehaviour)player).IsOwner || !player.isPlayerControlled || (((NetworkBehaviour)player).IsServer && !player.isHostPlayerObject && !player.isTestingPlayer); } } public class HUDManagerPatches { [HarmonyPatch(typeof(HUDManager), "SubmitChat_performed")] [HarmonyPrefix] public static bool SubmitChat_performed_Prefix(HUDManager __instance) { //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) string text = __instance.chatTextField.text; if (text.StartsWith("/fov")) { string[] array = text.Split(new char[1] { ' ' }); if (array.Length > 1 && float.TryParse(array[1], out var result)) { result = Mathf.Clamp(result, 66f, 130f); PlayerControllerBPatches.newTargetFovBase = result; if (!FovAdjustBase.inDebugMode) { PlayerControllerBPatches.calculateVisorStuff(); } } } else if (text.StartsWith("/toggleVisor")) { PlayerControllerBPatches.hideVisor = !PlayerControllerBPatches.hideVisor; PlayerControllerBPatches.calculateVisorStuff(); } else if (text.StartsWith("/recalcVisor") && FovAdjustBase.inDebugMode) { PlayerControllerBPatches.calculateVisorStuff(); } else if (text.StartsWith("/setScaleBottom") && FovAdjustBase.inDebugMode) { string[] array2 = text.Split(new char[1] { ' ' }); PlayerControllerBPatches.visorScaleBottom = new Vector3(float.Parse(array2[1]), float.Parse(array2[2]), float.Parse(array2[3])); } else if (text.StartsWith("/setScaleTop") && FovAdjustBase.inDebugMode) { string[] array3 = text.Split(new char[1] { ' ' }); PlayerControllerBPatches.visorScaleTop = new Vector3(float.Parse(array3[1]), float.Parse(array3[2]), float.Parse(array3[3])); } else if (text.StartsWith("/setSinAmount") && FovAdjustBase.inDebugMode) { string[] array4 = text.Split(new char[1] { ' ' }); PlayerControllerBPatches.linToSinLerp = float.Parse(array4[1]); } else if (text.StartsWith("/setTopRef") && FovAdjustBase.inDebugMode) { string[] array5 = text.Split(new char[1] { ' ' }); PlayerControllerBPatches.visorScaleTopRefFOV = float.Parse(array5[1]); } else { if (!text.StartsWith("/gimmeMyValues") || !FovAdjustBase.inDebugMode) { return true; } ManualLogSource log = FovAdjustBase.log; Vector3 val = PlayerControllerBPatches.visorScaleBottom; log.LogMessage((object)("visorScaleBottom: " + ((object)(Vector3)(ref val)).ToString())); ManualLogSource log2 = FovAdjustBase.log; val = PlayerControllerBPatches.visorScaleTop; log2.LogMessage((object)("visorScaleTop: " + ((object)(Vector3)(ref val)).ToString())); FovAdjustBase.log.LogMessage((object)("linToSinLerp: " + PlayerControllerBPatches.linToSinLerp)); FovAdjustBase.log.LogMessage((object)("visorScaleTopRefFOV: " + PlayerControllerBPatches.visorScaleTopRefFOV)); } __instance.localPlayer = GameNetworkManager.Instance.localPlayerController; __instance.localPlayer.isTypingChat = false; __instance.chatTextField.text = ""; EventSystem.current.SetSelectedGameObject((GameObject)null); ((Behaviour)__instance.typingIndicator).enabled = false; return false; } }
plugins/ItemQuickSwitchMod.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; [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("ItemQuickSwitchMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Mod for selecting item slots directly")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0")] [assembly: AssemblyProduct("ItemQuickSwitchMod")] [assembly: AssemblyTitle("ItemQuickSwitchMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.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 ItemQuickSwitchMod { public sealed class CustomAction { public class ActionItem { public string Id { get; } public Key Shortcut { get; } public string Description { get; } public int SlotNumber { get; } public ConfigEntry<Key> ConfigEntry { get; set; } public ActionItem(string id, Key config, string description, int slotNumber) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) Id = id; Shortcut = config; Description = description; SlotNumber = slotNumber; } } public static readonly ActionItem Emote1 = new ActionItem("Emote1", (Key)94, "Dance emote", 0); public static readonly ActionItem Emote2 = new ActionItem("Emote2", (Key)95, "Point emote", 0); public static readonly ActionItem Slot1 = new ActionItem("Slot1", (Key)41, "Equip Slot 1", 0); public static readonly ActionItem Slot2 = new ActionItem("Slot2", (Key)42, "Equip Slot 2", 1); public static readonly ActionItem Slot3 = new ActionItem("Slot3", (Key)43, "Equip Slot 3", 2); public static readonly ActionItem Slot4 = new ActionItem("Slot4", (Key)44, "Equip Slot 4", 3); public static readonly ActionItem[] AllActions = new ActionItem[6] { Emote1, Emote2, Slot1, Slot2, Slot3, Slot4 }; } [BepInPlugin("de.vasanex.ItemQuickSwitchMod", "ItemQuickSwitchMod", "1.1.0")] public class ItemQuickSwitchMod : BaseUnityPlugin { private Harmony _harmony; private void Awake() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown ((BaseUnityPlugin)this).Logger.LogInfo((object)"ItemQuickSwitchMod is creating binds!"); CustomAction.ActionItem[] allActions = CustomAction.AllActions; foreach (CustomAction.ActionItem actionItem in allActions) { ConfigEntry<Key> configEntry = ((BaseUnityPlugin)this).Config.Bind<Key>("Bindings", actionItem.Id, actionItem.Shortcut, actionItem.Description); actionItem.ConfigEntry = configEntry; } _harmony = new Harmony("de.vasanex.ItemQuickSwitchMod"); _harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin ItemQuickSwitchMod is loaded!"); } } public static class StaticPluginInfo { public const string GUID = "de.vasanex.ItemQuickSwitchMod"; public const string NAME = "ItemQuickSwitchMod"; } public static class PluginInfo { public const string PLUGIN_GUID = "ItemQuickSwitchMod"; public const string PLUGIN_NAME = "ItemQuickSwitchMod"; public const string PLUGIN_VERSION = "1.1.0"; } } namespace ItemQuickSwitchMod.Patches { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { private static readonly Dictionary<string, MethodInfo> MethodCache = new Dictionary<string, MethodInfo>(); private static readonly object[] BackwardsParam = new object[1] { false }; private static readonly object[] ForwardsParam = new object[1] { true }; private static object InvokePrivateMethod(PlayerControllerB instance, string methodName, object[] parameters = null) { MethodCache.TryGetValue(methodName, out var value); if ((object)value == null) { value = typeof(PlayerControllerB).GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic); } MethodCache[methodName] = value; return value?.Invoke(instance, parameters); } [HarmonyPatch("Update")] [HarmonyPostfix] public static void PlayerControllerB_Update(PlayerControllerB __instance, ref float ___timeSinceSwitchingSlots, ref bool ___throwingObject) { if ((!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerControlled || (((NetworkBehaviour)__instance).IsServer && !__instance.isHostPlayerObject)) && !__instance.isTestingPlayer) { return; } CustomAction.ActionItem actionItem = Array.Find(CustomAction.AllActions, (CustomAction.ActionItem it) => ((ButtonControl)Keyboard.current[it.ConfigEntry.Value]).wasPressedThisFrame); if (actionItem == null) { return; } string id = actionItem.Id; string text = id; if (!(text == "Emote1")) { if (text == "Emote2") { PerformEmote(__instance, 2); return; } StopEmotes(__instance); if (SwitchItemSlots(__instance, actionItem.SlotNumber, ___timeSinceSwitchingSlots, ___throwingObject)) { ___timeSinceSwitchingSlots = 0f; } } else { PerformEmote(__instance, 1); } } private static void PerformEmote(PlayerControllerB __instance, int emoteId) { __instance.timeSinceStartingEmote = 0f; __instance.performingEmote = true; __instance.playerBodyAnimator.SetInteger("emoteNumber", emoteId); __instance.StartPerformingEmoteServerRpc(); } private static bool SwitchItemSlots(PlayerControllerB __instance, int requestedSlot, float timeSinceSwitchingSlots, bool isThrowingObject) { if (!IsItemSwitchPossible(__instance, timeSinceSwitchingSlots, isThrowingObject) || __instance.currentItemSlot == requestedSlot) { return false; } int num = __instance.currentItemSlot - requestedSlot; bool flag = num > 0; if (Math.Abs(num) == __instance.ItemSlots.Length - 1) { object[] parameters = (flag ? ForwardsParam : BackwardsParam); InvokePrivateMethod(__instance, "SwitchItemSlotsServerRpc", parameters); } else { object[] parameters2 = (flag ? BackwardsParam : ForwardsParam); do { InvokePrivateMethod(__instance, "SwitchItemSlotsServerRpc", parameters2); num += ((!flag) ? 1 : (-1)); } while (num != 0); } ShipBuildModeManager.Instance.CancelBuildMode(true); __instance.playerBodyAnimator.SetBool("GrabValidated", false); object[] parameters3 = new object[2] { requestedSlot, null }; InvokePrivateMethod(__instance, "SwitchToItemSlot", parameters3); if ((Object)(object)__instance.currentlyHeldObjectServer != (Object)null) { ((Component)__instance.currentlyHeldObjectServer).gameObject.GetComponent<AudioSource>().PlayOneShot(__instance.currentlyHeldObjectServer.itemProperties.grabSFX, 0.6f); } return true; } private static bool IsItemSwitchPossible(PlayerControllerB __instance, float timeSinceSwitchingSlots, bool isThrowingObject) { return !((double)timeSinceSwitchingSlots < 0.01 || __instance.inTerminalMenu || __instance.isGrabbingObjectAnimation || __instance.inSpecialInteractAnimation || isThrowingObject) && !__instance.isTypingChat && !__instance.twoHanded && !__instance.activatingItem && !__instance.jetpackControls && !__instance.disablingJetpackControls; } private static void StopEmotes(PlayerControllerB __instance) { __instance.performingEmote = false; __instance.StopPerformingEmoteServerRpc(); __instance.timeSinceStartingEmote = 0f; } } }
plugins/LetMeLookDown.dll
Decompiled 2 years agousing System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using GameNetcodeStuff; using HarmonyLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LetMeLookDown")] [assembly: AssemblyDescription("Mod made by flipf17")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LetMeLookDown")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("a9c88d54-8f01-44a7-be0d-bd61d38aadcb")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace LetMeLookDown { [BepInPlugin("FlipMods.LetMeLookDown", "LetMeLookDown", "1.0.1")] public class Plugin : BaseUnityPlugin { private Harmony _harmony; private static Plugin instance; public static float maxAngle = 80f; private void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown _harmony = new Harmony("LetMeLookDown"); _harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"LetMeLookDown mod loaded"); instance = this; } public static void Log(string message) { ((BaseUnityPlugin)instance).Logger.LogInfo((object)message); } } public static class PluginInfo { public const string PLUGIN_GUID = "FlipMods.LetMeLookDown"; public const string PLUGIN_NAME = "LetMeLookDown"; public const string PLUGIN_VERSION = "1.0.1"; } } namespace LetMeLookDown.Patches { [HarmonyPatch] internal class AdjustSmoothLookingPatcher { [HarmonyPatch(typeof(PlayerControllerB), "CalculateSmoothLookingInput")] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { List<CodeInstruction> list = new List<CodeInstruction>(instructions); for (int i = 0; i < list.Count; i++) { if (list[i].opcode == OpCodes.Ldc_R4 && (float)list[i].operand == 60f) { list[i].operand = Plugin.maxAngle; break; } } return list.AsEnumerable(); } } [HarmonyPatch] internal class AdjustNormalLookingPatcher { [HarmonyPatch(typeof(PlayerControllerB), "CalculateNormalLookingInput")] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { List<CodeInstruction> list = new List<CodeInstruction>(instructions); for (int i = 0; i < list.Count; i++) { if (list[i].opcode == OpCodes.Ldc_R4 && (float)list[i].operand == 60f) { list[i].operand = Plugin.maxAngle; break; } } return list.AsEnumerable(); } } }
plugins/MoreItems.dll
Decompiled 2 years 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 BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using MoreItems.Patches; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MoreItems")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("My first plugin")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MoreItems")] [assembly: AssemblyTitle("MoreItems")] [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 MoreItems { [BepInPlugin("MoreItems", "MoreItems", "1.0.0")] public class Plugin : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("MoreItems"); private void Awake() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin MoreItems is loaded!"); harmony.PatchAll(typeof(StartOfRoundPatch)); } } public static class PluginInfo { public const string PLUGIN_GUID = "MoreItems"; public const string PLUGIN_NAME = "MoreItems"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace MoreItems.Patches { [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { private const int newMaxItemCapacity = 999; [HarmonyPatch("Awake")] [HarmonyPostfix] private static void IncreaseShipItemCapacity(ref int ___maxShipItemCapacity) { ___maxShipItemCapacity = 999; Logger.CreateLogSource("MoreItems").LogInfo((object)$"Maximum amount of items that can be saved set to {999}."); } } }
plugins/RemoveCameraFilter.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 UnityEngine; using UnityEngine.Rendering.HighDefinition; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("RemoveCameraFilter")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RemoveCameraFilter")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8119b276-5c2c-446f-a321-72045794dc73")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace RemoveCameraFilter; [BepInPlugin("kruumy.RemoveCameraFilter", "Remove Camera Filter", "1.0.0")] public class Main : BaseUnityPlugin { private void Awake() { SceneManager.activeSceneChanged += SceneManager_activeSceneChanged; } private void SceneManager_activeSceneChanged(Scene arg0, Scene arg1) { Object[] array = Object.FindObjectsOfTypeAll(typeof(CustomPassVolume)); foreach (Object obj in array) { CustomPassVolume val = (CustomPassVolume)(object)((obj is CustomPassVolume) ? obj : null); if (val != null) { ((Behaviour)val).enabled = false; val.isGlobal = false; } } } }
plugins/ShipLoot.dll
Decompiled 2 years agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using TMPro; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("ShipLoot")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyProduct("ShipLoot")] [assembly: AssemblyCopyright("Copyright © tinyhoot 2023")] [assembly: ComVisible(false)] [assembly: AssemblyFileVersion("1.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace ShipLoot { [BepInPlugin("com.github.tinyhoot.ShipLoot", "ShipLoot", "1.0")] internal class ShipLoot : BaseUnityPlugin { public const string GUID = "com.github.tinyhoot.ShipLoot"; public const string NAME = "ShipLoot"; public const string VERSION = "1.0"; internal static ManualLogSource Log; private void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; new Harmony("com.github.tinyhoot.ShipLoot").PatchAll(Assembly.GetExecutingAssembly()); } } } namespace ShipLoot.Patches { [HarmonyPatch] internal class HudManagerPatcher { private static GameObject _totalCounter; private static TextMeshProUGUI _textMesh; private static float _displayTimeLeft; private const float DisplayTime = 5f; [HarmonyPrefix] [HarmonyPatch(typeof(HUDManager), "PingScan_performed")] private static void OnScan(HUDManager __instance, CallbackContext context) { if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && ((CallbackContext)(ref context)).performed && __instance.CanPlayerScan() && !(__instance.playerPingingScan > -0.5f) && (StartOfRound.Instance.inShipPhase || GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom)) { if (!Object.op_Implicit((Object)(object)_totalCounter)) { CopyValueCounter(); } float num = CalculateLootValue(); ((TMP_Text)_textMesh).text = $"SHIP: ${num:F0}"; _displayTimeLeft = 5f; if (!_totalCounter.activeSelf) { ((MonoBehaviour)GameNetworkManager.Instance).StartCoroutine(ShipLootCoroutine()); } } } private static IEnumerator ShipLootCoroutine() { _totalCounter.SetActive(true); while (_displayTimeLeft > 0f) { float displayTimeLeft = _displayTimeLeft; _displayTimeLeft = 0f; yield return (object)new WaitForSeconds(displayTimeLeft); } _totalCounter.SetActive(false); } private static float CalculateLootValue() { List<GrabbableObject> list = (from obj in GameObject.Find("/Environment/HangarShip").GetComponentsInChildren<GrabbableObject>() where ((Object)obj).name != "ClipboardManual" && ((Object)obj).name != "StickyNoteItem" select obj).ToList(); ShipLoot.Log.LogDebug((object)"Calculating total ship scrap value."); CollectionExtensions.Do<GrabbableObject>((IEnumerable<GrabbableObject>)list, (Action<GrabbableObject>)delegate(GrabbableObject scrap) { ShipLoot.Log.LogDebug((object)$"{((Object)scrap).name} - ${scrap.scrapValue}"); }); return list.Sum((GrabbableObject scrap) => scrap.scrapValue); } private static void CopyValueCounter() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("/Systems/UI/Canvas/IngamePlayerHUD/BottomMiddle/ValueCounter"); if (!Object.op_Implicit((Object)(object)val)) { ShipLoot.Log.LogError((object)"Failed to find ValueCounter object to copy!"); } _totalCounter = Object.Instantiate<GameObject>(val.gameObject, val.transform.parent, false); _totalCounter.transform.Translate(0f, 1f, 0f); Vector3 localPosition = _totalCounter.transform.localPosition; _totalCounter.transform.localPosition = new Vector3(localPosition.x + 50f, -50f, localPosition.z); _textMesh = _totalCounter.GetComponentInChildren<TextMeshProUGUI>(); } } }