-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cs
More file actions
49 lines (40 loc) · 1.38 KB
/
Plugin.cs
File metadata and controls
49 lines (40 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System.IO;
using COTL_API.CustomInventory;
using COTL_API.CustomFollowerCommand;
using CotLTemplateMod.Items;
using CotLTemplateMod.CustomFollowerCommands;
using static InventoryItem;
namespace CotLTemplateMod
{
[BepInPlugin(PluginGuid, PluginName, PluginVer)]
[BepInDependency("io.github.xhayper.COTL_API")]
[HarmonyPatch]
public class Plugin : BaseUnityPlugin
{
public const string PluginGuid = "IngoH.cotl.CotLTemplateMod";
public const string PluginName = "CotLTemplateMod";
public const string PluginVer = "1.0.0";
internal static ManualLogSource Log;
internal readonly static Harmony Harmony = new(PluginGuid);
internal static string PluginPath;
internal static ITEM_TYPE ExampleItem;
internal static FollowerCommands FollowerCommand;
private void Awake()
{
Log = Logger;
PluginPath = Path.GetDirectoryName(Info.Location);
ExampleItem = CustomItemManager.Add(new ExampleItem());
FollowerCommand = CustomFollowerCommandManager.Add(new ExampleFollowerCommand());
}
private void OnEnable()
{
Harmony.PatchAll();
LogInfo($"Loaded {PluginName}!");
}
private void OnDisable()
{
Harmony.UnpatchSelf();
LogInfo($"Unloaded {PluginName}!");
}
}
}