Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content * build?
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user