mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
31 lines
869 B
C#
31 lines
869 B
C#
using System.Numerics;
|
|
using Content.Client.Weapons.Melee;
|
|
using Content.Shared._Goobstation.Blob;
|
|
using Robust.Client.Audio;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Client._Goobstation.Blob;
|
|
|
|
public sealed class BlobCoreActionSystem : SharedBlobCoreActionSystem
|
|
{
|
|
[Dependency] private readonly MeleeWeaponSystem _meleeWeaponSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeNetworkEvent<BlobAttackEvent>(OnBlobAttack);
|
|
}
|
|
|
|
[ValidatePrototypeId<EntityPrototype>]
|
|
private const string Animation = "WeaponArcPunch";
|
|
|
|
private void OnBlobAttack(BlobAttackEvent ev)
|
|
{
|
|
if(!TryGetEntity(ev.BlobEntity, out var user))
|
|
return;
|
|
|
|
_meleeWeaponSystem.DoLunge(user.Value, user.Value, Angle.Zero, ev.Position, Animation, Angle.Zero, false); // WD EDIT
|
|
}
|
|
}
|