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

@@ -17,16 +17,15 @@ namespace Content.Shared.Construction.Conditions
public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
{
var entManager = IoCManager.Resolve<IEntityManager>();
var xfmSystem = entManager.System<SharedTransformSystem>();
// get blueprint and user position
var userWorldPosition = xfmSystem.GetWorldPosition(user);
var userWorldPosition = entManager.GetComponent<TransformComponent>(user).WorldPosition;
var objWorldPosition = location.ToMap(entManager).Position;
// find direction from user to blueprint
var userToObject = (objWorldPosition - userWorldPosition);
// get direction of the grid being placed on as an offset.
var gridRotation = xfmSystem.GetWorldRotation(location.EntityId);
var gridRotation = entManager.GetComponent<TransformComponent>(location.EntityId).WorldRotation;
var directionWithOffset = gridRotation.RotateVec(direction.ToVec());
// dot product will be positive if user direction and blueprint are co-directed