Station maps (#13027)
This commit is contained in:
24
Content.Client/Pinpointer/UI/StationMapWindow.xaml.cs
Normal file
24
Content.Client/Pinpointer/UI/StationMapWindow.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.Pinpointer.UI;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class StationMapWindow : FancyWindow
|
||||
{
|
||||
public StationMapWindow(EntityUid? mapUid, EntityUid? trackedEntity)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
NavMapScreen.MapUid = mapUid;
|
||||
|
||||
if (trackedEntity != null)
|
||||
NavMapScreen.TrackedCoordinates.Add(new EntityCoordinates(trackedEntity.Value, Vector2.Zero), (true, Color.Red));
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<MetaDataComponent>(mapUid, out var metadata))
|
||||
{
|
||||
Title = metadata.EntityName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user