using Content.Shared.Mining; using Content.Shared.Random; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Mining.Components; /// /// Defines an entity that will drop a random ore after being destroyed. /// [RegisterComponent] public sealed class OreVeinComponent : Component { /// /// How often an entity will be seeded with ore. Note: the amount of ore /// that is dropped is dependent on the ore prototype. /// [DataField("oreChance")] public float OreChance = 0.1f; /// /// The weighted random prototype used for determining what ore will be dropped. /// [DataField("oreRarityPrototypeId", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? OreRarityPrototypeId; /// /// The ore that this entity holds. /// If set in the prototype, it will not be overriden. /// [DataField("currentOre", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)] public string? CurrentOre; }