using NewHorizons.External.Modules.Props.Item; 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. /// If empty, will make an empty game object. This can be useful for adding other props to it as its children. /// 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 (visible and collideable) even if you're outside the sector (good for very large props)? /// Also makes this detail visible on the map. /// Keeping many props loaded is bad for performance so use this only when it's actually relevant /// Most logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided. /// 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; /// /// If true, this detail will stay still until it touches something. /// Good for zero-g props. /// [DefaultValue(false)] public bool physicsSuspendUntilImpact = false; /// /// Set to true if this object's lighting should ignore the effects of sunlight /// public bool ignoreSun; /// /// Activates this game object when the dialogue condition is met /// public string activationCondition; /// /// Deactivates this game object when the dialogue condition is met /// public string deactivationCondition; /// /// Should the player close their eyes while the activation state changes. Only relevant if activationCondition or deactivationCondition are set. /// [DefaultValue(true)] public bool blinkWhenActiveChanged = true; /// /// Should this detail be treated as an interactible item /// public ItemInfo item; /// /// Should this detail be treated as a socket for an interactible item /// public ItemSocketInfo itemSocket; [Obsolete("alignToNormal is deprecated. Use alignRadial instead")] public bool alignToNormal; } }