Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)

* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content

* build?
This commit is contained in:
Kara
2024-05-12 07:31:54 -07:00
committed by GitHub
parent 8938e1d8b2
commit 855234aa30
59 changed files with 152 additions and 84 deletions

View File

@@ -60,6 +60,7 @@ public sealed class ChatUIController : UIController
[UISystemDependency] private readonly GhostSystem? _ghost = default;
[UISystemDependency] private readonly TypingIndicatorSystem? _typingIndicator = default;
[UISystemDependency] private readonly ChatSystem? _chatSys = default;
[UISystemDependency] private readonly TransformSystem? _transform = default;
[ValidatePrototypeId<ColorPalettePrototype>]
private const string ChatNamePalette = "ChatNames";
@@ -625,7 +626,7 @@ public sealed class ChatUIController : UIController
var predicate = static (EntityUid uid, (EntityUid compOwner, EntityUid? attachedEntity) data)
=> uid == data.compOwner || uid == data.attachedEntity;
var playerPos = player != null
? EntityManager.GetComponent<TransformComponent>(player.Value).MapPosition
? _transform?.GetMapCoordinates(player.Value) ?? MapCoordinates.Nullspace
: MapCoordinates.Nullspace;
var occluded = player != null && _examine.IsOccluded(player.Value);
@@ -644,7 +645,7 @@ public sealed class ChatUIController : UIController
continue;
}
var otherPos = EntityManager.GetComponent<TransformComponent>(ent).MapPosition;
var otherPos = _transform?.GetMapCoordinates(ent) ?? MapCoordinates.Nullspace;
if (occluded && !_examine.InRangeUnOccluded(
playerPos,