hands ECS (#7081)
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Body.Part;
|
||||
using Content.Shared.Buckle.Components;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Standing;
|
||||
using NUnit.Framework;
|
||||
@@ -251,9 +252,7 @@ namespace Content.IntegrationTests.Tests.Buckle
|
||||
{
|
||||
var akms = entityManager.SpawnEntity(ItemDummyId, coordinates);
|
||||
|
||||
// Equip items
|
||||
Assert.True(entityManager.TryGetComponent(akms, out SharedItemComponent item));
|
||||
Assert.True(hands.PutInHand(item));
|
||||
Assert.True(EntitySystem.Get<SharedHandsSystem>().TryPickupAnyHand(human, akms));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -265,9 +264,9 @@ namespace Content.IntegrationTests.Tests.Buckle
|
||||
Assert.True(buckle.Buckled);
|
||||
|
||||
// With items in all hands
|
||||
foreach (var slot in hands.HandNames)
|
||||
foreach (var hand in hands.Hands.Values)
|
||||
{
|
||||
Assert.NotNull(hands.GetItem(slot));
|
||||
Assert.NotNull(hands.ActiveHandEntity);
|
||||
}
|
||||
|
||||
var legs = body.GetPartsOfType(BodyPartType.Leg);
|
||||
@@ -287,9 +286,9 @@ namespace Content.IntegrationTests.Tests.Buckle
|
||||
Assert.True(buckle.Buckled);
|
||||
|
||||
// Now with no item in any hand
|
||||
foreach (var slot in hands.HandNames)
|
||||
foreach (var hand in hands.Hands.Values)
|
||||
{
|
||||
Assert.Null(hands.GetItem(slot));
|
||||
Assert.Null(hands.ActiveHandEntity);
|
||||
}
|
||||
|
||||
buckle.TryUnbuckle(human, true);
|
||||
|
||||
Reference in New Issue
Block a user