Decompiled source of AddMoneyMod v1.0.0

AddMoneyMod.dll

Decompiled 11 months 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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TerminalApi;
using TerminalApi.Classes;
using UnityEngine;

[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("AddMoneyMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AddMoneyMod")]
[assembly: AssemblyTitle("AddMoneyMod")]
[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 AddMoneyMod
{
	[BepInPlugin("Apoly.AddMoneyMod", "Add Money Mod", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class AddMoneyModBase : BaseUnityPlugin
	{
		private const string mod_GUID = "Apoly.AddMoneyMod";

		private const string mod_NAME = "Add Money Mod";

		private const string mod_VERSION = "1.0.0";

		private readonly Harmony harmony = new Harmony("Apoly.AddMoneyMod");

		private static AddMoneyModBase Instance;

		internal ManualLogSource mls;

		public static string description = "Adds the specified amount of credits";

		private void Awake()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Expected O, but got Unknown
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Apoly.AddMoneyMod");
			harmony.PatchAll();
			mls.LogInfo((object)"Plugin Apoly.AddMoneyMod is loaded!");
			CommandInfo val = new CommandInfo();
			val.Category = "none";
			val.Description = description;
			val.DisplayTextSupplier = delegate
			{
				string terminalInput5 = TerminalApi.GetTerminalInput();
				mls.LogInfo((object)(terminalInput5 ?? ""));
				int num5 = 250;
				Terminal val10 = Object.FindObjectOfType<Terminal>();
				val10.groupCredits += num5;
				return "Added 250 credits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
			};
			TerminalApi.AddCommand("addmoney250", val, (string)null, true);
			CommandInfo val2 = new CommandInfo();
			val2.Category = "none";
			val2.Description = description;
			val2.DisplayTextSupplier = delegate
			{
				string terminalInput4 = TerminalApi.GetTerminalInput();
				mls.LogInfo((object)(terminalInput4 ?? ""));
				int num4 = 500;
				Terminal val9 = Object.FindObjectOfType<Terminal>();
				val9.groupCredits += num4;
				return "Added 500 credits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
			};
			TerminalApi.AddCommand("addmoney500", val2, (string)null, true);
			CommandInfo val3 = new CommandInfo();
			val3.Category = "none";
			val3.Description = description;
			val3.DisplayTextSupplier = delegate
			{
				string terminalInput3 = TerminalApi.GetTerminalInput();
				mls.LogInfo((object)(terminalInput3 ?? ""));
				int num3 = 750;
				Terminal val8 = Object.FindObjectOfType<Terminal>();
				val8.groupCredits += num3;
				return "Added 750 credits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
			};
			TerminalApi.AddCommand("addmoney750", val3, (string)null, true);
			CommandInfo val4 = new CommandInfo();
			val4.Category = "none";
			val4.Description = description;
			val4.DisplayTextSupplier = delegate
			{
				string terminalInput2 = TerminalApi.GetTerminalInput();
				mls.LogInfo((object)(terminalInput2 ?? ""));
				int num2 = 1000;
				Terminal val7 = Object.FindObjectOfType<Terminal>();
				val7.groupCredits += num2;
				return "Added 1000 credits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
			};
			TerminalApi.AddCommand("addmoney1000", val4, (string)null, true);
			CommandInfo val5 = new CommandInfo();
			val5.Category = "none";
			val5.Description = description;
			val5.DisplayTextSupplier = delegate
			{
				string terminalInput = TerminalApi.GetTerminalInput();
				mls.LogInfo((object)(terminalInput ?? ""));
				int num = 5000;
				Terminal val6 = Object.FindObjectOfType<Terminal>();
				val6.groupCredits += num;
				return "Added 5000 credits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
			};
			TerminalApi.AddCommand("addmoney5000", val5, (string)null, true);
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "AddMoneyMod";

		public const string PLUGIN_NAME = "AddMoneyMod";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}