Files
crystall-punk-14/Content.Server/Weapon/Ranged/RangedWeaponSystem.cs
Leon Friedrich adbc4ee5b0 Partial hand ECS (#5634)
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: Paul <ritter.paul1@googlemail.com>
2022-01-05 15:53:08 +11:00

24 lines
739 B
C#

using Content.Shared.Hands;
using Robust.Shared.GameObjects;
namespace Content.Server.Weapon.Ranged
{
public sealed class RangedWeaponSysten : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ServerRangedWeaponComponent, HandSelectedEvent>(OnHandSelected);
}
private void OnHandSelected(EntityUid uid, ServerRangedWeaponComponent component, HandSelectedEvent args)
{
// Instead of dirtying on hand-select this component should probably by dirtied whenever it needs to be.
// I take no responsibility for this code. It was like this when I got here.
component.Dirty();
}
}
}