Revert "Fix chat bubbles (#25643)" (#25645)

* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
This commit is contained in:
metalgearsloth
2024-02-28 00:51:20 +11:00
committed by GitHub
parent d204896bf5
commit a9502be29e
154 changed files with 435 additions and 611 deletions

View File

@@ -63,7 +63,6 @@ namespace Content.Server.Construction.Commands
var changed = 0;
var tagSystem = _entManager.EntitySysManager.GetEntitySystem<TagSystem>();
var xformSystem = _entManager.System<SharedTransformSystem>();
var enumerator = xformQuery.GetComponent(gridId.Value).ChildEnumerator;
@@ -98,7 +97,7 @@ namespace Content.Server.Construction.Commands
if (childXform.LocalRotation != Angle.Zero)
{
xformSystem.SetLocalRotation(child, Angle.Zero, childXform);
childXform.LocalRotation = Angle.Zero;
changed++;
}
}

View File

@@ -12,14 +12,7 @@ namespace Content.Server.Construction.Completions
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
var transform = entityManager.GetComponent<TransformComponent>(uid);
if (Value == transform.Anchored)
return;
var xformSystem = entityManager.System<SharedTransformSystem>();
if (Value)
xformSystem.AnchorEntity((uid, transform));
else
xformSystem.Unanchor(uid, transform);
transform.Anchored = Value;
}
}
}

View File

@@ -14,12 +14,13 @@ namespace Content.Server.Construction.Completions
{
var transform = entityManager.GetComponent<TransformComponent>(uid);
var xformSystem = entityManager.System<SharedTransformSystem>();
if (!transform.Anchored)
xformSystem.SetCoordinates((uid, transform, entityManager.GetComponent<MetaDataComponent>(uid)), transform.Coordinates.SnapToGrid(entityManager));
transform.Coordinates = transform.Coordinates.SnapToGrid(entityManager);
if (SouthRotation)
xformSystem.SetLocalRotation(uid, Angle.Zero, transform);
{
transform.LocalRotation = Angle.Zero;
}
}
}
}

View File

@@ -362,12 +362,9 @@ namespace Content.Server.Construction
// Transform transferring.
var newTransform = Transform(newUid);
_xformSystem.AttachToGridOrMap(newUid, newTransform); // in case in hands or a container
_xformSystem.SetLocalRotation(newUid, transform.LocalRotation, newTransform);
if (transform.Anchored)
_xformSystem.AnchorEntity((newUid, newTransform));
else
_xformSystem.Unanchor(newUid, newTransform);
newTransform.AttachToGridOrMap(); // in case in hands or a container
newTransform.LocalRotation = transform.LocalRotation;
newTransform.Anchored = transform.Anchored;
// Container transferring.
if (containerManager != null)

View File

@@ -32,7 +32,6 @@ namespace Content.Server.Construction
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
[Dependency] private readonly StorageSystem _storageSystem = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
// --- WARNING! LEGACY CODE AHEAD! ---
// This entire file contains the legacy code for initial construction.
@@ -83,7 +82,7 @@ namespace Content.Server.Construction
}
}
var pos = _xformSystem.GetMapCoordinates(user);
var pos = Transform(user).MapPosition;
foreach (var near in _lookupSystem.GetEntitiesInRange(pos, 2f, LookupFlags.Contained | LookupFlags.Dynamic | LookupFlags.Sundries | LookupFlags.Approximate))
{
@@ -528,12 +527,10 @@ namespace Content.Server.Construction
// ikr
var xform = Transform(structure);
var wasAnchored = xform.Anchored;
if (wasAnchored)
_xformSystem.Unanchor(structure, xform);
_xformSystem.SetCoordinates((structure, xform, MetaData(structure)), GetCoordinates(ev.Location));
_xformSystem.SetLocalRotation(structure, constructionPrototype.CanRotate ? ev.Angle : Angle.Zero, xform);
if (wasAnchored)
_xformSystem.AnchorEntity((structure, xform));
xform.Anchored = false;
xform.Coordinates = GetCoordinates(ev.Location);
xform.LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.Zero;
xform.Anchored = wasAnchored;
RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack, GetNetEntity(structure)));
_adminLogger.Add(LogType.Construction, LogImpact.Low, $"{ToPrettyString(user):player} has turned a {ev.PrototypeName} construction ghost into {ToPrettyString(structure)} at {Transform(structure).Coordinates}");