Skip to content

Commit

Permalink
Achievements fix (#4)
Browse files Browse the repository at this point in the history
* Fix achievements to actually be disabled during modded runs

* Leave AchievementsOn = true for the main screen, so that unlocked characters and cruciball levels can load properly first try

* Use [HarmonyPatch] attribute on plugin class, instead of making separate patch class

* Fix newline
  • Loading branch information
Rwarazor authored Oct 14, 2023
1 parent 9fcf278 commit 0349b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ 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()
{
AchievementManager.AchievementsOn = false;
harmony.PatchAll();
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
}
Expand Down

0 comments on commit 0349b2d

Please sign in to comment.