From d0ba74f4cd59a0dad5b3e1e7795e61621f2d115a Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 3 Sep 2023 15:30:23 -0700 Subject: [PATCH] undo that GeneralPropBuilder rename i made a while ago cuz its dumb --- NewHorizons/Builder/Props/GeneralPropBuilder.cs | 12 ++++++------ NewHorizons/Builder/Props/QuantumBuilder.cs | 2 +- NewHorizons/Handlers/VesselWarpHandler.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NewHorizons/Builder/Props/GeneralPropBuilder.cs b/NewHorizons/Builder/Props/GeneralPropBuilder.cs index 70c164c2..9b709bae 100644 --- a/NewHorizons/Builder/Props/GeneralPropBuilder.cs +++ b/NewHorizons/Builder/Props/GeneralPropBuilder.cs @@ -11,11 +11,11 @@ namespace NewHorizons.Builder.Props { public static GameObject MakeFromExisting(GameObject go, GameObject planetGO, Sector sector, GeneralPointPropInfo info, - MVector3 defaultPosition = null, string defaultParentPath = null, Transform parentOverride = null) + MVector3 defaultPosition = null, string defaultParentPath = null, Transform defaultParent = null) { if (info == null) return go; - go.transform.parent = parentOverride ?? sector?.transform ?? planetGO?.transform; + go.transform.parent = defaultParent ?? sector?.transform ?? planetGO?.transform; if (info is GeneralSolarSystemPropInfo solarSystemInfo && !string.IsNullOrEmpty(solarSystemInfo.parentBody)) { @@ -87,20 +87,20 @@ namespace NewHorizons.Builder.Props public static GameObject MakeNew(string defaultName, GameObject planetGO, Sector sector, GeneralPointPropInfo info, - MVector3 defaultPosition = null, string defaultParentPath = null, Transform parentOverride = null) + MVector3 defaultPosition = null, string defaultParentPath = null, Transform defaultParent = null) { var go = new GameObject(defaultName); go.SetActive(false); - return MakeFromExisting(go, planetGO, sector, info, defaultPosition, defaultParentPath, parentOverride); + return MakeFromExisting(go, planetGO, sector, info, defaultPosition, defaultParentPath, defaultParent); } public static GameObject MakeFromPrefab(GameObject prefab, string defaultName, GameObject planetGO, Sector sector, GeneralPointPropInfo info, - MVector3 defaultPosition = null, string defaultParentPath = null, Transform parentOverride = null) + MVector3 defaultPosition = null, string defaultParentPath = null, Transform defaultParent = null) { var go = prefab.InstantiateInactive(); go.name = defaultName; - return MakeFromExisting(go, planetGO, sector, info, defaultPosition, defaultParentPath, parentOverride); + return MakeFromExisting(go, planetGO, sector, info, defaultPosition, defaultParentPath, defaultParent); } } } diff --git a/NewHorizons/Builder/Props/QuantumBuilder.cs b/NewHorizons/Builder/Props/QuantumBuilder.cs index 60459ef6..33c7e44e 100644 --- a/NewHorizons/Builder/Props/QuantumBuilder.cs +++ b/NewHorizons/Builder/Props/QuantumBuilder.cs @@ -46,7 +46,7 @@ namespace NewHorizons.Builder.Props { var socketInfo = quantumGroup.sockets[i]; - var socket = GeneralPropBuilder.MakeNew("Socket " + i, go, sector, socketInfo, parentOverride: groupRoot.transform); + var socket = GeneralPropBuilder.MakeNew("Socket " + i, go, sector, socketInfo, defaultParent: groupRoot.transform); sockets[i] = socket.AddComponent(); sockets[i]._lightSources = new Light[0]; // TODO: make this customizable? diff --git a/NewHorizons/Handlers/VesselWarpHandler.cs b/NewHorizons/Handlers/VesselWarpHandler.cs index 07277776..12859c3a 100644 --- a/NewHorizons/Handlers/VesselWarpHandler.cs +++ b/NewHorizons/Handlers/VesselWarpHandler.cs @@ -169,7 +169,7 @@ namespace NewHorizons.Handlers var attachWarpExitToVessel = system.Config.Vessel?.warpExit?.attachToVessel ?? false; var warpExitParent = vesselWarpController._targetWarpPlatform.transform.parent; - var warpExit = GeneralPropBuilder.MakeFromExisting(vesselWarpController._targetWarpPlatform.gameObject, planetGO, null, system.Config.Vessel?.warpExit, parentOverride: attachWarpExitToVessel ? warpExitParent : null); + var warpExit = GeneralPropBuilder.MakeFromExisting(vesselWarpController._targetWarpPlatform.gameObject, planetGO, null, system.Config.Vessel?.warpExit, defaultParent: attachWarpExitToVessel ? warpExitParent : null); if (attachWarpExitToVessel) { warpExit.transform.parent = warpExitParent;