Replace InEntityStorageComponent with in container check
This commit is contained in:
@@ -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<InEntityStorageComponent>();
|
||||
}
|
||||
}
|
||||
|
||||
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<InEntityStorageComponent>();
|
||||
|
||||
var collidableComponent = Owner.GetComponent<ICollidableComponent>();
|
||||
ICollidableComponent entityCollidableComponent;
|
||||
if (entity.TryGetComponent(out entityCollidableComponent))
|
||||
@@ -287,11 +275,6 @@ namespace Content.Server.GameObjects.Components
|
||||
{
|
||||
entityCollidableComponent.CanCollide = true;
|
||||
}
|
||||
|
||||
if (contained.HasComponent<InEntityStorageComponent>())
|
||||
{
|
||||
contained.RemoveComponent<InEntityStorageComponent>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user