mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make more fields public, create cloak volume manually
This commit is contained in:
parent
5503d2aad0
commit
fbbaeb4fb6
@ -44,14 +44,21 @@ namespace NewHorizons.Builder.Body
|
|||||||
Object.Destroy(newCloak.GetComponent<PlayerCloakEntryRedirector>());
|
Object.Destroy(newCloak.GetComponent<PlayerCloakEntryRedirector>());
|
||||||
|
|
||||||
var cloakFieldController = newCloak.GetComponent<CloakFieldController>();
|
var cloakFieldController = newCloak.GetComponent<CloakFieldController>();
|
||||||
cloakFieldController._cloakScaleDist = radius * 2000 / 3000f;
|
cloakFieldController._cloakScaleDist = module.cloakScaleDist ?? (radius * 2000 / 3000f);
|
||||||
cloakFieldController._farCloakRadius = radius * 500 / 3000f;
|
cloakFieldController._farCloakRadius = module.farCloakRadius ?? (radius * 500 / 3000f);
|
||||||
cloakFieldController._innerCloakRadius = radius * 900 / 3000f;
|
cloakFieldController._innerCloakRadius = module.innerCloakRadius ?? (radius * 900 / 3000f);
|
||||||
cloakFieldController._nearCloakRadius = radius * 800 / 3000f;
|
cloakFieldController._nearCloakRadius = module.nearCloakRadius ?? (radius * 800 / 3000f);
|
||||||
|
|
||||||
cloakFieldController._referenceFrameVolume = OWRB._attachedRFVolume;
|
cloakFieldController._referenceFrameVolume = OWRB._attachedRFVolume;
|
||||||
cloakFieldController._exclusionSector = null;
|
cloakFieldController._exclusionSector = null;
|
||||||
cloakFieldController._cloakSphereVolume = (sector?.transform ?? planetGO.transform).GetComponentInChildren<OWTriggerVolume>();
|
|
||||||
|
var cloakVolumeObj = new GameObject("CloakVolume");
|
||||||
|
cloakVolumeObj.transform.parent = planetGO.transform;
|
||||||
|
cloakVolumeObj.transform.localPosition = Vector3.zero;
|
||||||
|
var cloakVolume = cloakVolumeObj.AddComponent<SphereShape>();
|
||||||
|
cloakVolume.radius = module.farCloakRadius ?? (radius * 500 / 3000f);
|
||||||
|
|
||||||
|
cloakFieldController._cloakSphereVolume = cloakVolumeObj.AddComponent<OWTriggerVolume>();
|
||||||
cloakFieldController._ringworldFadeRenderers = new OWRenderer[0];
|
cloakFieldController._ringworldFadeRenderers = new OWRenderer[0];
|
||||||
|
|
||||||
var cloakSectorController = newCloak.AddComponent<CloakSectorController>();
|
var cloakSectorController = newCloak.AddComponent<CloakSectorController>();
|
||||||
|
|||||||
17
NewHorizons/External/Modules/CloakModule.cs
vendored
17
NewHorizons/External/Modules/CloakModule.cs
vendored
@ -7,11 +7,24 @@ namespace NewHorizons.External.Modules
|
|||||||
public class CloakModule
|
public class CloakModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Radius of the cloaking field around the planet. It's a bit finicky so experiment with different values. If you
|
/// Radius of the cloaking field around the planet. For the Stranger this is 3000
|
||||||
/// don't want a cloak, leave this as 0.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float radius;
|
public float radius;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Not sure what this is. For the Stranger it is 2000. Optional (will default to be proportional to the cloak radius).
|
||||||
|
/// </summary>
|
||||||
|
public float? cloakScaleDist;
|
||||||
|
|
||||||
|
/// Not sure what this is. For the Stranger it is 900. Optional (will default to be proportional to the cloak radius).
|
||||||
|
public float? innerCloakRadius;
|
||||||
|
|
||||||
|
/// Not sure what this is. For the Stranger it is 800. Optional (will default to be proportional to the cloak radius).
|
||||||
|
public float? nearCloakRadius;
|
||||||
|
|
||||||
|
/// Not sure what this is. For the Stranger it is 500. Optional (will default to be proportional to the cloak radius).
|
||||||
|
public float? farCloakRadius;
|
||||||
|
|
||||||
[Obsolete("audioClip is deprecated, please use audio instead")]
|
[Obsolete("audioClip is deprecated, please use audio instead")]
|
||||||
public string audioClip;
|
public string audioClip;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user