Purge uses of TransformComponent.AttachToGridOrMap (#34940)
Switches over all extant uses of TransformComponent.AttachToGridOrMap to use SharedTransformSystem.AttachToGridOrMap
This commit is contained in:
@@ -304,8 +304,8 @@ namespace Content.Server.Construction
|
||||
return null;
|
||||
|
||||
// [Optional] Exit if the new entity's prototype is a parent of the original
|
||||
// E.g., if an entity with the 'AirlockCommand' prototype was to be replaced with a new entity that
|
||||
// had the 'Airlock' prototype, and DoNotReplaceInheritingEntities was true, the code block would
|
||||
// E.g., if an entity with the 'AirlockCommand' prototype was to be replaced with a new entity that
|
||||
// had the 'Airlock' prototype, and DoNotReplaceInheritingEntities was true, the code block would
|
||||
// exit here because 'AirlockCommand' is derived from 'Airlock'
|
||||
if (GetCurrentNode(uid, construction)?.DoNotReplaceInheritingEntities == true &&
|
||||
metaData.EntityPrototype?.ID != null)
|
||||
@@ -362,7 +362,7 @@ namespace Content.Server.Construction
|
||||
|
||||
// Transform transferring.
|
||||
var newTransform = Transform(newUid);
|
||||
newTransform.AttachToGridOrMap(); // in case in hands or a container
|
||||
TransformSystem.AttachToGridOrMap(newUid, newTransform); // in case in hands or a container
|
||||
newTransform.LocalRotation = transform.LocalRotation;
|
||||
newTransform.Anchored = transform.Anchored;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user