using Content.Shared.EntityList; using Content.Shared.EntityTable.EntitySelectors; using Content.Shared.Whitelist; using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Shared._CP14.Farming.Components; /// /// Means that the plant can be harvested. /// [RegisterComponent] public sealed partial class CP14PlantGatherableComponent : Component { /// /// Whitelist for specifying the kind of tools can be used on a resource /// Supports multiple tags. /// [DataField(required: true)] public EntityWhitelist ToolWhitelist = new(); /// /// YAML example below /// (Tag1, Tag2, LootTableID1, LootTableID2 are placeholders for example) /// -------------------- /// toolWhitelist: /// tags: /// - Tag1 /// - Tag2 /// loot: /// Tag1: LootTableID1 /// Tag2: LootTableID2 /// [DataField] public Dictionary? Loot = new(); /// /// Random shift of the appearing entity during gathering /// [DataField] public float GatherOffset = 0.3f; [DataField] public TimeSpan GatherDelay = TimeSpan.FromSeconds(1f); /// /// After harvesting, should the plant be completely removed? /// [DataField] public bool DeleteAfterHarvest; /// /// After harvest, the growth level of the plant will be reduced by the specified value /// [DataField] public float GrowthCostHarvest = 0.4f; /// /// What level of growth does a plant need to have before it can be harvested? /// [DataField] public float GrowthLevelToHarvest = 0.9f; /// /// Sound to play when gathering /// [DataField] public SoundSpecifier GatherSound = new SoundCollectionSpecifier("CP14GrassGathering"); }