using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
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 = "")]
[assembly: AssemblyCompany("NoRefineryProjectiles")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoRefineryProjectiles")]
[assembly: AssemblyTitle("NoRefineryProjectiles")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace NoRefineryProjectiles;
[BepInPlugin("NoRefineryProjectiles", "NoRefineryProjectiles", "1.0.0")]
public class NoProjectiles : BaseUnityPlugin
{
private void Awake()
{
Harmony.CreateAndPatchAll(typeof(NoProjectiles), (string)null);
}
[HarmonyPatch(typeof(Radiator), "OnEnable")]
[HarmonyPrefix]
private static bool DisableEitrParticles(Radiator __instance)
{
Transform transform = ((Component)__instance).transform;
object obj;
if (transform == null)
{
obj = null;
}
else
{
Transform parent = transform.parent;
obj = ((parent != null) ? ((Component)parent.parent).gameObject : null);
}
GameObject val = (GameObject)obj;
if ((Object)(object)val == (Object)null)
{
return true;
}
string name = ((Object)val).name;
if (name != "Eitr(Clone)" && name != "eitrrefinery(Clone)")
{
return true;
}
return false;
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "NoRefineryProjectiles";
public const string PLUGIN_NAME = "NoRefineryProjectiles";
public const string PLUGIN_VERSION = "1.0.0";
}