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 LunarCoinUtility v1.2.0
plugins/LunarCoinUtility.dll
Decompiled 2 months 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 RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("InfiniteLunarCoins")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("InfiniteLunarCoins")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("93d4dedb-4918-48f7-8394-e4be6b07d4e4")] [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")] [BepInPlugin("com.yourname.lunarcoins", "Lunar Coin Utility", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class LunarCoinUtility : BaseUnityPlugin { private ConfigEntry<int> coinAmount; private ConfigEntry<bool> giveCoins; private void Awake() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown coinAmount = ((BaseUnityPlugin)this).Config.Bind<int>("Coins", "Coin Amount", 1000, "Amount of lunar coins to give."); giveCoins = ((BaseUnityPlugin)this).Config.Bind<bool>("Coins", "Apply Coins", false, "Give yourself the selected number of lunar coins."); ModSettingsManager.SetModDescription("Set your lunar coins to any amount."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(coinAmount, new IntSliderConfig { min = 0, max = 9999999 })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(giveCoins)); giveCoins.SettingChanged += OnGiveCoins; } private void OnGiveCoins(object sender, EventArgs e) { if (giveCoins.Value && LocalUserManager.readOnlyLocalUsersList.Count != 0) { LocalUser val = LocalUserManager.readOnlyLocalUsersList[0]; if (((val != null) ? val.userProfile : null) != null) { val.userProfile.coins = (uint)coinAmount.Value; } giveCoins.Value = false; } } }