mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
undo that GeneralPropBuilder rename i made a while ago cuz its dumb
This commit is contained in:
parent
110fa46712
commit
d0ba74f4cd
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<QuantumSocket>();
|
||||
sockets[i]._lightSources = new Light[0]; // TODO: make this customizable?
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user