diff --git a/Content.Client/GameObjects/Components/Clothing/ClothingComponent.cs b/Content.Client/GameObjects/Components/Clothing/ClothingComponent.cs index a7996eb8dd..0a06ab4203 100644 --- a/Content.Client/GameObjects/Components/Clothing/ClothingComponent.cs +++ b/Content.Client/GameObjects/Components/Clothing/ClothingComponent.cs @@ -10,6 +10,7 @@ namespace Content.Client.GameObjects.Components.Clothing { [RegisterComponent] [ComponentReference(typeof(ItemComponent))] + [ComponentReference(typeof(IItemComponent))] public class ClothingComponent : ItemComponent { private FemaleClothingMask _femaleMask; diff --git a/Content.Client/GameObjects/Components/Items/ItemComponent.cs b/Content.Client/GameObjects/Components/Items/ItemComponent.cs index b3efb0fa16..54f798df07 100644 --- a/Content.Client/GameObjects/Components/Items/ItemComponent.cs +++ b/Content.Client/GameObjects/Components/Items/ItemComponent.cs @@ -17,7 +17,8 @@ using Robust.Shared.ViewVariables; namespace Content.Client.GameObjects { [RegisterComponent] - public class ItemComponent : Component + [ComponentReference(typeof(IItemComponent))] + public class ItemComponent : Component, IItemComponent { public override string Name => "Item"; public override uint? NetID => ContentNetIDs.ITEM; diff --git a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs index 6bf0ae5822..5d0903eb6c 100644 --- a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs @@ -18,6 +18,7 @@ namespace Content.Server.GameObjects [RegisterComponent] [ComponentReference(typeof(ItemComponent))] [ComponentReference(typeof(StoreableComponent))] + [ComponentReference(typeof(IItemComponent))] public class ClothingComponent : ItemComponent, IUse { #pragma warning disable 649 diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index d999794391..6466f40237 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -25,7 +25,8 @@ namespace Content.Server.GameObjects { [RegisterComponent] [ComponentReference(typeof(StoreableComponent))] - public class ItemComponent : StoreableComponent, IInteractHand, IExAct, IEquipped, IUnequipped + [ComponentReference(typeof(IItemComponent))] + public class ItemComponent : StoreableComponent, IInteractHand, IExAct, IEquipped, IUnequipped, IItemComponent { public override string Name => "Item"; public override uint? NetID => ContentNetIDs.ITEM; diff --git a/Content.Shared/GameObjects/Components/Items/IItemComponent.cs b/Content.Shared/GameObjects/Components/Items/IItemComponent.cs new file mode 100644 index 0000000000..e39d45541c --- /dev/null +++ b/Content.Shared/GameObjects/Components/Items/IItemComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.Interfaces.GameObjects; + +namespace Content.Shared.GameObjects.Components.Items +{ + public interface IItemComponent : IComponent + { + + } +} diff --git a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs index 29b65486a1..a9c6dfaa5c 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs @@ -1,5 +1,6 @@ #nullable enable using System.Diagnostics.CodeAnalysis; +using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.Physics; using Robust.Shared.Configuration; @@ -129,7 +130,7 @@ namespace Content.Shared.GameObjects.EntitySystems // TODO: Item check. var touching = ((collider.CollisionMask & otherCollider.CollisionLayer) != 0x0 || (otherCollider.CollisionMask & collider.CollisionLayer) != 0x0) // Ensure collision - && true; // !entity.HasComponent(); // This can't be an item + && !entity.HasComponent(); // This can't be an item if (touching) {