Decompiled source of ReducedUpgradeSpace v0.1.0

ReducedUpgradeSpace.dll

Decompiled a day 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 UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("ReducedUpgradeSpace")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A Valheim mod that reduces the space required for upgrades to: forge")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+9e3201883a5bde26bd1051661feca60d072912fa")]
[assembly: AssemblyProduct("ReducedUpgradeSpace")]
[assembly: AssemblyTitle("ReducedUpgradeSpace")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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 ReducedUpgradeSpace
{
	[BepInPlugin("red.logsqua.ReducedUpgradeSpace", "ReducedUpgradeSpace", "0.1.0")]
	public class ReducedUpgradeSpace : BaseUnityPlugin
	{
		private const string PluginGUID = "red.logsqua.ReducedUpgradeSpace";

		public const string PluginName = "ReducedUpgradeSpace";

		private const string PluginVersion = "0.1.0";

		public static ManualLogSource Log;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"ReducedUpgradeSpace version 0.1.0 is loaded!");
			Harmony.CreateAndPatchAll(typeof(ReducedUpgradeSpace).Assembly, "red.logsqua.ReducedUpgradeSpace");
		}
	}
	[HarmonyPatch(typeof(Piece), "Awake")]
	public static class Piece_Awake_Patch
	{
		private static void Postfix(Piece __instance)
		{
			if ((Object)(object)__instance.m_craftingStation != (Object)null && __instance.m_spaceRequirement > 0f)
			{
				__instance.m_spaceRequirement *= 0.5f;
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "ReducedUpgradeSpace";

		public const string PLUGIN_NAME = "ReducedUpgradeSpace";

		public const string PLUGIN_VERSION = "0.1.0";
	}
}