mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add rename option to volumes (#355)
This commit is contained in:
commit
8ce864812e
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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).
|
||||
/// </summary>
|
||||
public string parentPath;
|
||||
|
||||
/// <summary>
|
||||
/// An optional rename of this volume.
|
||||
/// </summary>
|
||||
public string rename;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
|
||||
@ -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)",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user