diff --git a/NewHorizons/Builder/Props/NomaiTextBuilder.cs b/NewHorizons/Builder/Props/NomaiTextBuilder.cs index 59936520..a7624f00 100644 --- a/NewHorizons/Builder/Props/NomaiTextBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiTextBuilder.cs @@ -110,6 +110,11 @@ namespace NewHorizons.Builder.Props { var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath).gameObject; + if (!string.IsNullOrEmpty(info.rename)) + { + nomaiWallTextObj.name = info.rename; + } + nomaiWallTextObj.transform.parent = sector?.transform ?? planetGO.transform; if (!string.IsNullOrEmpty(info.parentPath)) @@ -141,6 +146,11 @@ namespace NewHorizons.Builder.Props { var customScroll = _scrollPrefab.InstantiateInactive(); + if (!string.IsNullOrEmpty(info.rename)) + { + customScroll.name = info.rename; + } + var nomaiWallText = MakeWallText(planetGO, sector, info, xmlPath); nomaiWallText.transform.parent = customScroll.transform; nomaiWallText.transform.localPosition = Vector3.zero; @@ -204,6 +214,11 @@ namespace NewHorizons.Builder.Props { var computerObject = _computerPrefab.InstantiateInactive(); + if (!string.IsNullOrEmpty(info.rename)) + { + computerObject.name = info.rename; + } + computerObject.transform.parent = sector?.transform ?? planetGO.transform; if (!string.IsNullOrEmpty(info.parentPath)) @@ -238,6 +253,11 @@ namespace NewHorizons.Builder.Props var computerObject = DetailBuilder.MakeDetail(planetGO, sector, _preCrashComputerPrefab, info.position, Vector3.zero, 1, false); computerObject.SetActive(false); + if (!string.IsNullOrEmpty(info.rename)) + { + computerObject.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { computerObject.transform.SetParent(planetGO.transform.Find(info.parentPath), true); @@ -278,6 +298,11 @@ namespace NewHorizons.Builder.Props { var cairnObject = _cairnPrefab.InstantiateInactive(); + if (!string.IsNullOrEmpty(info.rename)) + { + cairnObject.name = info.rename; + } + cairnObject.transform.parent = sector?.transform ?? planetGO.transform; if (!string.IsNullOrEmpty(info.parentPath)) @@ -331,6 +356,11 @@ namespace NewHorizons.Builder.Props { var recorderObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab).InstantiateInactive(); + if (!string.IsNullOrEmpty(info.rename)) + { + recorderObject.name = info.rename; + } + recorderObject.transform.parent = sector?.transform ?? planetGO.transform; if (!string.IsNullOrEmpty(info.parentPath)) diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index d9c09fe1..c9b56fd9 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -517,6 +517,12 @@ namespace NewHorizons.External.Modules /// The relative path from the planet to the parent of this object. Optional (will default to the root sector). /// public string parentPath; + + /// + /// An optional rename of this object + /// + public string rename; + } [JsonObject]