using Content.Shared.Damage;
using Content.Shared.Inventory;
using Robust.Shared.GameStates;
using Robust.Shared.Utility;
namespace Content.Shared.Armor;
///
/// Used for clothing that reduces damage when worn.
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedArmorSystem))]
public sealed partial class ArmorComponent : Component
{
///
/// The damage reduction
///
[DataField(required: true)]
public DamageModifierSet Modifiers = default!;
///
/// A multiplier applied to the calculated point value
/// to determine the monetary value of the armor
///
[DataField]
public float PriceMultiplier = 1;
///
/// If true, you can examine the armor to see the protection. If false, the verb won't appear.
///
[DataField]
public bool ShowArmorOnExamine = true;
}
///
/// Event raised on an armor entity to get additional examine text relating to its armor.
///
///
[ByRefEvent]
public record struct ArmorExamineEvent(FormattedMessage Msg);
///
/// A Relayed inventory event, gets the total Armor for all Inventory slots defined by the Slotflags in TargetSlots
///
public sealed class CoefficientQueryEvent : EntityEventArgs, IInventoryRelayEvent
{
///
/// All slots to relay to
///
public SlotFlags TargetSlots { get; set; }
///
/// The Total of all Coefficients.
///
public DamageModifierSet DamageModifiers { get; set; } = new DamageModifierSet();
public CoefficientQueryEvent(SlotFlags slots)
{
TargetSlots = slots;
}
}