Moved vessel hasPhysics field to a better location

This commit is contained in:
Joshua Thome 2023-03-18 11:50:55 -05:00
parent 831c0e7136
commit b3d7836923
2 changed files with 6 additions and 5 deletions

View File

@ -191,6 +191,11 @@ namespace NewHorizons.External.Configs
/// </summary>
public string promptFact;
/// <summary>
/// Whether the vessel should have physics enabled. This must be set to false for the vessel to stay attached to a parent body.
/// </summary>
[DefaultValue(true)] public bool hasPhysics = true;
/// <summary>
/// The location that the vessel will warp to.
/// </summary>
@ -209,10 +214,6 @@ namespace NewHorizons.External.Configs
[JsonObject]
public class VesselInfo : GeneralSolarSystemPropInfo
{
/// <summary>
/// Whether the vessel should have physics enabled. This must be set to false for the vessel to stay attached to a parent body.
/// </summary>
[DefaultValue(true)] public bool hasPhysics = true;
}
[JsonObject]

View File

@ -89,7 +89,7 @@ namespace NewHorizons.Handlers
VesselObject = vesselObject;
var vesselAO = vesselObject.AddComponent<EyeAstroObject>();
if (system.Config.Vessel?.vesselSpawn.hasPhysics ?? true)
if (system.Config.Vessel?.hasPhysics ?? true)
{
vesselAO._owRigidbody = vesselObject.GetComponent<OWRigidbody>();
vesselObject.transform.parent = null;