BonusMeleeDamageComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Content.Shared.Damage;
  2. using Content.Shared.FixedPoint;
  3. using Content.Shared.Weapons.Melee.Events;
  4. using Robust.Shared.GameStates;
  5. namespace Content.Shared.Weapons.Melee.Components;
  6. /// <summary>
  7. /// This is used for adding in bonus damage via <see cref="GetMeleeWeaponEvent"/>
  8. /// This exists only for event relays and doing entity shenanigans.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, Access(typeof(SharedMeleeWeaponSystem))]
  11. public sealed partial class BonusMeleeDamageComponent : Component
  12. {
  13. /// <summary>
  14. /// The damage that will be added.
  15. /// </summary>
  16. [DataField("bonusDamage")]
  17. public DamageSpecifier? BonusDamage;
  18. /// <summary>
  19. /// A modifier set for the damage that will be dealt.
  20. /// </summary>
  21. [DataField("damageModifierSet")]
  22. public DamageModifierSet? DamageModifierSet;
  23. /// <summary>
  24. /// A flat damage increase added to <see cref="GetHeavyDamageModifierEvent"/>
  25. /// </summary>
  26. [DataField("heavyDamageFlatModifier"), ViewVariables(VVAccess.ReadWrite)]
  27. public FixedPoint2 HeavyDamageFlatModifier;
  28. /// <summary>
  29. /// A value multiplier by the value of <see cref="GetHeavyDamageModifierEvent"/>
  30. /// </summary>
  31. [DataField("heavyDamageMultiplier"), ViewVariables(VVAccess.ReadWrite)]
  32. public float HeavyDamageMultiplier = 1;
  33. }