mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
19 lines
510 B
C#
19 lines
510 B
C#
using Content.Shared.Damage;
|
|
|
|
|
|
// Damages the held item by a set amount when it hits someone. Can be used to make melee items limited-use.
|
|
namespace Content.Server.Damage.Components;
|
|
|
|
[RegisterComponent]
|
|
public sealed class DamageOnHitComponent : Component
|
|
{
|
|
[DataField("ignoreResistances")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public bool IgnoreResistances = true;
|
|
|
|
[DataField("damage", required: true)]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public DamageSpecifier Damage = default!;
|
|
}
|
|
|