Please disclose if your mod was created primarily 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 LucasashDnDSuits v1.0.9
LucasashDnDSuits.dll
Decompiled 2 years 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.Logging; using HarmonyLib; 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("Lucasash-DnDMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Replaces the red soda can with arachne can")] [assembly: AssemblyFileVersion("1.0.6.0")] [assembly: AssemblyInformationalVersion("1.0.0+c8e87d8707ca93fe12408205bdb6ec0e04c135d6")] [assembly: AssemblyProduct("Lucasash-DnDMod")] [assembly: AssemblyTitle("Lucasash-DnDMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace ArachneCan { internal class Patches { [HarmonyPatch(typeof(GrabbableObject), "SetScrapValue")] [HarmonyPostfix] private static void SetScrapValuePatch(GrabbableObject __instance) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown if (__instance.itemProperties.itemName == "Red soda" && (Object)__instance.mainObjectRenderer != (Object)null) { Material[] materials = ((Renderer)__instance.mainObjectRenderer).materials; for (int i = 0; i < materials.Length; i++) { materials[i].mainTexture = (Texture)Plugin.texture; } } } } [BepInPlugin("Lucasash-DnDMod", "Lucasash-DnDMod", "1.0.6")] public class Plugin : BaseUnityPlugin { public static Texture2D texture; public static ManualLogSource StaticLogger; private void Awake() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) StaticLogger = ((BaseUnityPlugin)this).Logger; try { string path = Directory.GetFiles(Path.Combine(Paths.PluginPath, "Lucasash-LucasashDnDSuits"), "arachne.png")[0]; texture = new Texture2D(2, 2); ImageConversion.LoadImage(texture, File.ReadAllBytes(path)); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Unable to load arachne can texture with error: " + ex.Message)); } new Harmony("Lucasash-DnDMod").PatchAll(typeof(Patches)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Lucasash-DnDMod is loaded!"); } } public static class PluginInfo { public const string PLUGIN_GUID = "Lucasash-DnDMod"; public const string PLUGIN_NAME = "Lucasash-DnDMod"; public const string PLUGIN_VERSION = "1.0.6"; } } 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 Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } }