Add pulling taking up a hand (#2405)

* Add pulling taking up a hand

* Revert unnecessary refactor
This commit is contained in:
DrSmugleaf
2020-10-28 10:16:40 +01:00
committed by GitHub
parent 10dc201704
commit f785ec4efb
8 changed files with 209 additions and 51 deletions

View File

@@ -1,13 +1,7 @@
#nullable enable
using System;
using Content.Shared.GameObjects.Components.Pulling;
using Content.Shared.Physics.Pull;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components.Items
{
@@ -24,13 +18,15 @@ namespace Content.Shared.GameObjects.Components.Items
public readonly string Name;
public readonly EntityUid? EntityUid;
public readonly HandLocation Location;
public readonly bool Enabled;
public SharedHand(int index, string name, EntityUid? entityUid, HandLocation location)
public SharedHand(int index, string name, EntityUid? entityUid, HandLocation location, bool enabled)
{
Index = index;
Name = name;
EntityUid = entityUid;
Location = location;
Enabled = enabled;
}
}
@@ -99,6 +95,28 @@ namespace Content.Shared.GameObjects.Components.Items
}
}
[Serializable, NetSerializable]
public class HandEnabledMsg : ComponentMessage
{
public string Name { get; }
public HandEnabledMsg(string name)
{
Name = name;
}
}
[Serializable, NetSerializable]
public class HandDisabledMsg : ComponentMessage
{
public string Name { get; }
public HandDisabledMsg(string name)
{
Name = name;
}
}
public enum HandLocation : byte
{
Left,