ECS AsteroidRock and add a doafter to mining (#6120)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,18 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Mining.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[RegisterComponent, ComponentProtoName("Pickaxe")]
|
||||
public class PickaxeComponent : Component
|
||||
{
|
||||
public override string Name => "Pickaxe";
|
||||
|
||||
[DataField("miningSound")]
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier MiningSound { get; set; } = new SoundPathSpecifier("/Audio/Items/Mining/pickaxe.ogg");
|
||||
|
||||
[DataField("miningSpeedMultiplier")]
|
||||
public float MiningSpeedMultiplier { get; set; } = 1f;
|
||||
[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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user