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>
This commit is contained in:
23
Content.Server/Weapon/Ranged/RangedWeaponSystem.cs
Normal file
23
Content.Server/Weapon/Ranged/RangedWeaponSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user