Clothing/item ECS & cleanup (#9706)

This commit is contained in:
Kara
2022-07-27 03:53:47 -07:00
committed by GitHub
parent 0f0420eca9
commit 258ec0cac1
164 changed files with 938 additions and 918 deletions

View File

@@ -2,6 +2,7 @@
using Content.Server.Clothing.Components;
using Content.Server.Inventory;
using Content.Shared.Inventory;
using Content.Shared.Item;
using NUnit.Framework;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
@@ -35,8 +36,8 @@ namespace Content.IntegrationTests.Tests
entMgr.AddComponent<ContainerManagerComponent>(container);
var child = entMgr.SpawnEntity(null, MapCoordinates.Nullspace);
var item = entMgr.AddComponent<ItemComponent>(child);
item.SlotFlags = SlotFlags.HEAD;
var item = entMgr.AddComponent<ClothingComponent>(child);
item.Slots = SlotFlags.HEAD;
// Equip item.
Assert.That(invSystem.TryEquip(container, child, "head"), Is.True);

View File

@@ -26,7 +26,8 @@ namespace Content.IntegrationTests.Tests
id: UniformDummy
components:
- type: Clothing
Slots: [innerclothing]
slots: [innerclothing]
- type: Item
size: 5
- type: entity
@@ -34,8 +35,9 @@ namespace Content.IntegrationTests.Tests
id: IDCardDummy
components:
- type: Clothing
Slots:
slots:
- idcard
- type: Item
size: 5
- type: IdCard

View File

@@ -5,6 +5,7 @@ using Content.Server.Interaction;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Weapons.Melee;
using NUnit.Framework;
using Robust.Shared.Containers;
@@ -13,7 +14,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Reflection;
using ItemComponent = Content.Server.Clothing.Components.ItemComponent;
namespace Content.IntegrationTests.Tests.Interaction.Click
{

View File

@@ -28,7 +28,7 @@ namespace Content.IntegrationTests.Tests
id: InventoryJumpsuitJanitorDummy
components:
- type: Clothing
Slots: [innerclothing]
slots: [innerclothing]
- type: entity
name: InventoryIDCardDummy
@@ -36,7 +36,7 @@ namespace Content.IntegrationTests.Tests
components:
- type: Clothing
QuickEquip: false
Slots:
slots:
- idcard
- type: PDA
";