-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.cs
34 lines (28 loc) · 959 Bytes
/
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
using BepInEx;
using BepInEx.IL2CPP;
using BepInEx.Logging;
using HarmonyLib;
using RF5.RecipeMod.Patch;
using RF5.RecipeMod.Recipe;
using System.IO;
namespace RF5.RecipeMod {
[BepInPlugin(GUID, MODNAME, VERSION)]
internal class Plugin : BasePlugin {
public const string MODNAME = "RecipeMod";
public const string GUID = "RF5.RecipeMod";
public const string VERSION = "1.0.0";
internal static ManualLogSource log;
internal static string FILEPATH;
public override void Load() {
log = Logger.CreateLogSource("RecipeMod");
// Plugin startup logic
log.LogInfo($"Plugin {GUID} is loaded!");
FILEPATH = Path.GetDirectoryName(IL2CPPChainloader.Instance.Plugins[GUID].Location);
RecipeLoader.Instance.LoadRecipes();
Harmony.CreateAndPatchAll(typeof(SVPatch));
Harmony.CreateAndPatchAll(typeof(RecipePatch));
Harmony.CreateAndPatchAll(typeof(CategoryPatch));
Harmony.CreateAndPatchAll(typeof(SaveDataPatch));
}
}
}