From 3cf92af3740454738cce928fb7eb8c83a01fda5a Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Mon, 21 Oct 2024 02:17:22 -0400 Subject: [PATCH 1/4] Fix painter not recognizing the vanilla flag data. --- Winch/Util/BoatUtil.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Winch/Util/BoatUtil.cs b/Winch/Util/BoatUtil.cs index 9b0d30c5..fdf5ec4b 100644 --- a/Winch/Util/BoatUtil.cs +++ b/Winch/Util/BoatUtil.cs @@ -187,6 +187,7 @@ internal static void Initialize() flagData.localizedNameKey = localizedNameKey; localizedNameKeys.Add(flagData.localizedNameKey); VanillaBoatFlagDataDict.Add(flagData.id, flagData); + VanillaBoatFlagDataDict.Add(flagData.flagItem, flagData); VanillaBoatFlagDataIndexDict.Add(index, flagData); } DialogueUtil.AddInstructions( @@ -521,6 +522,6 @@ public static BoatPaintData[] GetAllBoatPaintData() public static BoatFlagData[] GetAllBoatFlagData() { - return VanillaBoatFlagDataDict.Values.Concat(ModdedBoatFlagDataDict.Values).ToArray(); + return VanillaBoatFlagDataDict.Values.Concat(ModdedBoatFlagDataDict.Values).Distinct().ToArray(); } } From 1e55c93b1e568740278d8a9f81b8220def78bbd5 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Mon, 21 Oct 2024 03:21:49 -0400 Subject: [PATCH 2/4] Fix hooded figure grids --- Winch/Data/GridKeyExtra.cs | 16 ++++++++++++ Winch/Util/QuestUtil.cs | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/Winch/Data/GridKeyExtra.cs b/Winch/Data/GridKeyExtra.cs index 3857e2f1..3ca93742 100644 --- a/Winch/Data/GridKeyExtra.cs +++ b/Winch/Data/GridKeyExtra.cs @@ -4,4 +4,20 @@ public static class GridKeyExtra { public const GridKey UPGRADE_T1_HULL = GridKey.UPGRADE_T1_FISHING_1 - 1; + + public const GridKey HOODED_FIGURE_1A = (GridKey)4300; + public const GridKey HOODED_FIGURE_1B = (GridKey)4301; + public const GridKey HOODED_FIGURE_1C = (GridKey)4302; + public const GridKey HOODED_FIGURE_2A = (GridKey)4303; + public const GridKey HOODED_FIGURE_2B = (GridKey)4304; + public const GridKey HOODED_FIGURE_2C = (GridKey)4305; + public const GridKey HOODED_FIGURE_3A = (GridKey)4306; + public const GridKey HOODED_FIGURE_3B = (GridKey)4307; + public const GridKey HOODED_FIGURE_3C = (GridKey)4308; + public const GridKey HOODED_FIGURE_4A = (GridKey)4309; + public const GridKey HOODED_FIGURE_4B = (GridKey)4310; + public const GridKey HOODED_FIGURE_4C = (GridKey)4311; + public const GridKey HOODED_FIGURE_5A = (GridKey)4312; + public const GridKey HOODED_FIGURE_5B = (GridKey)4313; + public const GridKey HOODED_FIGURE_5C = (GridKey)4314; } \ No newline at end of file diff --git a/Winch/Util/QuestUtil.cs b/Winch/Util/QuestUtil.cs index ca0fc7f9..ec6fedcd 100644 --- a/Winch/Util/QuestUtil.cs +++ b/Winch/Util/QuestUtil.cs @@ -39,6 +39,56 @@ private static bool PopulateQuestGridConfigFromMetaWithConverter(DeferredQuestGr internal static List VanillaQuestStepDataIDList = new(); internal static List VanillaQuestGridConfigIDList = new(); + internal static GridKey GetQuestGridKeyByName(string name) + { + switch (name) + { + case "HoodedFigure1A": + return GridKeyExtra.HOODED_FIGURE_1A; + case "HoodedFigure1B": + return GridKeyExtra.HOODED_FIGURE_1B; + case "HoodedFigure1C": + return GridKeyExtra.HOODED_FIGURE_1C; + case "HoodedFigure2A": + return GridKeyExtra.HOODED_FIGURE_2A; + case "HoodedFigure2B": + return GridKeyExtra.HOODED_FIGURE_2B; + case "HoodedFigure2C": + return GridKeyExtra.HOODED_FIGURE_2C; + case "HoodedFigure3A": + return GridKeyExtra.HOODED_FIGURE_3A; + case "HoodedFigure3B": + return GridKeyExtra.HOODED_FIGURE_3B; + case "HoodedFigure3C": + return GridKeyExtra.HOODED_FIGURE_3C; + case "HoodedFigure4A": + return GridKeyExtra.HOODED_FIGURE_4A; + case "HoodedFigure4B": + return GridKeyExtra.HOODED_FIGURE_4B; + case "HoodedFigure4C": + return GridKeyExtra.HOODED_FIGURE_4C; + case "HoodedFigure5A": + return GridKeyExtra.HOODED_FIGURE_5A; + case "HoodedFigure5B": + return GridKeyExtra.HOODED_FIGURE_5B; + case "HoodedFigure5C": + return GridKeyExtra.HOODED_FIGURE_5C; + default: + return GridKey.NONE; + } + } + + internal static void FixVanillaQuestGrid(QuestGridConfig questGridConfig) + { + var gridKey = GetQuestGridKeyByName(questGridConfig.name); + if (gridKey != GridKey.NONE) + { + questGridConfig.gridKey = gridKey; + GridConfigUtil.VanillaGridKeyDict.SafeAdd(gridKey, questGridConfig.gridConfiguration.name); + GameManager.Instance.GameConfigData.gridConfigs.AddOrChange(gridKey, questGridConfig.gridConfiguration); + } + } + internal static void Initialize() { Addressables.LoadAssetsAsync(AddressablesUtil.GetLocations("QuestData"), questData => @@ -52,6 +102,7 @@ internal static void Initialize() { VanillaQuestGridConfigIDList.SafeAdd(questGridConfig.name); GridConfigUtil.VanillaGridConfigIDList.SafeAdd(questGridConfig.gridConfiguration.name); + FixVanillaQuestGrid(questGridConfig); }); } From 3302455b1c236b926076dccc9df45bb53526fbf8 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Mon, 21 Oct 2024 03:41:21 -0400 Subject: [PATCH 3/4] add in the other missing grids --- Winch/Data/GridKeyExtra.cs | 11 +++++++++++ Winch/Util/QuestUtil.cs | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Winch/Data/GridKeyExtra.cs b/Winch/Data/GridKeyExtra.cs index 3ca93742..684a43df 100644 --- a/Winch/Data/GridKeyExtra.cs +++ b/Winch/Data/GridKeyExtra.cs @@ -3,8 +3,19 @@ [EnumHolder] public static class GridKeyExtra { + public const GridKey SOLDIER_BAIT_1_OUTPUT = GridKey.SOLDIER_BAIT_3_INPUT + 1; + public const GridKey SOLDIER_BAIT_2_OUTPUT = GridKey.SOLDIER_BAIT_3_INPUT + 2; + public const GridKey SOLDIER_BAIT_3_OUTPUT = GridKey.SOLDIER_BAIT_3_INPUT + 3; + + public const GridKey DS_PYRE = GridKey.DS_STATUE_3 + 1; + public const GridKey DS_LIGHTHOUSE_RUIN_DOOR = GridKey.DS_LIGHTHOUSE_RUIN_REWARD - 1; + + public const GridKey GM_FISHMONGER_CRAB_POT = GridKey.GM_FISHMONGER_DELIVERY_1 - 1; + public const GridKey UPGRADE_T1_HULL = GridKey.UPGRADE_T1_FISHING_1 - 1; + public const GridKey DLC1_ICE_CUTTER_REWARD = GridKey.DLC1_ICE_CUTTER_MATERIALS + 1; + public const GridKey HOODED_FIGURE_1A = (GridKey)4300; public const GridKey HOODED_FIGURE_1B = (GridKey)4301; public const GridKey HOODED_FIGURE_1C = (GridKey)4302; diff --git a/Winch/Util/QuestUtil.cs b/Winch/Util/QuestUtil.cs index ec6fedcd..711dcf90 100644 --- a/Winch/Util/QuestUtil.cs +++ b/Winch/Util/QuestUtil.cs @@ -43,6 +43,20 @@ internal static GridKey GetQuestGridKeyByName(string name) { switch (name) { + case "DSPyre": + return GridKeyExtra.DS_PYRE; + case "LighthouseRuinDoor": + return GridKeyExtra.DS_LIGHTHOUSE_RUIN_DOOR; + case "SoldierInspectTrap1": + return GridKeyExtra.SOLDIER_BAIT_1_OUTPUT; + case "SoldierInspectTrap2": + return GridKeyExtra.SOLDIER_BAIT_2_OUTPUT; + case "SoldierInspectTrap3": + return GridKeyExtra.SOLDIER_BAIT_3_OUTPUT; + case "Fishmonger_CrabPot": + return GridKeyExtra.GM_FISHMONGER_CRAB_POT; + case "DLC1_IceCutterReward": + return GridKeyExtra.DLC1_ICE_CUTTER_REWARD; case "HoodedFigure1A": return GridKeyExtra.HOODED_FIGURE_1A; case "HoodedFigure1B": From 4aaa0b576431ca57036a633ae4e17ab1e3598b0c Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Mon, 21 Oct 2024 03:56:31 -0400 Subject: [PATCH 4/4] Bump version --- Winch/mod_meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winch/mod_meta.json b/Winch/mod_meta.json index 6d4f61a8..cd58fd24 100644 --- a/Winch/mod_meta.json +++ b/Winch/mod_meta.json @@ -2,5 +2,5 @@ "Name": "Winch", "Author": "Hacktix", "ModGUID": "hacktix.winch", - "Version": "0.5.2" + "Version": "0.5.3" }