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 CarryWeight v1.0.1
CarryWeight.dll
Decompiled 3 days agousing System.Reflection; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace BomDePeso; [BepInPlugin("yuri.CarryWeight", "Carry Weight", "1.0.0")] public class Plugin : BaseUnityPlugin { public static ConfigEntry<bool> Ligado; public static ConfigEntry<float> ExtraMax; private void Awake() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown Ligado = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, "Turns on the extra carry weight in this game. Only your own game needs this mod."); ExtraMax = ((BaseUnityPlugin)this).Config.Bind<float>("Weight", "MaxExtra", 300f, "Extra weight at Run skill 100. At zero, the extra is 0."); Harmony val = new Harmony("yuri.CarryWeight"); val.PatchAll(); } public static float Fator(Player jogador) { float num = ((Character)jogador).GetSkillLevel((SkillType)102); if (num < 0f) { num = 0f; } if (num > 100f) { num = 100f; } return num / 100f; } } [HarmonyPatch(typeof(Player), "GetMaxCarryWeight")] public static class PesoPatch { private static void Postfix(Player __instance, ref float __result) { if (Plugin.Ligado.Value && !((Object)(object)Player.m_localPlayer != (Object)(object)__instance)) { float num = Plugin.ExtraMax.Value; if (num < 0f) { num = 0f; } __result += num * Plugin.Fator(__instance); } } }