Misc content xform changes (#12166)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
namespace Content.Shared.Transform
|
||||
{
|
||||
public static class TransformExtensions
|
||||
{
|
||||
public static void AttachToGrandparent(this TransformComponent transform)
|
||||
{
|
||||
var grandParent = transform.Parent?.Parent;
|
||||
|
||||
if (grandParent == null)
|
||||
{
|
||||
transform.AttachToGridOrMap();
|
||||
return;
|
||||
}
|
||||
|
||||
transform.AttachParent(grandParent);
|
||||
}
|
||||
|
||||
public static void AttachToGrandparent(this EntityUid entity)
|
||||
{
|
||||
AttachToGrandparent(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user