var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use);
var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.UseSecondary);
- if (useDown != BoundKeyState.Down && altDown != BoundKeyState.Down)
+ if (weapon.AutoAttack || useDown != BoundKeyState.Down && altDown != BoundKeyState.Down)
{
if (weapon.Attacking)
{
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool Attacking = false;
+ /// <summary>
+ /// If true, attacks will be repeated automatically without requiring the mouse button to be lifted.
+ /// </summary>
+ [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
+ public bool AutoAttack;
+
/// <summary>
/// Base damage for this weapon. Can be modified via heavy damage or other means.
/// </summary>
- type: Clothing
sprite: Clothing/Hands/Gloves/northstar.rsi
- type: MeleeWeapon
+ autoAttack: true
attackRate: 4
damage:
types:
sprite: Objects/Weapons/Melee/chainsaw.rsi
state: icon
- type: MeleeWeapon
+ autoAttack: true
+ angle: 0
wideAnimationRotation: -135
+ attackRate: 4
damage:
types:
- Slash: 5
- Blunt: 5
- Structural: 10
+ Slash: 2
+ Blunt: 2
+ Structural: 4
soundHit:
path: /Audio/Weapons/chainsaw.ogg
params:
- type: IncreaseDamageOnWield
damage:
types:
- Slash: 10
- Structural: 10
+ Slash: 4
+ Structural: 4
- type: Item
size: Normal
sprite: Objects/Weapons/Melee/chainsaw.rsi
sprite: Objects/Tools/handdrill.rsi
state: handdrill
- type: MeleeWeapon
+ autoAttack: true
+ angle: 0
wideAnimationRotation: -90
soundHit:
path: "/Audio/Items/drill_hit.ogg"