Specifiable dock colours + stripeback displays (#9566)
This commit is contained in:
@@ -293,7 +293,7 @@ public sealed class RadarControl : Control
|
||||
|
||||
if (uiPosition.Length > RadarRange - DockScale) continue;
|
||||
|
||||
var color = HighlightedDock == ent ? Color.Magenta : Color.DarkViolet;
|
||||
var color = HighlightedDock == ent ? state.HighlightedColor : state.Color;
|
||||
|
||||
uiPosition.Y = -uiPosition.Y;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<userInterface:FancyWindow xmlns="https://spacestation14.io"
|
||||
xmlns:userInterface="clr-namespace:Content.Client.UserInterface"
|
||||
xmlns:ui="clr-namespace:Content.Client.Shuttles.UI"
|
||||
xmlns:ui1="clr-namespace:Content.Client.HUD.UI"
|
||||
Title="{Loc 'shuttle-console-window-title'}">
|
||||
<GridContainer Columns="3"
|
||||
HorizontalAlignment="Stretch">
|
||||
@@ -10,11 +11,14 @@
|
||||
MinWidth="256"
|
||||
Align="Center"
|
||||
Orientation="Vertical">
|
||||
<PanelContainer StyleClasses="BorderedWindowPanel">
|
||||
<BoxContainer Orientation="Vertical">
|
||||
<ui1:StripeBack>
|
||||
<Label Name="DockingPortsLabel" Text="{Loc 'shuttle-console-dock-label'}" HorizontalAlignment="Center"/>
|
||||
</ui1:StripeBack>
|
||||
<BoxContainer Name="DockPorts"
|
||||
Orientation="Vertical">
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
<PanelContainer>
|
||||
<ui:RadarControl Name="RadarScreen"
|
||||
@@ -29,8 +33,10 @@
|
||||
MinWidth="256"
|
||||
Align="Center"
|
||||
Orientation="Vertical">
|
||||
<PanelContainer Name="ReadonlyDisplay"
|
||||
StyleClasses="BorderedWindowPanel">
|
||||
<ui1:StripeBack>
|
||||
<Label Name="DisplayLabel" Text="{Loc 'shuttle-console-display-label'}" HorizontalAlignment="Center"/>
|
||||
</ui1:StripeBack>
|
||||
<BoxContainer Name="ReadonlyDisplay">
|
||||
<GridContainer Columns="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top">
|
||||
@@ -59,7 +65,7 @@
|
||||
Text="0.0"
|
||||
Align="Right"/>
|
||||
</GridContainer>
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
<Button Name="ShuttleModeDisplay"
|
||||
Text="{Loc 'shuttle-console-strafing'}"
|
||||
TextAlign="Center"
|
||||
|
||||
@@ -139,6 +139,7 @@ public sealed partial class ShuttleConsoleWindow : FancyWindow,
|
||||
Text = Loc.GetString("shuttle-console-dock-button", ("suffix", suffix)),
|
||||
ToggleMode = true,
|
||||
Pressed = pressed,
|
||||
Margin = new Thickness(0f, 1f),
|
||||
};
|
||||
|
||||
if (pressed)
|
||||
|
||||
@@ -15,5 +15,17 @@ namespace Content.Server.Shuttles.Components
|
||||
|
||||
[ViewVariables]
|
||||
public override bool Docked => DockedWith != null;
|
||||
|
||||
/// <summary>
|
||||
/// Color that gets shown on the radar screen.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("radarColor")]
|
||||
public Color RadarColor = Color.DarkViolet;
|
||||
|
||||
/// <summary>
|
||||
/// Color that gets shown on the radar screen when the dock is highlighted.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("highlightedRadarColor")]
|
||||
public Color HighlightedRadarColor = Color.Magenta;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace Content.Server.Shuttles.Systems
|
||||
{
|
||||
public sealed class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tags = default!;
|
||||
@@ -211,6 +210,8 @@ namespace Content.Server.Shuttles.Systems
|
||||
Angle = xform.LocalRotation,
|
||||
Entity = comp.Owner,
|
||||
Connected = comp.Docked,
|
||||
Color = comp.RadarColor,
|
||||
HighlightedColor = comp.HighlightedRadarColor,
|
||||
};
|
||||
result.Add(state);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ public sealed class DockingInterfaceState
|
||||
public Angle Angle;
|
||||
public EntityUid Entity;
|
||||
public bool Connected;
|
||||
public Color Color;
|
||||
public Color HighlightedColor;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -2,6 +2,8 @@ shuttle-pilot-start = Piloting ship
|
||||
shuttle-pilot-end = Stopped piloting
|
||||
|
||||
# Display
|
||||
shuttle-console-display-label = Display
|
||||
|
||||
shuttle-console-max-radar = Max radar range:
|
||||
shuttle-console-radar = Radar range:
|
||||
shuttle-console-position = Position:
|
||||
@@ -9,6 +11,7 @@ shuttle-console-orientation = Orientation:
|
||||
shuttle-console-linear-velocity = Linear velocity:
|
||||
shuttle-console-angular-velocity = Angular velocity:
|
||||
|
||||
shuttle-console-dock-label = Docking ports
|
||||
shuttle-console-docked = {$index} (Docked)
|
||||
shuttle-console-dock-button = Dock {$suffix}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user