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:
Leon Friedrich
2022-01-05 17:53:08 +13:00
committed by GitHub
parent 03ad20758e
commit adbc4ee5b0
34 changed files with 781 additions and 963 deletions

View File

@@ -1,5 +1,7 @@
using Content.Shared.Actions.Components;
using Content.Shared.Actions.Components;
using Content.Shared.Hands;
using Robust.Shared.GameObjects;
using System;
namespace Content.Shared.Actions
{
@@ -16,6 +18,18 @@ namespace Content.Shared.Actions
base.Initialize();
UpdatesOutsidePrediction = true;
SubscribeLocalEvent<ItemActionsComponent, UnequippedHandEvent>(OnHandUnequipped);
SubscribeLocalEvent<ItemActionsComponent, EquippedHandEvent>(OnHandEquipped);
}
private void OnHandEquipped(EntityUid uid, ItemActionsComponent component, EquippedHandEvent args)
{
component.EquippedHand(args.User, args.Hand);
}
private void OnHandUnequipped(EntityUid uid, ItemActionsComponent component, UnequippedHandEvent args)
{
component.UnequippedHand();
}
public override void Update(float frameTime)