Instantiate our ContentHandler directly

This commit is contained in:
ivan tkachenko 2026-02-02 14:58:20 +02:00
parent 62a11f76d2
commit 3bdef5bc72
1 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ using Dawn.Utils;
using HarmonyLib; using HarmonyLib;
using Dusk; using Dusk;
using BepInEx.Configuration; using BepInEx.Configuration;
using HookahPlace.Content;
namespace HookahPlace; namespace HookahPlace;
@ -38,7 +39,9 @@ public class HookahPlace : BaseUnityPlugin
AssetBundle mainBundle = AssetBundleUtils.LoadBundle(Assembly.GetExecutingAssembly(), "hookahplaceasset"); AssetBundle mainBundle = AssetBundleUtils.LoadBundle(Assembly.GetExecutingAssembly(), "hookahplaceasset");
Mod = DuskMod.RegisterMod(this, mainBundle); Mod = DuskMod.RegisterMod(this, mainBundle);
Mod.RegisterContentHandlers();
// Effectively the same as `Mod.RegisterContentHandlers();` but simpler and faster
_ = new HookahContentHandler(Mod);
Logger.LogInfo($"{MyPluginInfo.PLUGIN_GUID} v{MyPluginInfo.PLUGIN_VERSION} has loaded!"); Logger.LogInfo($"{MyPluginInfo.PLUGIN_GUID} v{MyPluginInfo.PLUGIN_VERSION} has loaded!");
} }