Decompiled source of SandlingInvasion v0.1.0

SandlingInvasion.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Alexandria.ItemAPI;
using BepInEx;
using Microsoft.CodeAnalysis;
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("Sandling Invasion")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SandlingInvasion")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[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 Mod
{
	public class ExamplePassive : 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_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Example Item Name";
			string text2 = "SandlingInvasion/Resources/example_item_sprite";
			GameObject val = new GameObject(text);
			ExamplePassive examplePassive = val.AddComponent<ExamplePassive>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Example Short Desc.";
			string text4 = "Example Long Description\n\nWow this description is really looooooooooong!";
			ItemBuilder.SetupItem((PickupObject)(object)examplePassive, text3, text4, "example");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)3, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)4, 1f, (ModifyMethod)0);
			((PickupObject)examplePassive).quality = (ItemQuality)2;
		}

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

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("sandlings-united.etg.sandling-invasion", "Sandling invasion!", "0.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string GUID = "sandlings-united.etg.sandling-invasion";

		public const string NAME = "Sandling invasion!";

		public const string VERSION = "0.1.0";

		public const string TEXT_COLOR = "#FFD97F";

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

		public void GMStart(GameManager g)
		{
			ExamplePassive.Register();
			Log("Sandling invasion! v0.1.0 started successfully.", "#FFD97F");
		}

		public static void Log(string text, string color = "#FFFFFF")
		{
			ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
		}
	}
}