@@ -5,6 +5,7 @@ using Content.Shared.Shuttles.UI.MapObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Content.Client.Shuttles.Systems;
|
||||
@@ -39,6 +40,12 @@ public sealed partial class ShuttleSystem
|
||||
return GetCoordinates(exclusion.Coordinates).ToMap(EntityManager, XformSystem);
|
||||
case GridMapObject grid:
|
||||
var gridXform = Transform(grid.Entity);
|
||||
|
||||
if (HasComp<MapComponent>(grid.Entity))
|
||||
{
|
||||
return new MapCoordinates(gridXform.LocalPosition, gridXform.MapID);
|
||||
}
|
||||
|
||||
Entity<PhysicsComponent?, TransformComponent?> gridEnt = (grid.Entity, null, gridXform);
|
||||
return new MapCoordinates(Maps.GetGridPosition(gridEnt), gridXform.MapID);
|
||||
default:
|
||||
|
||||
@@ -150,8 +150,12 @@ public sealed partial class MapScreen : BoxContainer
|
||||
_ftlStyle.BackgroundColor = Color.FromHex("#B02E26");
|
||||
MapRadar.InFtl = false;
|
||||
break;
|
||||
// Fallback in case no FTL state or the likes.
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
SetFTLAllowed(false);
|
||||
_ftlStyle.BackgroundColor = Color.FromHex("#B02E26");
|
||||
MapRadar.InFtl = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsFTLBlocked())
|
||||
|
||||
@@ -210,6 +210,10 @@ public sealed partial class ShuttleMapControl : BaseShuttleControl
|
||||
|
||||
foreach (var mapObj in mapObjects)
|
||||
{
|
||||
// If it's a grid-map skip it.
|
||||
if (mapObj is GridMapObject gridObj && EntManager.HasComponent<MapComponent>(gridObj.Entity))
|
||||
continue;
|
||||
|
||||
var mapCoords = _shuttles.GetMapCoordinates(mapObj);
|
||||
|
||||
var relativePos = matty.Transform(mapCoords.Position);
|
||||
|
||||
Reference in New Issue
Block a user