diff --git a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs index 4532d767ef..e8ef6ddf89 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs @@ -120,16 +120,6 @@ namespace Content.Server.GameObjects.Components serializer.DataField(this, a => a.CanWeldShut, "CanWeldShut", true); } - protected override void Shutdown() - { - base.Shutdown(); - - foreach (var entity in _contents.ContainedEntities) - { - entity.RemoveComponent(); - } - } - public virtual void Activate(ActivateEventArgs eventArgs) { ToggleOpen(eventArgs.User); @@ -224,8 +214,6 @@ namespace Content.Server.GameObjects.Components private bool AddToContents(IEntity entity) { - entity.EnsureComponent(); - var collidableComponent = Owner.GetComponent(); ICollidableComponent entityCollidableComponent; if (entity.TryGetComponent(out entityCollidableComponent)) @@ -287,11 +275,6 @@ namespace Content.Server.GameObjects.Components { entityCollidableComponent.CanCollide = true; } - - if (contained.HasComponent()) - { - contained.RemoveComponent(); - } } } } diff --git a/Content.Server/GameObjects/Components/Items/Storage/InEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/InEntityStorageComponent.cs deleted file mode 100644 index d63b8fa3b0..0000000000 --- a/Content.Server/GameObjects/Components/Items/Storage/InEntityStorageComponent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Content.Shared.GameObjects.EntitySystems; -using Robust.Shared.GameObjects; - -namespace Content.Server.GameObjects.Components.Items.Storage -{ - [RegisterComponent] - public class InEntityStorageComponent : Component, IActionBlocker - { - public override string Name => "InEntityStorage"; - - public bool CanInteract() - { - return false; - } - } -} diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 15ec860880..10fbed594a 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -13,6 +13,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.Player; +using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.Input; @@ -261,7 +262,8 @@ namespace Content.Server.GameObjects.EntitySystems.Click } } - if (!ActionBlockerSystem.CanInteract(player)) + if (!ActionBlockerSystem.CanInteract(player) || + ContainerHelpers.IsInContainer(player)) { return; }