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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("WeedKillerFixes")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Fixes some major issues with weed killer")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WeedKillerFixes")]
[assembly: AssemblyTitle("WeedKillerFixes")]
[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 WeedKillerFixes
{
public static class PluginInfo
{
public const string PLUGIN_GUID = "WeedKillerFixes";
public const string PLUGIN_NAME = "WeedKillerFixes";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace WeedKillerTweaks
{
[BepInPlugin("furiante.WeedKillerTweaks", "Weed Killer Tweaks", "1.0.0")]
public class WeedPlugin : BaseUnityPlugin
{
private const string PLUGIN_GUID = "furiante.WeedKillerTweaks";
private const string PLUGIN_NAME = "Weed Killer Tweaks";
private const string PLUGIN_VERSION = "1.0.0";
public static ManualLogSource Log;
private readonly Harmony harmony = new Harmony("furiante.WeedKillerTweaks");
private static WeedPlugin Instance;
public static ConfigEntry<float> TankMultiplier;
public static ConfigEntry<int> WeedKillerPrice;
private void Awake()
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
Instance = this;
TankMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Weed Killer Tweaks", "TankMultiplier", 2f, new ConfigDescription("The Value by which the default Tank capacity will be multiplied. Accepts any float value", (AcceptableValueBase)null, Array.Empty<object>()));
WeedKillerPrice = ((BaseUnityPlugin)this).Config.Bind<int>("Weed Killer Weaks", "WeedKillerStorePrice", 40, new ConfigDescription("Defines how much Weed Killers will cost in the store", (AcceptableValueBase)null, Array.Empty<object>()));
Log = ((BaseUnityPlugin)this).Logger;
harmony.PatchAll();
}
}
}
namespace WeedKillerTweaks.Patches
{
[HarmonyPatch(typeof(SprayPaintItem))]
public class TankPatch
{
[HarmonyPatch("__initializeVariables")]
[HarmonyPostfix]
private static void sprayCanModifier(ref float ___sprayCanTank, ref bool ___isWeedKillerSprayBottle)
{
if (___isWeedKillerSprayBottle)
{
___sprayCanTank *= WeedPlugin.TankMultiplier.Value;
}
}
}
[HarmonyPatch(typeof(Terminal))]
internal class PricePatch
{
[HarmonyPatch("SetItemSales")]
[HarmonyPostfix]
private static void sprayCanPriceModifier(ref Item[] ___buyableItemsList)
{
___buyableItemsList[13].creditsWorth = WeedPlugin.WeedKillerPrice.Value;
}
}
}