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 ReplaceAWU v1.0.0
ReplaceAWU.dll
Decompiled 2 years 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 On.RoR2; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("ReplaceAWU")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ReplaceAWU")] [assembly: AssemblyTitle("ReplaceAWU")] [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 ReplaceAWU { [BepInPlugin("com.Nuxlar.ReplaceAWU", "ReplaceAWU", "1.0.0")] public class ReplaceAWU : BaseUnityPlugin { private GameObject chestPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/GoldChest/GoldChest.prefab").WaitForCompletion(); public void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown Stage.Start += new hook_Start(ReplaceAWUStageStart); } private void ReplaceAWUStageStart(orig_Start orig, Stage self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "shipgraveyard" && Object.op_Implicit((Object)(object)Run.instance)) { GameObject val = GameObject.Find("HOLDER: Boss Encounter"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val.transform.GetChild(0)).gameObject.SetActive(false); } GameObject val2 = new GameObject("HOLDER: Gold Chest"); val2.transform.position = new Vector3(-92.2f, 12.2f, -29f); val2.transform.rotation = Quaternion.identity; if (NetworkServer.active) { GameObject obj = Object.Instantiate<GameObject>(chestPrefab, val2.transform); obj.transform.localPosition = Vector3.zero; obj.transform.localRotation = Quaternion.identity; obj.transform.localEulerAngles = new Vector3(0f, 220f, 0f); NetworkServer.Spawn(obj); PurchaseInteraction component = obj.GetComponent<PurchaseInteraction>(); component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } } } }