From 19732ff6905bf8b0fa6e796d35830e08031bb426 Mon Sep 17 00:00:00 2001 From: neomoth <69372252+neomoth@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:15:37 -0400 Subject: [PATCH] Fix compatibility issues with Webfishing+ --- NeoQOLPack/Mod.cs | 1 - NeoQOLPack/Mods/MenuPatcher.cs | 5 ++++- NeoQOLPack/mod.json | 2 +- mod.json | 6 ------ 4 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 mod.json diff --git a/NeoQOLPack/Mod.cs b/NeoQOLPack/Mod.cs index 6416539..f88d4ac 100644 --- a/NeoQOLPack/Mod.cs +++ b/NeoQOLPack/Mod.cs @@ -31,7 +31,6 @@ public Mod(IModInterface modInterface) { modInterface.RegisterScriptMod(new InventoryPactcher(this)); modInterface.RegisterScriptMod(new ItemSelectPatcher(this)); modInterface.RegisterScriptMod(new PlayerPatcher(this)); - // modInterface.RegisterScriptMod(new PlayerTitlePatcher()); modInterface.RegisterScriptMod(new ShopPatcher()); modInterface.RegisterScriptMod(new PlayerHudPatcher(this)); modInterface.RegisterScriptMod(new ShopButtonPatcher(this)); diff --git a/NeoQOLPack/Mods/MenuPatcher.cs b/NeoQOLPack/Mods/MenuPatcher.cs index 30ab5b7..aa03a42 100644 --- a/NeoQOLPack/Mods/MenuPatcher.cs +++ b/NeoQOLPack/Mods/MenuPatcher.cs @@ -68,6 +68,7 @@ public IEnumerable Modify(string path, IEnumerable tokens) if (extendsWaiter.Check(token)) { yield return token; + if (mod.modInterface.LoadedMods.Contains("WebfishingPlus")) continue; yield return new Token(TokenType.PrVar); yield return new IdentifierToken("offline_selected"); yield return new Token(TokenType.OpAssign); @@ -123,6 +124,7 @@ public IEnumerable Modify(string path, IEnumerable tokens) yield return new ConstantToken(new StringVariant(version)); yield return new Token(TokenType.ParenthesisClose); yield return new Token(TokenType.Newline, 1); + if (mod.modInterface.LoadedMods.Contains("WebfishingPlus")) continue; yield return new Token(TokenType.Dollar); yield return new ConstantToken(new StringVariant("%serv_options")); yield return new Token(TokenType.Period); @@ -139,12 +141,13 @@ public IEnumerable Modify(string path, IEnumerable tokens) else if (buttonWaiter.Check(token)) { yield return token; + if (mod.modInterface.LoadedMods.Contains("WebfishingPlus")) continue; yield return new Token(TokenType.ParenthesisOpen); } else if (disabledWaiter.Check(token)) { yield return token; - + if (mod.modInterface.LoadedMods.Contains("WebfishingPlus")) continue; yield return new Token(TokenType.ParenthesisClose); yield return new Token(TokenType.OpAnd); yield return new Token(TokenType.OpNot); diff --git a/NeoQOLPack/mod.json b/NeoQOLPack/mod.json index 9985010..b397010 100644 --- a/NeoQOLPack/mod.json +++ b/NeoQOLPack/mod.json @@ -1,6 +1,6 @@ { "name": "NeoQOLPack", - "version": "1.0.3", + "version": "1.0.4", "description": "A collection of Quality of Life patches", "author": "neomoth" } \ No newline at end of file diff --git a/mod.json b/mod.json deleted file mode 100644 index 9985010..0000000 --- a/mod.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "NeoQOLPack", - "version": "1.0.3", - "description": "A collection of Quality of Life patches", - "author": "neomoth" -} \ No newline at end of file