Events all over melee (#16997)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Weapons.Melee.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedMeleeWeaponSystem))]
|
||||
public sealed class BonusMeleeAttackRateComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The value added onto the attack rate of a melee weapon
|
||||
/// </summary>
|
||||
[DataField("flatModifier"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float FlatModifier;
|
||||
|
||||
/// <summary>
|
||||
/// A value that is multiplied by the attack rate of a melee weapon
|
||||
/// </summary>
|
||||
[DataField("multiplier"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float Multiplier = 1;
|
||||
|
||||
/// <summary>
|
||||
/// A value that is added on to a weapon's heavy windup time.
|
||||
/// </summary>
|
||||
[DataField("heavyWindupFlatModifier"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float HeavyWindupFlatModifier;
|
||||
|
||||
/// <summary>
|
||||
/// A value that is multiplied by a weapon's heavy windup time
|
||||
/// </summary>
|
||||
[DataField("heavyWindupMultiplier"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float HeavyWindupMultiplier = 1;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Weapons.Melee.Components;
|
||||
@@ -7,12 +9,30 @@ namespace Content.Shared.Weapons.Melee.Components;
|
||||
/// This is used for adding in bonus damage via <see cref="GetMeleeWeaponEvent"/>
|
||||
/// This exists only for event relays and doing entity shenanigans.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedMeleeWeaponSystem))]
|
||||
public sealed class BonusMeleeDamageComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The damage that will be applied.
|
||||
/// The damage that will be added.
|
||||
/// </summary>
|
||||
[DataField("bonusDamage", required: true)]
|
||||
public DamageSpecifier BonusDamage = default!;
|
||||
[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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user