1
0

DamageOnHitComponent.cs 518 B

123456789101112131415161718
  1. using Content.Shared.Damage;
  2. // Damages the held item by a set amount when it hits someone. Can be used to make melee items limited-use.
  3. namespace Content.Server.Damage.Components;
  4. [RegisterComponent]
  5. public sealed partial class DamageOnHitComponent : Component
  6. {
  7. [DataField("ignoreResistances")]
  8. [ViewVariables(VVAccess.ReadWrite)]
  9. public bool IgnoreResistances = true;
  10. [DataField("damage", required: true)]
  11. [ViewVariables(VVAccess.ReadWrite)]
  12. public DamageSpecifier Damage = default!;
  13. }