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

@@ -20,7 +20,6 @@ namespace Content.Shared.Examine
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] protected readonly MobStateSystem MobStateSystem = default!;
public const float MaxRaycastRange = 100;
@@ -187,7 +186,6 @@ namespace Content.Shared.Examine
if (!ignoreInsideBlocker) return false;
var xfmSys = entMan.System<SharedTransformSystem>();
foreach (var result in rayResults)
{
if (!entMan.TryGetComponent(result.HitEntity, out OccluderComponent? o))
@@ -196,7 +194,7 @@ namespace Content.Shared.Examine
}
var bBox = o.BoundingBox;
bBox = bBox.Translated(xfmSys.GetWorldPosition(result.HitEntity));
bBox = bBox.Translated(entMan.GetComponent<TransformComponent>(result.HitEntity).WorldPosition);
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
{
@@ -212,10 +210,8 @@ namespace Content.Shared.Examine
public static bool InRangeUnOccluded(EntityUid origin, EntityUid other, float range = ExamineRange, Ignored? predicate = null, bool ignoreInsideBlocker = true)
{
var entMan = IoCManager.Resolve<IEntityManager>();
var xfmSys = entMan.System<SharedTransformSystem>();
var originPos = xfmSys.GetMapCoordinates(origin);
var otherPos = xfmSys.GetMapCoordinates(other);
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
var otherPos = entMan.GetComponent<TransformComponent>(other).MapPosition;
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
@@ -223,10 +219,8 @@ namespace Content.Shared.Examine
public static bool InRangeUnOccluded(EntityUid origin, EntityCoordinates other, float range = ExamineRange, Ignored? predicate = null, bool ignoreInsideBlocker = true)
{
var entMan = IoCManager.Resolve<IEntityManager>();
var xfmSys = entMan.System<SharedTransformSystem>();
var originPos = xfmSys.GetMapCoordinates(origin);
var otherPos = other.ToMap(entMan, xfmSys);
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
var otherPos = other.ToMap(entMan);
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
@@ -234,9 +228,7 @@ namespace Content.Shared.Examine
public static bool InRangeUnOccluded(EntityUid origin, MapCoordinates other, float range = ExamineRange, Ignored? predicate = null, bool ignoreInsideBlocker = true)
{
var entMan = IoCManager.Resolve<IEntityManager>();
var xfmSys = entMan.System<SharedTransformSystem>();
var originPos = xfmSys.GetMapCoordinates(origin);
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
return InRangeUnOccluded(originPos, other, range, predicate, ignoreInsideBlocker);
}