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 Sacrifice Tweaks v1.1.6
SacrificeTweaks.dll
Decompiled 6 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 BepInEx.Configuration; using IL.RoR2.Artifacts; using Mono.Cecil.Cil; using MonoMod.Cil; using RoR2; 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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SacrificeTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+18b4aa25edd9b5463ba3659779310177a54b2300")] [assembly: AssemblyProduct("SacrificeTweaks")] [assembly: AssemblyTitle("SacrificeTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace SacrificeTweaks { [BepInPlugin("com.Moffein.SacrificeTweaks", "Sacrifice Tweaks", "1.1.6")] public class SacrificeTweaks : BaseUnityPlugin { public void Awake() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0071: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ab: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e5: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown float baseDropChance = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Sacrifice Tweaks", "Base Drop Chance"), 10f, new ConfigDescription("Base item drop chance.", (AcceptableValueBase)null, Array.Empty<object>())).Value; float maxBaseDropChance = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Sacrifice Tweaks", "Max Drop Chance"), 10f, new ConfigDescription("Maximum item drop chance when scaling.", (AcceptableValueBase)null, Array.Empty<object>())).Value; float swarmDropChance = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Sacrifice Tweaks", "Swarms Base Drop Chance"), 5f, new ConfigDescription("Base item drop chance when Swarms is enabled.", (AcceptableValueBase)null, Array.Empty<object>())).Value; float maxSwarmDropChance = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Sacrifice Tweaks", "Swarms Max Drop Chance"), 5f, new ConfigDescription("Maximum item drop chance when scaling while Swarms is enabled.", (AcceptableValueBase)null, Array.Empty<object>())).Value; SacrificeArtifactManager.OnServerCharacterDeath += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float orig) => RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef) ? swarmDropChance : baseDropChance)); } else { Debug.LogError((object)"SacrificeTweaks: Change Base Drop Chance IL hook failed."); } if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Util), "GetExpAdjustedDropChancePercent") })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)delegate(float orig) { float num = orig; if (orig > 0f) { bool flag = RunArtifactManager.instance.IsArtifactEnabled(Artifacts.swarmsArtifactDef); float num2 = baseDropChance; float num3 = maxBaseDropChance; if (flag) { num2 = swarmDropChance; num3 = maxSwarmDropChance; } if (num < num2) { num = num2; } if (num > num3) { num = num3; } } return num; }); } else { Debug.LogError((object)"SacrificeTweaks: Clamp Final drop chance IL Hook failed."); } }; } } } namespace R2API.Utils { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } }