diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 71b5a24e..cfb953ab 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -15,7 +15,7 @@ namespace NewHorizons.Builder.Props public static class DetailBuilder { private static readonly Dictionary _detailInfoToCorrespondingSpawnedGameObject = new(); - private static readonly Dictionary _fixedPrefabCache = new(); + private static readonly Dictionary<(Sector, string), (GameObject prefab, bool isItem)> _fixedPrefabCache = new(); static DetailBuilder() { @@ -82,7 +82,7 @@ namespace NewHorizons.Builder.Props bool isItem; // We save copies with all their components fixed, good if the user is placing the same detail more than once - if (detail?.path != null && _fixedPrefabCache.TryGetValue(detail.path, out var storedPrefab)) + if (detail?.path != null && _fixedPrefabCache.TryGetValue((sector, detail.path), out var storedPrefab)) { prop = storedPrefab.prefab.InstantiateInactive(); prop.name = prefab.name; @@ -114,7 +114,7 @@ namespace NewHorizons.Builder.Props if (detail.path != null) { - _fixedPrefabCache.Add(detail.path, (prop.InstantiateInactive(), isItem)); + _fixedPrefabCache.Add((sector, detail.path), (prop.InstantiateInactive(), isItem)); } } diff --git a/NewHorizons/Patches/ShipLogPatches.cs b/NewHorizons/Patches/ShipLogPatches.cs index 6f45cd2f..8fe329c1 100644 --- a/NewHorizons/Patches/ShipLogPatches.cs +++ b/NewHorizons/Patches/ShipLogPatches.cs @@ -97,7 +97,7 @@ namespace NewHorizons.Patches { foreach (KeyValuePair keyValuePair in __instance._factDict) { - if (ShipLogHandler.IsVanillaAstroID(__instance.GetEntry(keyValuePair.Value.GetEntryID()).GetAstroObjectID()) && !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) + 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; } diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 82831c0f..cfa7b760 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, clay, MegaPiggy, John, Hawkbar, Trifid, Book", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.7.0", + "version": "1.7.1", "owmlVersion": "2.7.2", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],