Nullable grid Uid (#8798)

This commit is contained in:
Leon Friedrich
2022-06-20 12:14:35 +12:00
committed by GitHub
parent ef41cd5aa8
commit fa4c6f63f8
82 changed files with 318 additions and 242 deletions

View File

@@ -52,7 +52,7 @@ namespace Content.Server.Administration.Commands
var mapManager = IoCManager.Resolve<IMapManager>();
var currentMap = entMan.GetComponent<TransformComponent>(playerEntity).MapID;
var currentGrid = entMan.GetComponent<TransformComponent>(playerEntity).GridEntityId;
var currentGrid = entMan.GetComponent<TransformComponent>(playerEntity).GridUid;
var found = entMan.EntityQuery<WarpPointComponent>(true)
.Where(p => p.Location == location)
@@ -62,8 +62,8 @@ namespace Content.Server.Administration.Commands
// Sort so that warp points on the same grid/map are first.
// So if you have two maps loaded with the same warp points,
// it will prefer the warp points on the map you're currently on.
var aGrid = a.GetGridEntityId(entMan);
var bGrid = b.GetGridEntityId(entMan);
var aGrid = a.GetGridUid(entMan);
var bGrid = b.GetGridUid(entMan);
if (aGrid == bGrid)
{
@@ -102,7 +102,7 @@ namespace Content.Server.Administration.Commands
}))
.FirstOrDefault();
var entityUid = found.GetGridEntityId(entMan);
var entityUid = found.GetGridUid(entMan);
if (entityUid != EntityUid.Invalid)
{
entMan.GetComponent<TransformComponent>(playerEntity).Coordinates = found;