From cff3364a9ab7e418631e209967d9da491b203902 Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 22:37:59 +0100 Subject: [PATCH 1/6] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ed5ca0 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Beyond Abyss +DREDGE Hardcore Mode From 4081724e3a2befa44a8171b40c3f77d05fc789c8 Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:20:00 +0100 Subject: [PATCH 2/6] Make code more concise. --- BeyondAbyss/BeyondAbyss.cs | 11 --- BeyondAbyss/BeyondAbyss.csproj | 72 ++++--------------- .../Dynamic/HarvestMinigameView_Patch.cs | 23 +++--- BeyondAbyss/packages.config | 8 +-- 4 files changed, 28 insertions(+), 86 deletions(-) diff --git a/BeyondAbyss/BeyondAbyss.cs b/BeyondAbyss/BeyondAbyss.cs index 5920e52..c9de680 100644 --- a/BeyondAbyss/BeyondAbyss.cs +++ b/BeyondAbyss/BeyondAbyss.cs @@ -8,17 +8,6 @@ namespace BeyondAbyss public class BeyondAbyss { public static void Init() - { - //Winch.Core.API.DredgeEvent.ModAssetsLoaded += Patch; - WinchCore.Log.Info("Initializing BeyondAbyss..."); - - var harmony = new Harmony("com.dredge.BeyondAbyss"); - harmony.PatchAll(Assembly.GetExecutingAssembly()); - - WinchCore.Log.Info("Done :D"); - } - - public static void Patch(object sender, EventArgs e) { WinchCore.Log.Info("Initializing BeyondAbyss..."); diff --git a/BeyondAbyss/BeyondAbyss.csproj b/BeyondAbyss/BeyondAbyss.csproj index c715c7f..b54be97 100644 --- a/BeyondAbyss/BeyondAbyss.csproj +++ b/BeyondAbyss/BeyondAbyss.csproj @@ -31,48 +31,20 @@ 4 - - ..\packages\Lib.Harmony.2.3.0-alpha.5\lib\net48\0Harmony.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Assembly-CSharp.dll - - - ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.dll - - - ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Mdb.dll - - - ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Pdb.dll - - - ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Rocks.dll - - - ..\packages\MonoModReorg.Backports.23.3.22.1\lib\net452\MonoMod.Backports.dll - - - ..\packages\MonoModReorg.Core.23.3.22.1\lib\net452\MonoMod.Core.dll - - - ..\packages\MonoModReorg.Core.23.3.22.1\lib\net452\MonoMod.Iced.dll - - - ..\packages\MonoModReorg.ILHelpers.23.3.22.1\lib\net452\MonoMod.ILHelpers.dll - - - ..\packages\MonoModReorg.Utils.23.3.22.1\lib\net452\MonoMod.Utils.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Newtonsoft.Json.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Sirenix.Serialization.dll - + + C:\Program Files (x86)\Steam\steamapps\common\DREDGE\0Harmony.dll + + + C:\Program Files (x86)\Steam\steamapps\common\DREDGE\DREDGE_Data\Managed\Newtonsoft.Json.dll + + + + + + + + + @@ -81,22 +53,6 @@ - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Unity.Addressables.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Unity.ResourceManager.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\UnityEngine.dll - - - False - ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\UnityEngine.CoreModule.dll - diff --git a/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs b/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs index 58e6094..623682a 100644 --- a/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs +++ b/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs @@ -1,4 +1,5 @@ using BeyondAbyss.Singletons; +using FluffyUnderware.DevTools.Extensions; using HarmonyLib; using Newtonsoft.Json.Linq; using System; @@ -55,17 +56,17 @@ public static void RefreshHarvestTarget_Prefix() private static void PatchGameValues() { - GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[HarvestDifficulty.VERY_EASY] = ConfigManager.INSTANCE.DredgingDifficultyConfigs[HarvestDifficulty.VERY_EASY]; - GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[HarvestDifficulty.EASY] = ConfigManager.INSTANCE.DredgingDifficultyConfigs[HarvestDifficulty.EASY]; - GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[HarvestDifficulty.MEDIUM] = ConfigManager.INSTANCE.DredgingDifficultyConfigs[HarvestDifficulty.MEDIUM]; - GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[HarvestDifficulty.HARD] = ConfigManager.INSTANCE.DredgingDifficultyConfigs[HarvestDifficulty.HARD]; - GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[HarvestDifficulty.VERY_HARD] = ConfigManager.INSTANCE.DredgingDifficultyConfigs[HarvestDifficulty.VERY_HARD]; - - GameManager.Instance.GameConfigData.FishingDifficultyConfigs[HarvestDifficulty.VERY_EASY] = ConfigManager.INSTANCE.FishingDifficultyConfigs[HarvestDifficulty.VERY_EASY]; - GameManager.Instance.GameConfigData.FishingDifficultyConfigs[HarvestDifficulty.EASY] = ConfigManager.INSTANCE.FishingDifficultyConfigs[HarvestDifficulty.EASY]; - GameManager.Instance.GameConfigData.FishingDifficultyConfigs[HarvestDifficulty.MEDIUM] = ConfigManager.INSTANCE.FishingDifficultyConfigs[HarvestDifficulty.MEDIUM]; - GameManager.Instance.GameConfigData.FishingDifficultyConfigs[HarvestDifficulty.HARD] = ConfigManager.INSTANCE.FishingDifficultyConfigs[HarvestDifficulty.HARD]; - GameManager.Instance.GameConfigData.FishingDifficultyConfigs[HarvestDifficulty.VERY_HARD] = ConfigManager.INSTANCE.FishingDifficultyConfigs[HarvestDifficulty.VERY_HARD]; + Dictionary customDredgingConfig = ConfigManager.INSTANCE.DredgingDifficultyConfigs; + foreach(KeyValuePair entry in customDredgingConfig) + { + GameManager.Instance.GameConfigData.DredgingDifficultyConfigs[entry.Key] = entry.Value; + } + + Dictionary customFishingConfig = ConfigManager.INSTANCE.FishingDifficultyConfigs; + foreach (KeyValuePair entry in customFishingConfig) + { + GameManager.Instance.GameConfigData.FishingDifficultyConfigs[entry.Key] = entry.Value; + } } private static HarvestDifficultyConfigData GetModDefaultValue(bool isDredge, HarvestDifficulty difficulty, HarvestDifficultyConfigData data) diff --git a/BeyondAbyss/packages.config b/BeyondAbyss/packages.config index db193fc..8707d63 100644 --- a/BeyondAbyss/packages.config +++ b/BeyondAbyss/packages.config @@ -1,9 +1,5 @@  - - - - - - + + \ No newline at end of file From dc5f33a2acbf4ba23c0b3f5d79eea6b4f7e06a0b Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:21:48 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ed5ca0..21719f3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Beyond Abyss +# BeyondAbyss DREDGE Hardcore Mode From 0f423247d999f6a27ac2787d075e04b254cacc53 Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:23:22 +0100 Subject: [PATCH 4/6] Update BeyondAbyss.csproj --- BeyondAbyss/BeyondAbyss.csproj | 76 +++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/BeyondAbyss/BeyondAbyss.csproj b/BeyondAbyss/BeyondAbyss.csproj index b54be97..240fdd1 100644 --- a/BeyondAbyss/BeyondAbyss.csproj +++ b/BeyondAbyss/BeyondAbyss.csproj @@ -1,4 +1,4 @@ - + @@ -31,20 +31,48 @@ 4 - - C:\Program Files (x86)\Steam\steamapps\common\DREDGE\0Harmony.dll - - - C:\Program Files (x86)\Steam\steamapps\common\DREDGE\DREDGE_Data\Managed\Newtonsoft.Json.dll - - - - - - - - - + + ..\packages\Lib.Harmony.2.3.0-alpha.5\lib\net48\0Harmony.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Assembly-CSharp.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Mdb.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Pdb.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Rocks.dll + + + ..\packages\MonoModReorg.Backports.23.3.22.1\lib\net452\MonoMod.Backports.dll + + + ..\packages\MonoModReorg.Core.23.3.22.1\lib\net452\MonoMod.Core.dll + + + ..\packages\MonoModReorg.Core.23.3.22.1\lib\net452\MonoMod.Iced.dll + + + ..\packages\MonoModReorg.ILHelpers.23.3.22.1\lib\net452\MonoMod.ILHelpers.dll + + + ..\packages\MonoModReorg.Utils.23.3.22.1\lib\net452\MonoMod.Utils.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Newtonsoft.Json.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Sirenix.Serialization.dll + @@ -53,6 +81,22 @@ + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Unity.Addressables.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\Unity.ResourceManager.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\UnityEngine.dll + + + False + ..\..\..\..\..\..\GOG Games\DREDGE\DREDGE_Data\Managed\UnityEngine.CoreModule.dll + @@ -73,4 +117,4 @@ - \ No newline at end of file + From 923cbe5bd97bb9669f34b3ccd4754c83078462cf Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:25:30 +0100 Subject: [PATCH 5/6] Update packages.config --- BeyondAbyss/packages.config | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/BeyondAbyss/packages.config b/BeyondAbyss/packages.config index 8707d63..7093a38 100644 --- a/BeyondAbyss/packages.config +++ b/BeyondAbyss/packages.config @@ -1,5 +1,9 @@  - - - \ No newline at end of file + + + + + + + From 7cd3ea3f5b73ab31cad3a92e94d99c6755c15643 Mon Sep 17 00:00:00 2001 From: bdlm-dev <74147859+bdlm-dev@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:27:25 +0100 Subject: [PATCH 6/6] Remove unused reference --- BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs b/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs index 623682a..f56e143 100644 --- a/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs +++ b/BeyondAbyss/Patches/Dynamic/HarvestMinigameView_Patch.cs @@ -1,5 +1,4 @@ using BeyondAbyss.Singletons; -using FluffyUnderware.DevTools.Extensions; using HarmonyLib; using Newtonsoft.Json.Linq; using System;