Decompiled source of SadRoman v1.0.1

SadRoman.dll

Decompiled 10 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 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("SadRoman")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SadRoman")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("579a4c73-e469-4a34-94ef-27a87063a3a1")]
[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 SadRoman;

[BepInPlugin("seyirs.SadRoman", "SadRoman seyirs.off", "1.0.1")]
public class SadRoman : BaseUnityPlugin
{
	private const string modGUID = "seyirs.SadRoman";

	private const string modName = "SadRoman seyirs.off";

	private const string modVersion = "1.0.1";

	private readonly Harmony harmony = new Harmony("seyirs.SadRoman");

	private static SadRoman Instance;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "sadroman");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			Item val2 = val.LoadAsset<Item>("Assets/ModItems/SadRoman/SadRomanItem.asset");
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Utilities.FixMixerGroups(val2.spawnPrefab);
			Items.RegisterScrap(val2, 30, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Sad Roman Plugin");
		}
	}
}