-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.cs
56 lines (46 loc) · 1.51 KB
/
Plugin.cs
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
50
51
52
53
54
55
56
using BepInEx;
using BepInEx.Logging;
using COTL_API.CustomFollowerCommand;
using COTL_API.CustomStructures;
using HarmonyLib;
using MatingTentMod.FollowerCommands;
using MatingTentMod.Structures;
using System.IO;
namespace MatingTentMod;
[BepInPlugin(PluginGuid, PluginName, PluginVer)]
[BepInDependency("io.github.xhayper.COTL_API")]
[HarmonyPatch]
public class Plugin : BaseUnityPlugin
{
public const string PluginGuid = "IngoH.cotl.MatingTentMod";
public const string PluginName = "MatingTentMod";
public const string PluginVer = "1.0.0";
internal static ManualLogSource Log;
internal static readonly Harmony Harmony = new(PluginGuid);
internal static string PluginPath;
internal static MatingTent MatingTent;
internal static MateFollower MateCommand;
internal static MateLamb MateLamb;
private void Awake()
{
this.Logger.LogInfo($"Loaded {PluginName}!");
Log = this.Logger;
PluginPath = Path.GetDirectoryName(this.Info.Location);
MatingTent = new MatingTent();
CustomStructureManager.Add(new MatingTent());
MateCommand = new MateFollower();
CustomFollowerCommandManager.Add(MateCommand);
MateLamb = new MateLamb();
CustomFollowerCommandManager.Add(MateLamb);
}
private void OnEnable()
{
Harmony.PatchAll();
this.Logger.LogInfo($"Loaded {PluginName}!");
}
private void OnDisable()
{
Harmony.UnpatchSelf();
this.Logger.LogInfo($"Unloaded {PluginName}!");
}
}