using NewHorizons.External.SerializableData;
using Newtonsoft.Json;
using System;
using System.ComponentModel;
namespace NewHorizons.External.Modules.Props
{
[JsonObject]
public class DetailInfo : GeneralPropInfo
{
public DetailInfo() { }
public DetailInfo(GeneralPointPropInfo info)
{
JsonConvert.PopulateObject(JsonConvert.SerializeObject(info), this);
}
///
/// 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;
///
/// Set to true if this object's lighting should ignore the effects of sunlight
///
public bool ignoreSun;
[Obsolete("alignToNormal is deprecated. Use alignRadial instead")] public bool alignToNormal;
}
}