Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of CautiousScug v1.0.0
CautiousScug.dll
Decompiled 10 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 Microsoft.CodeAnalysis; using R2API; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; [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("CautiousScug")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("CautiousScug")] [assembly: AssemblyTitle("CautiousScug")] [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 CautiousScug { [BepInPlugin("aanon.CautiousScug", "CautiousScug", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { public const string PluginGUID = "aanon.CautiousScug"; public const string PluginAuthor = "aanon"; public const string PluginName = "CautiousScug"; public const string PluginVersion = "1.0.0"; public static AssetBundle assetBundle; public void Awake() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) assetBundle = AssetBundle.LoadFromFile(Assembly.GetExecutingAssembly().Location.Replace("CautiousScug.dll", "cautiousscug")); GameObject val = assetBundle.LoadAsset<GameObject>("CautiousScugHolder.prefab"); Transform child = val.transform.GetChild(0); ((Renderer)((Component)child).GetComponent<MeshRenderer>()).material.shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); ItemDef val2 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/HealWhileSafe/HealWhileSafe.asset").WaitForCompletion(); val2.nameToken = "CAUTIOUS_SCUG_NAME"; val2.pickupIconSprite = assetBundle.LoadAsset<Sprite>("texCautiousScug.png"); val2.pickupModelPrefab = val; ModelPanelParameters val3 = val.AddComponent<ModelPanelParameters>(); val3.minDistance = 7f; val3.maxDistance = 15f; val3.focusPointTransform = child; val3.cameraPositionTransform = child; LanguageAPI.Add("CAUTIOUS_SCUG_NAME", "Cautious Scug"); } } }