From feeab3c7a91974bf10595912ecfd2aae2670be0d Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 27 Mar 2023 00:00:54 -0400 Subject: [PATCH] Fix bug giving Archaeologist achievement early --- NewHorizons/Patches/ShipLogPatches/ShipLogManagerPatches.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NewHorizons/Patches/ShipLogPatches/ShipLogManagerPatches.cs b/NewHorizons/Patches/ShipLogPatches/ShipLogManagerPatches.cs index 831bb888..536bf9c8 100644 --- a/NewHorizons/Patches/ShipLogPatches/ShipLogManagerPatches.cs +++ b/NewHorizons/Patches/ShipLogPatches/ShipLogManagerPatches.cs @@ -91,8 +91,12 @@ namespace NewHorizons.Patches.ShipLogPatches [HarmonyPatch(nameof(ShipLogManager.CheckForCompletionAchievement))] public static bool ShipLogManager_CheckForCompletionAchievement(ShipLogManager __instance) { + // In other star systems they won't have the base game ship log facts, so they'll instantly get the achievement. + if (Main.Instance.CurrentStarSystem != "SolarSystem") return false; + foreach (KeyValuePair keyValuePair in __instance._factDict) { + // Don't want to include modded facts, otherwise this is the same as the vanilla method if (!ShipLogHandler.IsModdedFact(keyValuePair.Key) && !keyValuePair.Value.IsRumor() && !keyValuePair.Value.IsRevealed() && !keyValuePair.Key.Equals("TH_VILLAGE_X3") && !keyValuePair.Key.Equals("GD_GABBRO_ISLAND_X1") && __instance.GetEntry(keyValuePair.Value.GetEntryID()).GetCuriosityName() != CuriosityName.InvisiblePlanet) { return false;