Better melee combat (#542)
* - add: NextMobAttack, EquipCooldown. * - fix: Some combat fixes. * - add: Telebaton. * - add: Stun baton rework. * - tweak: Reduce melee range. * - add: Rework melee block system. * - add: ExaminedEvent.
This commit is contained in:
@@ -17,6 +17,7 @@ using Content.Server.Chemistry.Containers.EntitySystems;
|
||||
using Robust.Shared.GameStates;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Content.Shared._White.Blocking;
|
||||
using Robust.Server.Audio;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems;
|
||||
@@ -32,7 +33,8 @@ public sealed class HypospraySystem : SharedHypospraySystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<HyposprayComponent, AfterInteractEvent>(OnAfterInteract);
|
||||
SubscribeLocalEvent<HyposprayComponent, MeleeHitEvent>(OnAttack);
|
||||
SubscribeLocalEvent<HyposprayComponent, MeleeHitEvent>(OnAttack,
|
||||
after: new[] {typeof(MeleeBlockSystem)}); // WD EDIT
|
||||
SubscribeLocalEvent<HyposprayComponent, UseInHandEvent>(OnUseInHand);
|
||||
}
|
||||
|
||||
@@ -68,6 +70,9 @@ public sealed class HypospraySystem : SharedHypospraySystem
|
||||
|
||||
public void OnAttack(Entity<HyposprayComponent> entity, ref MeleeHitEvent args)
|
||||
{
|
||||
if (args.Handled) // WD
|
||||
return;
|
||||
|
||||
if (!args.HitEntities.Any())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user