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