AltFireMeleeComponent.cs 629 B

12345678910111213141516171819202122
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Weapons.Melee.Components;
  3. /// <summary>
  4. /// This is used to allow ranged weapons to make melee attacks by right-clicking.
  5. /// </summary>
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedMeleeWeaponSystem))]
  7. public sealed partial class AltFireMeleeComponent : Component
  8. {
  9. [DataField, AutoNetworkedField]
  10. public AltFireAttackType AttackType = AltFireAttackType.Light;
  11. }
  12. [Flags]
  13. public enum AltFireAttackType : byte
  14. {
  15. Light = 0, // Standard single-target attack.
  16. Heavy = 1 << 0, // Wide swing.
  17. Disarm = 1 << 1
  18. }