Decompiled source of Arrness v1.0.3

plugins/arness.dll

Decompiled 11 months ago
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Alexandria.ItemAPI;
using BepInEx;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("ClassLibrary")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Mod")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace arness;

public class CloakOfTheStormbringer : PassiveItem
{
	public static void Register()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Expected O, but got Unknown
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		string text = "Cloak of the Stormbringer";
		string text2 = "arness/Resources/arnesscape";
		GameObject val = new GameObject(text);
		CloakOfTheStormbringer cloakOfTheStormbringer = val.AddComponent<CloakOfTheStormbringer>();
		ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
		string text3 = "Billows Without Wind";
		string text4 = "A cape belonging to Arrn'ess, the Storm Sorcerer. It seems to be charged with static electricity at all times.\n\nGrants flight over pits. Standing in water electrifies it, similar to Battery Bullets.";
		ItemBuilder.SetupItem((PickupObject)(object)cloakOfTheStormbringer, text3, text4, "dnd");
		((PickupObject)cloakOfTheStormbringer).quality = (ItemQuality)3;
	}

	public override void Pickup(PlayerController player)
	{
		((PassiveItem)this).Pickup(player);
		Module.Log("Player picked up " + ((PickupObject)this).DisplayName);
	}

	public override void DisableEffect(PlayerController player)
	{
		Module.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
	}

	public override DebrisObject Drop(PlayerController player)
	{
		return ((PassiveItem)this).Drop(player);
	}

	public override void Update()
	{
		((PassiveItem)this).Update();
		if (((GameActor)((PassiveItem)this).Owner).IsOverPitAtAll && !((GameActor)((PassiveItem)this).Owner).IsFlying)
		{
			((GameActor)((PassiveItem)this).Owner).SetIsFlying(true, "Cloak of the Stormbringer", false, false);
			((PassiveItem)this).Owner.AdditionalCanDodgeRollWhileFlying.AddOverride("Cloak of the Stormbringer", (float?)null);
		}
		if (!((GameActor)((PassiveItem)this).Owner).IsOverPitAtAll && ((GameActor)((PassiveItem)this).Owner).IsFlying)
		{
			((GameActor)((PassiveItem)this).Owner).SetIsFlying(false, "Cloak of the Stormbringer", false, false);
			((PassiveItem)this).Owner.AdditionalCanDodgeRollWhileFlying.RemoveOverride("Cloak of the Stormbringer");
		}
		if (!((GameActor)((PassiveItem)this).Owner).CurrentGoop.CanBeElectrified)
		{
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Azazel.etg.arrness", "Arrn'ess", "1.0.0")]
public class Module : BaseUnityPlugin
{
	public const string GUID = "Azazel.etg.arrness";

	public const string NAME = "Arrn'ess";

	public const string VERSION = "1.0.0";

	public const string TEXT_COLOR = "#4C00B0";

	public void Start()
	{
		ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
	}

	public void GMStart(GameManager g)
	{
		Assets.SetupSpritesFromAssembly(Assembly.GetExecutingAssembly(), "arness.Resources");
		CloakOfTheStormbringer.Register();
		Log("Arrn'ess v1.0.0 started successfully.");
	}

	public static void Log(string text, string color = "#4C00B0")
	{
		ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
	}
}
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resource1
{
	private static ResourceManager resourceMan;

	private static CultureInfo resourceCulture;

	[EditorBrowsable(EditorBrowsableState.Advanced)]
	internal static ResourceManager ResourceManager
	{
		get
		{
			if (resourceMan == null)
			{
				ResourceManager resourceManager = new ResourceManager("arness.Resource1", typeof(Resource1).Assembly);
				resourceMan = resourceManager;
			}
			return resourceMan;
		}
	}

	[EditorBrowsable(EditorBrowsableState.Advanced)]
	internal static CultureInfo Culture
	{
		get
		{
			return resourceCulture;
		}
		set
		{
			resourceCulture = value;
		}
	}

	internal static Bitmap arnesscape
	{
		get
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			object @object = ResourceManager.GetObject("arnesscape", resourceCulture);
			return (Bitmap)@object;
		}
	}

	internal Resource1()
	{
	}
}