Chud.dll

Decompiled 3 days ago
using 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("Chud")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Chud")]
[assembly: AssemblyTitle("Chud")]
[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 Chud
{
	[BepInPlugin("aanon.Chud", "Chud", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Main : BaseUnityPlugin
	{
		public const string PluginGUID = "aanon.Chud";

		public const string PluginAuthor = "aanon";

		public const string PluginName = "Chud";

		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("Chud.dll", "chud"));
			GameObject val = assetBundle.LoadAsset<GameObject>("ChudHolder.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/LunarBadLuck/LunarBadLuck.asset").WaitForCompletion();
			val2.nameToken = "CHUD_NAME";
			val2.descriptionToken = "CHUD_LORE";
			val2.pickupToken = "CHUD_LORE_2";
			val2.loreToken = "CHUD_LORE_3";
			val2.pickupIconSprite = assetBundle.LoadAsset<Sprite>("texChud.png");
			val2.pickupModelPrefab = val;
			ModelPanelParameters val3 = val.AddComponent<ModelPanelParameters>();
			val3.minDistance = 7f;
			val3.maxDistance = 15f;
			val3.focusPointTransform = child;
			val3.cameraPositionTransform = child;
			LanguageAPI.Add("CHUD_NAME", "Chud");
			LanguageAPI.Add("CHUD_LORE", "All skill cooldowns are reduced by <style=cIsUtility>2</style> <style=cStack>(+1 per stack)</style> seconds. <style=cIsHealth>Nothing ever happens</style>.");
			LanguageAPI.Add("CHUD_LORE_2", "Reduce your skill cooldowns by 2 seconds. <color=#FF7F7F>Nothing ever happens.</color>");
			LanguageAPI.Add("CHUD_LORE_3", "The West Has <style=cMono>Fallen.</style>\r\n\r\n<style=cMono>Billions</style> Must Die.");
		}
	}
}