mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Warp receiver computer fix and rename some cloned prefabs in WarpPadBuilder (#919)
## Bug fixes - Fix warp receiver computer not working
This commit is contained in:
commit
b14036c7d2
@ -28,6 +28,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
// Trifid is a Nomai ruins genius
|
// Trifid is a Nomai ruins genius
|
||||||
_platformContainerPrefab = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_SouthHemisphere/Sector_SouthPole/Sector_Observatory/Interactables_Observatory/Prefab_NOM_RemoteViewer/Structure_NOM_RemoteViewer")
|
_platformContainerPrefab = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_SouthHemisphere/Sector_SouthPole/Sector_Observatory/Interactables_Observatory/Prefab_NOM_RemoteViewer/Structure_NOM_RemoteViewer")
|
||||||
.InstantiateInactive()
|
.InstantiateInactive()
|
||||||
|
.Rename("Prefab_NOM_PlatformContainer")
|
||||||
.DontDestroyOnLoad();
|
.DontDestroyOnLoad();
|
||||||
_platformContainerPrefab.transform.localScale = new Vector3(0.85f, 3f, 0.85f);
|
_platformContainerPrefab.transform.localScale = new Vector3(0.85f, 3f, 0.85f);
|
||||||
}
|
}
|
||||||
@ -39,12 +40,12 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
_detailedReceiverPrefab = new GameObject("NomaiWarpReceiver");
|
_detailedReceiverPrefab = new GameObject("NomaiWarpReceiver");
|
||||||
|
|
||||||
var detailedReceiver = thReceiver.InstantiateInactive();
|
var detailedReceiver = thReceiver.InstantiateInactive().Rename("Prefab_NOM_WarpReceiver");
|
||||||
detailedReceiver.transform.parent = _detailedReceiverPrefab.transform;
|
detailedReceiver.transform.parent = _detailedReceiverPrefab.transform;
|
||||||
detailedReceiver.transform.localPosition = Vector3.zero;
|
detailedReceiver.transform.localPosition = Vector3.zero;
|
||||||
detailedReceiver.transform.localRotation = Quaternion.identity;
|
detailedReceiver.transform.localRotation = Quaternion.identity;
|
||||||
|
|
||||||
var lamp = thReceiverLamp.InstantiateInactive();
|
var lamp = thReceiverLamp.InstantiateInactive().Rename("Structure_NOM_WarpReceiver_Lamp");
|
||||||
lamp.transform.parent = _detailedReceiverPrefab.transform;
|
lamp.transform.parent = _detailedReceiverPrefab.transform;
|
||||||
lamp.transform.localPosition = thReceiver.transform.InverseTransformPoint(thReceiverLamp.transform.position);
|
lamp.transform.localPosition = thReceiver.transform.InverseTransformPoint(thReceiverLamp.transform.position);
|
||||||
lamp.transform.localRotation = thReceiver.transform.InverseTransformRotation(thReceiverLamp.transform.rotation);
|
lamp.transform.localRotation = thReceiver.transform.InverseTransformRotation(thReceiverLamp.transform.rotation);
|
||||||
@ -62,10 +63,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
{
|
{
|
||||||
_receiverPrefab = SearchUtilities.Find("SunStation_Body/Sector_SunStation/Sector_WarpModule/Interactables_WarpModule/Prefab_NOM_WarpReceiver")
|
_receiverPrefab = SearchUtilities.Find("SunStation_Body/Sector_SunStation/Sector_WarpModule/Interactables_WarpModule/Prefab_NOM_WarpReceiver")
|
||||||
.InstantiateInactive()
|
.InstantiateInactive()
|
||||||
|
.Rename("Prefab_NOM_WarpReceiver")
|
||||||
.DontDestroyOnLoad();
|
.DontDestroyOnLoad();
|
||||||
Object.Destroy(_receiverPrefab.GetComponentInChildren<NomaiWarpStreaming>().gameObject);
|
Object.Destroy(_receiverPrefab.GetComponentInChildren<NomaiWarpStreaming>().gameObject);
|
||||||
|
|
||||||
var structure = _platformContainerPrefab.Instantiate();
|
var structure = _platformContainerPrefab.Instantiate().Rename("Structure_NOM_PlatformContainer");
|
||||||
structure.transform.parent = _receiverPrefab.transform;
|
structure.transform.parent = _receiverPrefab.transform;
|
||||||
structure.transform.localPosition = new Vector3(0, 0.8945f, 0);
|
structure.transform.localPosition = new Vector3(0, 0.8945f, 0);
|
||||||
structure.transform.localRotation = Quaternion.identity;
|
structure.transform.localRotation = Quaternion.identity;
|
||||||
@ -76,10 +78,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
{
|
{
|
||||||
_transmitterPrefab = SearchUtilities.Find("TowerTwin_Body/Sector_TowerTwin/Sector_Tower_SS/Interactables_Tower_SS/Tower_SS_VisibleFrom_TowerTwin/Prefab_NOM_WarpTransmitter")
|
_transmitterPrefab = SearchUtilities.Find("TowerTwin_Body/Sector_TowerTwin/Sector_Tower_SS/Interactables_Tower_SS/Tower_SS_VisibleFrom_TowerTwin/Prefab_NOM_WarpTransmitter")
|
||||||
.InstantiateInactive()
|
.InstantiateInactive()
|
||||||
|
.Rename("Prefab_NOM_WarpTransmitter")
|
||||||
.DontDestroyOnLoad();
|
.DontDestroyOnLoad();
|
||||||
Object.Destroy(_transmitterPrefab.GetComponentInChildren<NomaiWarpStreaming>().gameObject);
|
Object.Destroy(_transmitterPrefab.GetComponentInChildren<NomaiWarpStreaming>().gameObject);
|
||||||
|
|
||||||
var structure = _platformContainerPrefab.Instantiate();
|
var structure = _platformContainerPrefab.Instantiate().Rename("Structure_NOM_PlatformContainer");
|
||||||
structure.transform.parent = _transmitterPrefab.transform;
|
structure.transform.parent = _transmitterPrefab.transform;
|
||||||
structure.transform.localPosition = new Vector3(0, 0.8945f, 0);
|
structure.transform.localPosition = new Vector3(0, 0.8945f, 0);
|
||||||
structure.transform.localRotation = Quaternion.identity;
|
structure.transform.localRotation = Quaternion.identity;
|
||||||
@ -157,6 +160,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
var computerLogger = computerObject.AddComponent<NomaiWarpComputerLogger>();
|
var computerLogger = computerObject.AddComponent<NomaiWarpComputerLogger>();
|
||||||
computerLogger._warpReceiver = receiver;
|
computerLogger._warpReceiver = receiver;
|
||||||
|
computerLogger.Awake(); // Redo awake because OnReceiveWarpedBody doesn't get added to otherwise
|
||||||
|
|
||||||
computerObject.SetActive(true);
|
computerObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user