GatherableSystem/Component (#8041)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
using System.Threading;
|
||||
using Content.Shared.Storage;
|
||||
|
||||
namespace Content.Server.Mining.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[Friend(typeof(MineableSystem))]
|
||||
public sealed class MineableComponent : Component
|
||||
{
|
||||
[DataField("ores")] public List<EntitySpawnEntry> Ores = new();
|
||||
public float BaseMineTime = 1.0f;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using System.Threading;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Sound;
|
||||
|
||||
namespace Content.Server.Mining.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// When interacting with an <see cref="MineableComponent"/> allows it to spawn entities.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PickaxeComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier MiningSound { get; set; } = new SoundPathSpecifier("/Audio/Items/Mining/pickaxe.ogg");
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[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>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("maxEntities")]
|
||||
public int MaxMiningEntities = 1;
|
||||
|
||||
[ViewVariables]
|
||||
public readonly Dictionary<EntityUid, CancellationTokenSource> MiningEntities = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user