diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 12:19:59 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 12:19:59 -0500 |
| commit | 6494004f64d93381768e95eec04a886ac53df838 (patch) | |
| tree | 024e1fca259db36a4b0c6d3ba501fcf9f61694ba /Plugin.cs | |
| parent | 42bc500a77f4b29d952058aede6abfaf91bd74c8 (diff) | |
| download | manifold-garden-archipelago-6494004f64d93381768e95eec04a886ac53df838.tar.gz manifold-garden-archipelago-6494004f64d93381768e95eec04a886ac53df838.tar.bz2 manifold-garden-archipelago-6494004f64d93381768e95eec04a886ac53df838.zip | |
Created basic notifications
They don't look great yet but hey we can see items being sent out or received in game now!
Diffstat (limited to 'Plugin.cs')
| -rw-r--r-- | Plugin.cs | 13 |
1 files changed, 13 insertions, 0 deletions
| diff --git a/Plugin.cs b/Plugin.cs index df53e96..a9fb284 100644 --- a/Plugin.cs +++ b/Plugin.cs | |||
| @@ -12,6 +12,7 @@ namespace ManifoldGardenArchipelago | |||
| 12 | 12 | ||
| 13 | public static ArchipelagoManager archipelagoManager = new(); | 13 | public static ArchipelagoManager archipelagoManager = new(); |
| 14 | public static SlotSave slotSave = new(); | 14 | public static SlotSave slotSave = new(); |
| 15 | public static NotificationManager notificationManager = null; | ||
| 15 | 16 | ||
| 16 | private void Awake() | 17 | private void Awake() |
| 17 | { | 18 | { |
| @@ -26,6 +27,18 @@ namespace ManifoldGardenArchipelago | |||
| 26 | } | 27 | } |
| 27 | } | 28 | } |
| 28 | 29 | ||
| 30 | [HarmonyPatch(typeof(GameManager), nameof(GameManager.AttachUI))] | ||
| 31 | static class UIManagerAwakePatch | ||
| 32 | { | ||
| 33 | static void Postfix() | ||
| 34 | { | ||
| 35 | if (Plugin.notificationManager == null) | ||
| 36 | { | ||
| 37 | Plugin.notificationManager = NotificationManager.InitializeNotifications(GameManager.UI); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } | ||
| 41 | |||
| 29 | [HarmonyPatch(typeof(GameManager), "Update")] | 42 | [HarmonyPatch(typeof(GameManager), "Update")] |
| 30 | static class GameManagerUpdatePatch | 43 | static class GameManagerUpdatePatch |
| 31 | { | 44 | { |
