using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using LethalLib.Modules;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("UltraFlashlightMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UltraFlashlightMod")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("da02722a-1fdf-4461-aec8-db069a93930d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace UltraFlashlightMod;
[BepInPlugin("25BLUEMAN25.UltraFlashlight", "Ultra Flashlight", "0.0.1")]
public class Plugin : BaseUnityPlugin
{
private const string GUID = "25BLUEMAN25.UltraFlashlight";
private const string NAME = "Ultra Flashlight";
private const string VERSION = "0.0.1";
public static Plugin instance;
private void Awake()
{
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
instance = this;
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ultraflashlightassetbundle");
AssetBundle val = AssetBundle.LoadFromFile(text);
if ((Object)(object)val == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load UltraFlashlight AssetBundle from " + text));
return;
}
Item val2 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/plugins/UltraFlashlightCold.asset");
if ((Object)(object)val2 == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load UltraFlashlight asset.");
return;
}
Utilities.FixMixerGroups(val2.spawnPrefab);
if ((Object)(object)val2.spawnPrefab == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"UltraFlashlight spawnPrefab is null.");
return;
}
NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
val2.weight = 1.05f;
val2.batteryUsage = 480f;
val2.rotationOffset = new Vector3(179f, 0f, 0f);
val2.positionOffset = new Vector3(0f, 0.09f, 0f);
TerminalNode val3 = ScriptableObject.CreateInstance<TerminalNode>();
val3.clearPreviousText = true;
val3.displayText = "The best flashlight u can get.";
Items.RegisterShopItem(val2, (TerminalNode)null, (TerminalNode)null, val3, 100);
Item val4 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/plugins/UltraFlashlightWarm.asset");
if ((Object)(object)val4 == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load UltraFlashlight asset.");
return;
}
Utilities.FixMixerGroups(val4.spawnPrefab);
if ((Object)(object)val4.spawnPrefab == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"UltraFlashlight spawnPrefab is null.");
return;
}
NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
val4.weight = 1.05f;
val4.batteryUsage = 480f;
val4.rotationOffset = new Vector3(179f, 0f, 0f);
val4.positionOffset = new Vector3(0f, 0.09f, 0f);
TerminalNode val5 = ScriptableObject.CreateInstance<TerminalNode>();
val5.clearPreviousText = true;
val5.displayText = "The best flashlight u can get.";
Items.RegisterShopItem(val4, (TerminalNode)null, (TerminalNode)null, val5, 100);
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "25BLUEMAN25.UltraFlashlight");
((BaseUnityPlugin)this).Logger.LogInfo((object)"Patched Ultra Flashlight");
}
}