using Content.Shared.DoAfter;
using Content.Shared.Tools.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Tools.Components;
///
/// Component responsible for simple tool interactions.
/// Using a tool with the correct quality on an entity with this component will start a doAfter and raise events.
///
[RegisterComponent, NetworkedComponent]
[Access(typeof(SimpleToolUsageSystem))]
public sealed partial class SimpleToolUsageComponent : Component
{
///
/// Tool quality required to use a tool on this.
///
[DataField]
public ProtoId Quality = "Slicing";
///
/// The duration using a tool on this entity will take in seconds.
///
[DataField]
public float DoAfter = 5;
///
/// What verb should display to allow you to use a tool on this entity.
/// If null, no verb will be shown.
///
[DataField]
public LocId? UsageVerb;
///
/// The message to show when the verb is disabled.
///
[DataField]
public LocId BlockedMessage = "simple-tool-usage-blocked-message";
}
[ByRefEvent]
public record struct AttemptSimpleToolUseEvent(EntityUid User, bool Cancelled = false);
[Serializable, NetSerializable]
public sealed partial class SimpleToolDoAfterEvent : SimpleDoAfterEvent;