using NewHorizons.External.SerializableData; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace NewHorizons.External.Modules.Props.Item { [JsonObject] public class ItemInfo { /// /// The name of the item to be displayed in the UI. Defaults to the name of the detail object. /// public string name; /// /// The type of the item, which determines its orientation when held and what sockets it fits into. This can be a custom string, or a vanilla ItemType (Scroll, WarpCore, SharedStone, ConversationStone, Lantern, SlideReel, DreamLantern, or VisionTorch). Defaults to the item name. /// public string itemType; /// /// The furthest distance where the player can interact with this item. Defaults to two meters, same as most vanilla items. Set this to zero to disable all interaction by default. /// [DefaultValue(2f)] public float interactRange = 2f; /// /// The radius that the added sphere collider will use for collision and hover detection. /// If there's already a collider on the detail, you can make this 0. /// [DefaultValue(0.5f)] public float colliderRadius = 0.5f; /// /// Whether the added sphere collider will be a trigger (interactible but does not collide). Defaults to true. /// [DefaultValue(true)] public bool colliderIsTrigger = true; /// /// Whether the item can be dropped. Defaults to true. /// [DefaultValue(true)] public bool droppable = true; /// /// A relative offset to apply to the item's position when dropping it on the ground. /// public MVector3 dropOffset; /// /// The direction the item will be oriented when dropping it on the ground. Defaults to up (0, 1, 0). /// public MVector3 dropNormal; /// /// A relative offset to apply to the item's position when holding it. The initial position varies for vanilla item types. /// public MVector3 holdOffset; /// /// A relative offset to apply to the item's rotation when holding it. /// public MVector3 holdRotation; /// /// A relative offset to apply to the item's position when placing it into a socket. /// public MVector3 socketOffset; /// /// A relative offset to apply to the item's rotation when placing it into a socket. /// public MVector3 socketRotation; /// /// The audio to play when this item is picked up. Only applies to custom/non-vanilla item types. /// Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. /// Defaults to "ToolItemWarpCorePickUp". Set to "None" to disable the sound entirely. /// public string pickupAudio; /// /// The audio to play when this item is dropped. Only applies to custom/non-vanilla item types. /// Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. /// Defaults to "ToolItemWarpCoreDrop". Set to "None" to disable the sound entirely. /// public string dropAudio; /// /// The audio to play when this item is inserted into a socket. Only applies to custom/non-vanilla item types. /// Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. /// Defaults to the pickup audio. Set to "None" to disable the sound entirely. /// public string socketAudio; /// /// The audio to play when this item is removed from a socket. Only applies to custom/non-vanilla item types. /// Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. /// Defaults to the drop audio. Set to "None" to disable the sound entirely. /// public string unsocketAudio; /// /// A dialogue condition to set when picking up this item. /// public string pickupCondition; /// /// Whether the pickup condition should be cleared when dropping the item. Defaults to true. /// [DefaultValue(true)] public bool clearPickupConditionOnDrop = true; /// /// A ship log fact to reveal when picking up this item. /// public string pickupFact; /// /// A relative path from the planet to a socket that this item will be automatically inserted into. /// public string pathToInitialSocket; } }