Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)
This commit is contained in:
@@ -8,8 +8,6 @@ namespace Content.Shared.Hands.EntitySystems;
|
||||
|
||||
public abstract partial class SharedHandsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
private void InitializeDrop()
|
||||
{
|
||||
SubscribeLocalEvent<HandsComponent, EntRemovedFromContainerMessage>(HandleEntityRemoved);
|
||||
@@ -100,14 +98,12 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
if (!isInContainer
|
||||
|| !_containerSystem.TryGetContainingContainer(userXform.ParentUid, uid, out var container, skipExistCheck: true)
|
||||
|| !container.Insert(entity, EntityManager, itemXform))
|
||||
{
|
||||
_transform.AttachToGridOrMap(entity, itemXform);
|
||||
}
|
||||
itemXform.AttachToGridOrMap();
|
||||
return true;
|
||||
}
|
||||
|
||||
var target = targetDropLocation.Value.ToMap(EntityManager);
|
||||
_transform.SetWorldPosition(itemXform, GetFinalDropCoordinates(uid, userXform.MapPosition, target));
|
||||
itemXform.WorldPosition = GetFinalDropCoordinates(uid, userXform.MapPosition, target);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user