Files
tbd-station-14/Content.Server/Gatherable/Components/GatheringToolComponent.cs
metalgearsloth bfbb1a689f 1 do_after for ore veins (#14083)
* Ore veins

I dislike rocks just providing generic drops and this factors into mining more.

* fixes

* descriptions

* comment

* every flipping time

* Make mining destroy rocks with 1 hit

Having to click 3 times was pretty annoying.

* a
2023-02-13 15:32:09 +00:00

38 lines
1.3 KiB
C#

using System.Threading;
using Content.Shared.Damage;
using Robust.Shared.Audio;
namespace Content.Server.Gatherable.Components
{
/// <summary>
/// When interacting with an <see cref="GatherableComponent"/> allows it to spawn entities.
/// </summary>
[RegisterComponent]
public sealed class GatheringToolComponent : Component
{
/// <summary>
/// Sound that is made once you completed gathering
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("sound")]
public SoundSpecifier GatheringSound { get; set; } = new SoundPathSpecifier("/Audio/Items/Mining/pickaxe.ogg");
/// <summary>
/// What damage should be given to objects when
/// gathered using this tool? (0 for infinite gathering)
/// </summary>
[DataField("damage", required: true)]
public DamageSpecifier Damage { get; set; } = default!;
/// <summary>
/// How many entities can this tool gather from at once?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maxEntities")]
public int MaxGatheringEntities = 1;
[ViewVariables]
public readonly Dictionary<EntityUid, CancellationTokenSource> GatheringEntities = new();
}
}