using NewHorizons.Utility; using System.ComponentModel; using Newtonsoft.Json; namespace NewHorizons.External.Props { [JsonObject] public class DetailInfo : GeneralPropInfo { /// /// Do we override rotation and try to automatically align this object to stand upright on the body's surface? /// public bool alignToNormal; /// /// Relative filepath to an asset-bundle to load the prefab defined in `path` from /// public string assetBundle; /// /// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle /// public string path; /// /// A list of children to remove from this detail /// public string[] removeChildren; /// /// Do we reset all the components on this object? Useful for certain props that have dialogue components attached to /// them. /// public bool removeComponents; /// /// Scale the prop /// [DefaultValue(1f)] public float scale = 1f; /// /// Scale each axis of the prop. Overrides `scale`. /// public MVector3 stretch; /// /// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is /// public string quantumGroupID; /// /// Should this detail stay loaded even if you're outside the sector (good for very large props) /// public bool keepLoaded; /// /// Should this object dynamically move around? /// This tries to make all mesh colliders convex, as well as adding a sphere collider in case the detail has no others. /// public bool hasPhysics; /// /// The mass of the physics object. /// Most pushable props use the default value, which matches the player mass. /// [DefaultValue(0.001f)] public float physicsMass = 0.001f; /// /// The radius that the added sphere collider will use for physics collision. /// If there's already good colliders on the detail, you can make this 0. /// [DefaultValue(1f)] public float physicsRadius = 1f; } }