2023-05-28 03:03:25 -04:00
|
|
|
|
using Content.Shared.Damage;
|
2023-06-07 16:26:45 -04:00
|
|
|
|
using Content.Shared.FixedPoint;
|
|
|
|
|
|
using Content.Shared.Weapons.Melee.Events;
|
2023-05-28 18:25:20 +10:00
|
|
|
|
using Robust.Shared.GameStates;
|
2023-05-28 03:03:25 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Weapons.Melee.Components;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// This is used for adding in bonus damage via <see cref="GetMeleeWeaponEvent"/>
|
|
|
|
|
|
/// This exists only for event relays and doing entity shenanigans.
|
|
|
|
|
|
/// </summary>
|
2023-06-07 16:26:45 -04:00
|
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedMeleeWeaponSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class BonusMeleeDamageComponent : Component
|
2023-05-28 03:03:25 -04:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2023-06-07 16:26:45 -04:00
|
|
|
|
/// The damage that will be added.
|
2023-05-28 03:03:25 -04:00
|
|
|
|
/// </summary>
|
2023-06-07 16:26:45 -04:00
|
|
|
|
[DataField("bonusDamage")]
|
|
|
|
|
|
public DamageSpecifier? BonusDamage;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A modifier set for the damage that will be dealt.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("damageModifierSet")]
|
|
|
|
|
|
public DamageModifierSet? DamageModifierSet;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A flat damage increase added to <see cref="GetHeavyDamageModifierEvent"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("heavyDamageFlatModifier"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public FixedPoint2 HeavyDamageFlatModifier;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A value multiplier by the value of <see cref="GetHeavyDamageModifierEvent"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("heavyDamageMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public float HeavyDamageMultiplier = 1;
|
2023-05-28 03:03:25 -04:00
|
|
|
|
}
|