using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NoPropShadows")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoPropShadows")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1dbd924a-01a9-47b2-8455-ee6d1110f363")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoPropShadows;
[BepInPlugin("LCMOD.NoPropShadows", "NoPropShadows", "1.0.0")]
public class NoPropShadowsBase : BaseUnityPlugin
{
public const string MODGUID = "LCMOD.NoPropShadows";
public const string MODNAME = "NoPropShadows";
public const string MODVERSION = "1.0.0";
private readonly Harmony harmony = new Harmony("LCMOD.NoPropShadows");
public static NoPropShadowsBase Instance;
public static ManualLogSource logger;
private List<string> items = new List<string> { "FancyLamp", "FancyLamp(Clone)", "LungApparatusTurnedOff", "LungApparatusTurnedOff(Clone)" };
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
logger = ((BaseUnityPlugin)this).Logger;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Mod LCMOD.NoPropShadows is loaded!");
harmony.PatchAll(typeof(NoPropShadowsBase));
}
[HarmonyPatch(typeof(StartOfRound), "Start")]
[HarmonyPostfix]
private static void lightpatch()
{
foreach (Light item in Resources.FindObjectsOfTypeAll<Light>().ToList())
{
if ((Object)(object)item != (Object)null && (Object)(object)((Component)item).transform.parent != (Object)null)
{
string name = ((Object)((Component)item).transform.parent).name;
if (Instance.items.Contains(name))
{
item.shadows = (LightShadows)0;
}
}
}
}
}