Decompiled source of NeutronStarSample v1.0.0

NeutronStarSample.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
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("NeutronStarSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NeutronStarSample")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f60b80b1-a5ce-484d-9415-11dd066f8999")]
[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 NeutronStarSample;

[BepInPlugin("nihl.NeutronStarSample", "NeutronStarSample", "1.0.0.0")]
public class NeutronStarSampleBase : BaseUnityPlugin
{
	private const string modGUID = "nihl.NeutronStarSample";

	private const string modName = "NeutronStarSample";

	private const string modVersion = "1.0.0.0";

	private readonly Harmony harmony = new Harmony("nihl.NeutronStarSample");

	private static NeutronStarSampleBase instance;

	internal ManualLogSource MLS;

	private void Awake()
	{
		if ((Object)(object)instance == (Object)null)
		{
			instance = this;
		}
		MLS = Logger.CreateLogSource("nihl.NeutronStarSample");
		AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "NeutronStarSample"));
		Item val2 = val.LoadAsset<Item>("Assets/NeutronStarSample.asset");
		if ((Object)(object)val2 == (Object)null)
		{
			MLS.LogInfo((object)"Failed to load Star prefab,");
		}
		else
		{
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Items.RegisterScrap(val2, 3, (LevelTypes)510);
		}
		MLS.LogInfo((object)"NeutronStarSample Loaded!");
	}
}