Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of ChefTweaks v1.0.7
ChefTweaks.dll
Decompiled 2 weeks agousing System; using System.Collections; 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 BepInEx.Logging; using EntityStates; using EntityStates.Chef; using Microsoft.CodeAnalysis; using On.EntityStates.Chef; using On.RoR2.Projectile; using RoR2; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; [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("ChefTweaks")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ChefTweaks")] [assembly: AssemblyTitle("ChefTweaks")] [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 ChefTweaks { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Jeffdev.ChefTweaks", "ChefTweaks", "1.0.7")] public class ChefTweaks : BaseUnityPlugin { public const string PluginGUID = "Jeffdev.ChefTweaks"; public const string PluginAuthor = "Jeffdev"; public const string PluginName = "ChefTweaks"; public const string PluginVersion = "1.0.7"; public static ConfigEntry<bool> rollCancel; public static ConfigEntry<bool> diceAutoRecall; public static bool rolyReleased; public static bool cleaversRecalling; public void Awake() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) Log.Init(((BaseUnityPlugin)this).Logger); diceAutoRecall = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Dice Auto Recall", true, "Makes Dice automatically recall after 2 seconds when holding down the button (false is vanilla default)"); rollCancel = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Roll Cancel", true, "Allows Roll to be cancelled by pressing the utility button mid use (false is vanilla default)"); RolyPoly.FixedUpdate += new hook_FixedUpdate(RolyPoly_FixedUpdate); Dice.FixedUpdate += new hook_FixedUpdate(Dice_FixedUpdate); CleaverProjectile.HandleFlyback += new hook_HandleFlyback(CleaverProjectile_HandleFlyback); Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/Chef/ChefRolyPoly.asset").WaitForCompletion().interruptPriority = (InterruptPriority)1; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/Chef/ChefRolyPolyBoosted.asset").WaitForCompletion().interruptPriority = (InterruptPriority)1; } private void CleaverProjectile_HandleFlyback(orig_HandleFlyback orig, CleaverProjectile self) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (diceAutoRecall.Value && !self.charged) { self.charged = true; ProjectileDamage projectileDamage = self.projectileDamage; projectileDamage.damage *= self.chargedDamageCoefficient; if (self.hasEffectiveAuthority && !self.projectileController.isPrediction) { EffectManager.SimpleEffect(self.ChargeEffect, ((Component)this).transform.position, ((Component)this).transform.rotation, true); } self.ToggleGhostChargeVFX(true); self.Networkcharged = true; } orig.Invoke(self); } private void Dice_FixedUpdate(orig_FixedUpdate orig, Dice self) { if (diceAutoRecall.Value) { if (self.allCleaversOut && !cleaversRecalling) { self.HandleRecall(); cleaversRecalling = true; } else if (cleaversRecalling && !self.allCleaversOut) { cleaversRecalling = false; } } orig.Invoke(self); } private void RolyPoly_FixedUpdate(orig_FixedUpdate orig, RolyPoly self) { orig.Invoke(self); if (rollCancel.Value) { if (Object.op_Implicit((Object)(object)((EntityState)self).inputBank) && ((ButtonState)(ref ((EntityState)self).inputBank.skill3)).justReleased) { rolyReleased = true; } if (Object.op_Implicit((Object)(object)((EntityState)self).inputBank) && ((ButtonState)(ref ((EntityState)self).inputBank.skill3)).justPressed && self.hasRolyPolyStarted && rolyReleased) { ((EntityState)self).outer.SetNextStateToMain(); rolyReleased = false; } } } } public static class Utility { [CompilerGenerated] private sealed class <InvokeRoutine>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public Action f; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <InvokeRoutine>d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; f(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static void Invoke(this MonoBehaviour mb, Action f, float delay) { mb.StartCoroutine(InvokeRoutine(f, delay)); } [IteratorStateMachine(typeof(<InvokeRoutine>d__1))] private static IEnumerator InvokeRoutine(Action f, float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <InvokeRoutine>d__1(0) { f = f, delay = delay }; } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } }