Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Content.Server.Construction.Completions
|
||||
var transform = entityManager.GetComponent<TransformComponent>(uid);
|
||||
|
||||
if (!transform.Anchored)
|
||||
entityManager.System<SharedTransformSystem>().SetCoordinates(uid, transform, transform.Coordinates.SnapToGrid(entityManager));
|
||||
transform.Coordinates = transform.Coordinates.SnapToGrid(entityManager);
|
||||
|
||||
if (SouthRotation)
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace Content.Server.Construction
|
||||
|
||||
// Transform transferring.
|
||||
var newTransform = Transform(newUid);
|
||||
_transform.AttachToGridOrMap(newUid, newTransform); // in case in hands or a container
|
||||
newTransform.AttachToGridOrMap(); // in case in hands or a container
|
||||
newTransform.LocalRotation = transform.LocalRotation;
|
||||
newTransform.Anchored = transform.Anchored;
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace Content.Server.Construction
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
|
||||
[Dependency] private readonly StorageSystem _storageSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
// --- WARNING! LEGACY CODE AHEAD! ---
|
||||
// This entire file contains the legacy code for initial construction.
|
||||
@@ -516,7 +515,7 @@ namespace Content.Server.Construction
|
||||
var xform = Transform(structure);
|
||||
var wasAnchored = xform.Anchored;
|
||||
xform.Anchored = false;
|
||||
_transform.SetCoordinates(structure, xform, ev.Location);
|
||||
xform.Coordinates = ev.Location;
|
||||
xform.LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.Zero;
|
||||
xform.Anchored = wasAnchored;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user