diff --git a/NewHorizons/Builder/Props/NomaiTextBuilder.cs b/NewHorizons/Builder/Props/NomaiTextBuilder.cs index 48a4732f..5cab45e2 100644 --- a/NewHorizons/Builder/Props/NomaiTextBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiTextBuilder.cs @@ -143,7 +143,7 @@ namespace NewHorizons.Builder.Props _preCrashRecorderPrefab.name = "Prefab_NOM_Recorder_Vessel"; _preCrashRecorderPrefab.transform.rotation = Quaternion.identity; - _trailmarkerPrefab = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_HangingCity/Sector_HangingCity_District2/Interactables_HangingCity_District2/Prefab_NOM_Sign"); + _trailmarkerPrefab = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_HangingCity/Sector_HangingCity_District2/Interactables_HangingCity_District2/Prefab_NOM_Sign").InstantiateInactive(); _trailmarkerPrefab.name = "Prefab_NOM_Trailmarker"; _trailmarkerPrefab.transform.rotation = Quaternion.identity; } @@ -537,6 +537,9 @@ namespace NewHorizons.Builder.Props trailmarkerObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); + // shrink because that is what mobius does on all trailmarkers or else they are the size of the player + trailmarkerObject.transform.localScale = Vector3.one * 0.75f; + if (info.rotation != null) { trailmarkerObject.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); diff --git a/NewHorizons/Patches/ShipLogPatches.cs b/NewHorizons/Patches/ShipLogPatches.cs index ba588f12..96a89c01 100644 --- a/NewHorizons/Patches/ShipLogPatches.cs +++ b/NewHorizons/Patches/ShipLogPatches.cs @@ -230,5 +230,20 @@ namespace NewHorizons.Patches AchievementHandler.OnRevealFact(); } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ShipLogFact), nameof(ShipLogFact.GetText))] + public static bool ShipLogFact_GetText(ShipLogFact __instance, ref string __result) + { + if (ShipLogHandler.IsModdedFact(__instance.GetID())) + { + __result = TranslationHandler.GetTranslation(__instance._text, TranslationHandler.TextType.SHIPLOG); + return false; + } + else + { + return true; + } + } } } \ No newline at end of file diff --git a/NewHorizons/Utility/SearchUtilities.cs b/NewHorizons/Utility/SearchUtilities.cs index 6f4d1be5..97cb4a5e 100644 --- a/NewHorizons/Utility/SearchUtilities.cs +++ b/NewHorizons/Utility/SearchUtilities.cs @@ -119,9 +119,9 @@ namespace NewHorizons.Utility var name = names.Last(); if (warn) Logger.LogWarning($"Couldn't find object in path {path}, will look for potential matches for name {name}"); - // 3: find resource to include inactive objects - // also includes prefabs but hopefully thats okay - go = FindResourceOfTypeAndName(name); + // 3: find resource to include inactive objects (but skip prefabs + go = Resources.FindObjectsOfTypeAll() + .FirstOrDefault(x => x.name == name && x.scene.name != null); if (go) { CachedGameObjects.Add(path, go);