Decompiled source of HOMIE BLOCKS v1.0.2

HOMIE_BLOCKS/BepInEx/plugins/TestMod.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 BepInEx.Logging;
using HarmonyLib;
using LethalLib.Modules;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("TestMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a1f88fcb-8a75-4bfe-b663-d5da13275a6e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TestMod;

[BepInPlugin("lh.testmod", "testmod", "1.0.0.0")]
public class TestModPatch : BaseUnityPlugin
{
	private const string ModGUID = "lh.testmod";

	private const string ModName = "testmod";

	private const string ModVersion = "1.0.0.0";

	private readonly Harmony harmony = new Harmony("lh.testmod");

	private static TestModPatch Instance;

	internal ManualLogSource logger;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		logger = Logger.CreateLogSource("lh.testmod");
		AssetBundle obj = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dazblock"));
		Item val = obj.LoadAsset<Item>("Assets/DazBlockMod/dazblock.asset");
		Item val2 = obj.LoadAsset<Item>("Assets/DazBlockMod/hoggblock.asset");
		Item obj2 = obj.LoadAsset<Item>("Assets/DazBlockMod/tomblock.asset");
		NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
		NetworkPrefabs.RegisterNetworkPrefab(obj2.spawnPrefab);
		Utilities.FixMixerGroups(val.spawnPrefab);
		Utilities.FixMixerGroups(val2.spawnPrefab);
		Utilities.FixMixerGroups(obj2.spawnPrefab);
		Items.RegisterScrap(val, 1000, (LevelTypes)(-1));
		Items.RegisterScrap(val2, 1000, (LevelTypes)(-1));
		Items.RegisterScrap(obj2, 1000, (LevelTypes)(-1));
		logger.LogInfo((object)"testmod has initalized");
	}
}