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 LcJatrovyKnedlicek v0.1.3
koumartin.LcJatrovyKnedlicek.dll
Decompiled 2 months agousing System; using System.Diagnostics; using System.IO; 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 LethalLib.Modules; using Microsoft.CodeAnalysis; using UnityEngine; [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("koumartin.LcJatrovyKnedlicek")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.1.3.0")] [assembly: AssemblyInformationalVersion("0.1.3+9ae7bbfeba2e4b0ed70a4286d454555eb7a38c35")] [assembly: AssemblyProduct("LcJatrovyKnedlicek")] [assembly: AssemblyTitle("koumartin.LcJatrovyKnedlicek")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.3.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 LcJatrovyKnedlicek { public static class MyPluginInfo { public const string PLUGIN_GUID = "koumartin.LcJatrovyKnedlicek"; public const string PLUGIN_NAME = "LcJatrovyKnedlicek"; public const string PLUGIN_VERSION = "0.1.3"; } } namespace LCJatrovyKnedlicek { [BepInPlugin("koumartin.LcJatrovyKnedlicek", "LcJatrovyKnedlicek", "0.1.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class LcJatrovyKnedlicek : BaseUnityPlugin { private static AssetBundle? _assetBundle; public static LcJatrovyKnedlicek Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; ConfigEntry<int> val = ((BaseUnityPlugin)this).Config.Bind<int>("General", "RarityRegularMoons", 70, "Rarity on regular moons."); ConfigEntry<int> val2 = ((BaseUnityPlugin)this).Config.Bind<int>("General", "RarityDine", 5, "Rarity on Dine. (to not break its unique scrap design)"); ConfigEntry<int> val3 = ((BaseUnityPlugin)this).Config.Bind<int>("General", "RarityModded", 70, "Rarity of modded moons."); ConfigEntry<int> val4 = ((BaseUnityPlugin)this).Config.Bind<int>("General", "MinValue", 24, "Minimum value for the scrap."); ConfigEntry<int> val5 = ((BaseUnityPlugin)this).Config.Bind<int>("General", "MaxValue", 60, "Maximum value for the scrap."); string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Logger.LogInfo((object)("Loading custom assets from " + directoryName)); _assetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "jatrovyknedlicek")); if ((Object)(object)_assetBundle == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); return; } Item val6 = _assetBundle.LoadAsset<Item>("Assets/Scrap/JatrovyKnedlicek/JatrovyKnedlicek.asset"); val6.minValue = (int)((double)val4.Value / 0.4); val6.maxValue = (int)((double)val5.Value / 0.4); Utilities.FixMixerGroups(val6.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab); Items.RegisterScrap(val6, val.Value, (LevelTypes)15100); Items.RegisterScrap(val6, val2.Value, (LevelTypes)256); Items.RegisterScrap(val6, val3.Value, (LevelTypes)1024); Logger.LogInfo((object)"koumartin.LcJatrovyKnedlicek v0.1.3 has loaded!"); } } }