Decompiled source of StickyBombYipeeSound v1.0.1

Yipee.dll

Decompiled a month ago
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 R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
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.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Yipee")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Yipee")]
[assembly: AssemblyTitle("Yipee")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Yipee;

[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Dragonyck.YipeeStickyBomb", "YipeeStickyBomb", "1.0.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.YipeeStickyBomb";

	public const string MODNAME = "YipeeStickyBomb";

	public const string VERSION = "1.0.0";

	public uint Play_StickyBomb_Yip = 1125897664u;

	public uint Play_StickyBomb_Yipeee = 3269075147u;

	private void Awake()
	{
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		using (Stream stream = executingAssembly.GetManifestResourceStream("Yipee.Yipee.bnk"))
		{
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}
		GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/StickyBomb/BehemothVFX.prefab").WaitForCompletion(), "YipeeExplosion", false);
		val.GetComponent<EffectComponent>().soundName = "Play_StickyBomb_Yipeee";
		ContentAddition.AddEffect(val);
		GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/StickyBomb/StickyBomb.prefab").WaitForCompletion();
		val2.GetComponent<LoopSound>().akSoundString = "Play_StickyBomb_Yip";
		val2.GetComponent<ProjectileImpactExplosion>().impactEffect = val;
	}
}