Updated ContainerHelpers to use new extensions (#2530)
Co-authored-by: David Tan <>
This commit is contained in:
@@ -277,7 +277,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
||||
spriteComponent.RenderOrder = item.Owner.EntityManager.CurrentTick.Value;
|
||||
}
|
||||
|
||||
if (ContainerHelpers.TryGetContainer(Owner, out var container))
|
||||
if (Owner.TryGetContainer(out var container))
|
||||
{
|
||||
container.Insert(item.Owner);
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
||||
}
|
||||
|
||||
// TODO: The item should be dropped to the container our owner is in, if any.
|
||||
ContainerHelpers.AttachParentToContainerOrGrid(entity.Transform);
|
||||
entity.Transform.AttachParentToContainerOrGrid();
|
||||
|
||||
_entitySystemManager.GetEntitySystem<InteractionSystem>().UnequippedInteraction(Owner, entity, slot);
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
||||
|
||||
var itemTransform = entity.Transform;
|
||||
|
||||
ContainerHelpers.AttachParentToContainerOrGrid(itemTransform);
|
||||
itemTransform.AttachParentToContainerOrGrid();
|
||||
|
||||
_entitySystemManager.GetEntitySystem<InteractionSystem>().UnequippedInteraction(Owner, item.Owner, slot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user