-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPortraiturePlusMod.cs
More file actions
22 lines (20 loc) · 1018 Bytes
/
PortraiturePlusMod.cs
File metadata and controls
22 lines (20 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Diagnostics.CodeAnalysis;
using HarmonyLib;
using PortraiturePlus.Main;
using PortraiturePlus.Patches;
using StardewModdingAPI;
namespace PortraiturePlus;
[SuppressMessage("ReSharper", "UnusedType.Global")]
internal sealed class PortraiturePlusMod : Mod
{
public override void Entry(IModHelper? help)
{
FestivalHelper.Init();
ContentPackLoader.Init(help!);
PortraiturePatch.Init(monitor: Monitor);
var harmony = new Harmony(ModManifest.UniqueID);
harmony.Patch(original: ShopMenuPatch.TryLoadPortrait(), prefix: new HarmonyMethod(AccessTools.Method(typeof(ShopMenuPatch), nameof(ShopMenuPatch.TryLoadPortrait_Prefix))));
harmony.Patch(original: PortraiturePatch.GetPortrait(), prefix: new HarmonyMethod(AccessTools.Method(typeof(PortraiturePatch), nameof(PortraiturePatch.GetPortrait_Prefix))));
harmony.Patch(original: PortraiturePatch.LoadAllPortraits(), postfix: new HarmonyMethod(AccessTools.Method(typeof(PortraiturePatch), nameof(PortraiturePatch.LoadAllPortraits_Postfix))));
}
}