-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlugin.cs
More file actions
26 lines (23 loc) · 764 Bytes
/
Plugin.cs
File metadata and controls
26 lines (23 loc) · 764 Bytes
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
using BepInEx;
using HarmonyLib;
using Peglin.Achievements;
namespace PeglinCore
{
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
[BepInProcess("Peglin.exe")]
[HarmonyPatch]
public class Plugin : BaseUnityPlugin
{
private readonly Harmony harmony = new Harmony(PluginInfo.PLUGIN_GUID);
private void Awake()
{
harmony.PatchAll();
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
}
[HarmonyPatch(typeof(PeglinUI.LoadoutManager.LoadoutManager), "SetupDataForNewGame")]
[HarmonyPostfix]
static private void PatchSetupDataForNewGame() {
AchievementManager.AchievementsOn = false;
}
}
}