From a8d46ec54b450d39c6e930d6b6acdb9133a78c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bure=C5=A1?= Date: Sun, 14 Jan 2024 17:52:48 +0100 Subject: [PATCH] Fix patching multiple times --- plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json | 5 +---- src/SpaceWarp.Preload/Entrypoint.cs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json b/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json index 6f56048..14722a3 100644 --- a/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json +++ b/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json @@ -5,7 +5,7 @@ "name": "Space Warp", "description": "Space Warp is an API for KSP 2 mod developers.", "source": "https://github.com/SpaceWarpDev/SpaceWarp", - "version": "1.8.0", + "version": "1.8.1", "version_check": "https://raw.githubusercontent.com/SpaceWarpDev/SpaceWarp/main/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json", "ksp2_version": { "min": "0.2.0", @@ -19,8 +19,5 @@ "max": "*" } } - ], - "patchers": [ - "SpaceWarpPatcher.dll" ] } diff --git a/src/SpaceWarp.Preload/Entrypoint.cs b/src/SpaceWarp.Preload/Entrypoint.cs index c5c1efa..cf8dcfe 100644 --- a/src/SpaceWarp.Preload/Entrypoint.cs +++ b/src/SpaceWarp.Preload/Entrypoint.cs @@ -27,7 +27,7 @@ public static IEnumerable TargetDLLs { LogSource = Logger.CreateLogSource("SpaceWarp.Preload"); AddEnabledPatchers(); - return Patchers.SelectMany(patcher => patcher.DLLsToPatch).ToList(); + return Patchers.SelectMany(patcher => patcher.DLLsToPatch).ToHashSet(); } }