diff --git a/NewHorizons/Builder/ShipLog/RevealBuilder.cs b/NewHorizons/Builder/ShipLog/RevealBuilder.cs index 59662218..3bfcdd69 100644 --- a/NewHorizons/Builder/ShipLog/RevealBuilder.cs +++ b/NewHorizons/Builder/ShipLog/RevealBuilder.cs @@ -42,6 +42,11 @@ namespace NewHorizons.Builder.ShipLog revealTriggerVolume.SetActive(false); revealTriggerVolume.transform.parent = sector?.transform ?? planetGO.transform; + if (!string.IsNullOrEmpty(info.rename)) + { + revealTriggerVolume.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { var newParent = planetGO.transform.Find(info.parentPath); diff --git a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs index 2952f590..bbb201d8 100644 --- a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs @@ -20,6 +20,11 @@ namespace NewHorizons.Builder.Volumes go.transform.parent = sector?.transform ?? planetGO.transform; + if (!string.IsNullOrEmpty(info.rename)) + { + go.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { var newParent = planetGO.transform.Find(info.parentPath); diff --git a/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs b/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs index d52b4352..705570d5 100644 --- a/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs @@ -18,6 +18,11 @@ namespace NewHorizons.Builder.Volumes go.transform.parent = sector?.transform ?? planetGO.transform; + if (!string.IsNullOrEmpty(info.rename)) + { + go.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { var newParent = planetGO.transform.Find(info.parentPath); diff --git a/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs b/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs index 496a9ea7..13386e79 100644 --- a/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs @@ -22,6 +22,11 @@ namespace NewHorizons.Builder.Volumes go.transform.parent = sector?.transform ?? planetGO.transform; + if (!string.IsNullOrEmpty(info.rename)) + { + go.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { var newParent = planetGO.transform.Find(info.parentPath); diff --git a/NewHorizons/Builder/Volumes/VolumeBuilder.cs b/NewHorizons/Builder/Volumes/VolumeBuilder.cs index afeffd73..966c3c25 100644 --- a/NewHorizons/Builder/Volumes/VolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VolumeBuilder.cs @@ -14,6 +14,11 @@ namespace NewHorizons.Builder.Volumes go.transform.parent = sector?.transform ?? planetGO.transform; + if (!string.IsNullOrEmpty(info.rename)) + { + go.name = info.rename; + } + if (!string.IsNullOrEmpty(info.parentPath)) { var newParent = planetGO.transform.Find(info.parentPath); diff --git a/NewHorizons/External/Modules/VolumesModule.cs b/NewHorizons/External/Modules/VolumesModule.cs index a3c810a0..49bbc542 100644 --- a/NewHorizons/External/Modules/VolumesModule.cs +++ b/NewHorizons/External/Modules/VolumesModule.cs @@ -71,6 +71,11 @@ 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 volume. + /// + public string rename; } [JsonObject] diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index b1a756cd..18185e87 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -2468,6 +2468,10 @@ "type": "string", "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." }, + "rename": { + "type": "string", + "description": "An optional rename of this volume." + }, "audio": { "type": "string", "description": "The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list." @@ -2541,6 +2545,10 @@ "type": "string", "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." }, + "rename": { + "type": "string", + "description": "An optional rename of this volume." + }, "type": { "description": "The type of hazard for this volume.", "default": "general", @@ -2618,6 +2626,10 @@ "parentPath": { "type": "string", "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." + }, + "rename": { + "type": "string", + "description": "An optional rename of this volume." } } }, @@ -2638,6 +2650,10 @@ "type": "string", "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." }, + "rename": { + "type": "string", + "description": "An optional rename of this volume." + }, "target": { "description": "What the notification will show for.", "default": "all", @@ -2700,6 +2716,10 @@ "type": "string", "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." }, + "rename": { + "type": "string", + "description": "An optional rename of this volume." + }, "maxAngle": { "type": "number", "description": "The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only)",