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.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BetterShotgun;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("HexiBetterShotgun")]
[assembly: AssemblyCompany("HexiShotgunTweaks")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Tweaks for HexiBetterShotgun.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+f70366138e96d0a6ea00086af7510c040d897414")]
[assembly: AssemblyProduct("HexiShotgunTweaks")]
[assembly: AssemblyTitle("HexiShotgunTweaks")]
[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 HexiShotgunTweaks
{
[BepInPlugin("dopadream.lethalcompany.HexiShotgunTweaks", "HexiShotgunTweaks", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
[HarmonyPatch]
private class HexiShotgunTweaksPatches
{
[HarmonyPatch(typeof(FadeOutLine), "Update")]
[HarmonyPrefix]
public static void FadeOutLinePreFix(FadeOutLine __instance, ref Color ___col, ref LineRenderer ___line)
{
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
if (configShowTracers.Value)
{
Color val = default(Color);
if (ColorUtility.TryParseHtmlString(configTracerColor.Value, ref val))
{
___col = val;
}
else
{
___col = new Color(0.969f, 0.745f, 0.09f);
}
}
else
{
((Renderer)___line).forceRenderingOff = true;
}
}
}
private const string PLUGIN_GUID = "dopadream.lethalcompany.HexiShotgunTweaks";
private const string PLUGIN_NAME = "HexiShotgunTweaks";
private const string PLUGIN_VERSION = "1.0.0";
private const string LETHAL_CONFIG = "ainavt.lc.lethalconfig";
internal static ManualLogSource Logger;
internal static ConfigEntry<bool> configShowTracers;
internal static ConfigEntry<string> configTracerColor;
internal void initLethalConfig()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(configShowTracers, false));
LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(configTracerColor, false));
LethalConfigManager.SkipAutoGen();
}
private void Awake()
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
configShowTracers = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Show Bullet Tracers", true, new ConfigDescription("Show the bullet tracers from bullets fired from the shotgun. False would make it appear more like vanilla.", (AcceptableValueBase)null, Array.Empty<object>()));
configTracerColor = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Bullet Tracer Color", "#F7BE17", new ConfigDescription("Defines the color of the tracers fired by shotguns. Default is orange.", (AcceptableValueBase)null, Array.Empty<object>()));
if (Chainloader.PluginInfos.ContainsKey("ainavt.lc.lethalconfig"))
{
initLethalConfig();
}
new Harmony("dopadream.lethalcompany.HexiShotgunTweaks").PatchAll();
Logger.LogInfo((object)"HexiShotgunTweaks v1.0.0 loaded");
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "HexiShotgunTweaks";
public const string PLUGIN_NAME = "HexiShotgunTweaks";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}