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:
@@ -6,6 +6,7 @@ using Content.Server.Cloning;
|
||||
using Content.Server.Drone.Components;
|
||||
using Content.Server.Emoting.Systems;
|
||||
using Content.Server.Speech.EntitySystems;
|
||||
using Content.Shared._White.Blocking;
|
||||
using Content.Shared.Bed.Sleep;
|
||||
using Content.Shared.Cloning;
|
||||
using Content.Shared.Damage;
|
||||
@@ -56,7 +57,8 @@ namespace Content.Server.Zombies
|
||||
SubscribeLocalEvent<ZombieComponent, EmoteEvent>(OnEmote, before:
|
||||
new[] { typeof(VocalSystem), typeof(BodyEmotesSystem) });
|
||||
|
||||
SubscribeLocalEvent<ZombieComponent, MeleeHitEvent>(OnMeleeHit);
|
||||
SubscribeLocalEvent<ZombieComponent, MeleeHitEvent>(OnMeleeHit,
|
||||
after: new[] {typeof(MeleeBlockSystem)}); // WD EDIT
|
||||
SubscribeLocalEvent<ZombieComponent, MobStateChangedEvent>(OnMobState);
|
||||
SubscribeLocalEvent<ZombieComponent, CloningEvent>(OnZombieCloning);
|
||||
SubscribeLocalEvent<ZombieComponent, TryingToSleepEvent>(OnSleepAttempt);
|
||||
@@ -207,6 +209,9 @@ namespace Content.Server.Zombies
|
||||
|
||||
private void OnMeleeHit(EntityUid uid, ZombieComponent component, MeleeHitEvent args)
|
||||
{
|
||||
if (args.Handled) // WD EDIT
|
||||
return;
|
||||
|
||||
if (!TryComp<ZombieComponent>(args.User, out _))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user