2022-01-11 19:12:08 -07:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Content.Shared.Damage;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2019-08-21 22:50:15 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2019-08-21 22:50:15 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Mining.Components
|
2019-08-21 22:50:15 +02:00
|
|
|
{
|
2022-02-08 00:42:49 -08:00
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class PickaxeComponent : Component
|
2019-08-21 22:50:15 +02:00
|
|
|
{
|
2022-01-11 19:12:08 -07:00
|
|
|
[DataField("sound")]
|
2021-07-10 17:35:33 +02:00
|
|
|
public SoundSpecifier MiningSound { get; set; } = new SoundPathSpecifier("/Audio/Items/Mining/pickaxe.ogg");
|
|
|
|
|
|
2022-01-11 19:12:08 -07:00
|
|
|
[DataField("timeMultiplier")]
|
|
|
|
|
public float MiningTimeMultiplier { get; set; } = 1f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// What damage should be given to objects when
|
|
|
|
|
/// mined using a pickaxe?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("damage", required: true)]
|
|
|
|
|
public DamageSpecifier Damage { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many entities can this pickaxe mine at once?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("maxEntities")]
|
|
|
|
|
public int MaxMiningEntities = 1;
|
|
|
|
|
|
|
|
|
|
public HashSet<EntityUid> MiningEntities = new();
|
2019-08-21 22:50:15 +02:00
|
|
|
}
|
|
|
|
|
}
|