Skip to content

Commit a26e639

Browse files
authored
Merge branch 'master' into armor-vests-for-det-and-brigmed
2 parents dbfb5ed + b7e4ad4 commit a26e639

File tree

1,121 files changed

+392603
-119709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,121 files changed

+392603
-119709
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ resharper_keep_existing_attribute_arrangement = true
344344
resharper_wrap_chained_binary_patterns = chop_if_long
345345
resharper_wrap_chained_method_calls = chop_if_long
346346
resharper_csharp_trailing_comma_in_multiline_lists = true
347+
resharper_csharp_qualified_using_at_nested_scope = false
348+
resharper_csharp_prefer_qualified_reference = false
349+
resharper_csharp_allow_alias = false
347350

348351
[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}]
349352
indent_size = 2

.envrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
1+
set -e
2+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
3+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
34
fi
45
use flake

Content.Benchmarks/MapLoadBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public async Task Cleanup()
4646
PoolManager.Shutdown();
4747
}
4848

49-
public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Origin", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog" };
49+
public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog", "Convex"};
5050

5151
[ParamsSource(nameof(MapsSource))]
5252
public string Map;

Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ protected override void UpdateState(BoundUserInterfaceState message)
3939
if (message is not CargoBountyConsoleState state)
4040
return;
4141

42-
_menu?.UpdateEntries(state.Bounties, state.UntilNextSkip);
42+
_menu?.UpdateEntries(state.Bounties, state.History, state.UntilNextSkip);
4343
}
4444
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<BoxContainer xmlns="https://spacestation14.io"
2+
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
3+
Margin="10 10 10 0"
4+
HorizontalExpand="True">
5+
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True">
6+
<BoxContainer Orientation="Vertical"
7+
HorizontalExpand="True">
8+
<BoxContainer Orientation="Horizontal">
9+
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
10+
<RichTextLabel Name="RewardLabel"/>
11+
<RichTextLabel Name="ManifestLabel"/>
12+
</BoxContainer>
13+
<BoxContainer Orientation="Vertical" MinWidth="120" Margin="0 0 10 0">
14+
<RichTextLabel Name="TimestampLabel" HorizontalAlignment="Right" />
15+
<RichTextLabel Name="IdLabel" HorizontalAlignment="Right" />
16+
</BoxContainer>
17+
</BoxContainer>
18+
<customControls:HSeparator Margin="5 10 5 10"/>
19+
<RichTextLabel Name="NoticeLabel" />
20+
</BoxContainer>
21+
</PanelContainer>
22+
</BoxContainer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using Content.Client.Message;
2+
using Content.Shared.Cargo;
3+
using Content.Shared.Cargo.Prototypes;
4+
using Robust.Client.AutoGenerated;
5+
using Robust.Client.UserInterface.Controls;
6+
using Robust.Client.UserInterface.XAML;
7+
using Robust.Shared.Prototypes;
8+
using Robust.Shared.Timing;
9+
10+
namespace Content.Client.Cargo.UI;
11+
12+
[GenerateTypedNameReferences]
13+
public sealed partial class BountyHistoryEntry : BoxContainer
14+
{
15+
[Dependency] private readonly IPrototypeManager _prototype = default!;
16+
17+
public BountyHistoryEntry(CargoBountyHistoryData bounty)
18+
{
19+
RobustXamlLoader.Load(this);
20+
IoCManager.InjectDependencies(this);
21+
22+
if (!_prototype.TryIndex(bounty.Bounty, out var bountyPrototype))
23+
return;
24+
25+
var items = new List<string>();
26+
foreach (var entry in bountyPrototype.Entries)
27+
{
28+
items.Add(Loc.GetString("bounty-console-manifest-entry",
29+
("amount", entry.Amount),
30+
("item", Loc.GetString(entry.Name))));
31+
}
32+
33+
ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items))));
34+
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward)));
35+
IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id)));
36+
37+
TimestampLabel.SetMarkup(bounty.Timestamp.ToString(@"hh\:mm\:ss"));
38+
39+
if (bounty.Result == CargoBountyHistoryData.BountyResult.Completed)
40+
{
41+
NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-completed-label"));
42+
}
43+
else
44+
{
45+
NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-skipped-label",
46+
("id", bounty.ActorName ?? "")));
47+
}
48+
}
49+
}

Content.Client/Cargo/UI/CargoBountyMenu.xaml

+22-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,28 @@
1111
<PanelContainer.PanelOverride>
1212
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
1313
</PanelContainer.PanelOverride>
14-
<ScrollContainer HScrollEnabled="False"
15-
HorizontalExpand="True"
16-
VerticalExpand="True">
17-
<BoxContainer Name="BountyEntriesContainer"
18-
Orientation="Vertical"
19-
VerticalExpand="True"
20-
HorizontalExpand="True">
21-
</BoxContainer>
22-
</ScrollContainer>
14+
<TabContainer Name="MasterTabContainer" VerticalExpand="True" HorizontalExpand="True">
15+
<ScrollContainer HScrollEnabled="False"
16+
HorizontalExpand="True"
17+
VerticalExpand="True">
18+
<BoxContainer Name="BountyEntriesContainer"
19+
Orientation="Vertical"
20+
VerticalExpand="True"
21+
HorizontalExpand="True" />
22+
</ScrollContainer>
23+
<ScrollContainer HScrollEnabled="False"
24+
HorizontalExpand="True"
25+
VerticalExpand="True">
26+
<Label Name="NoHistoryLabel"
27+
Text="{Loc 'bounty-console-history-empty-label'}"
28+
Visible="False"
29+
Align="Center" />
30+
<BoxContainer Name="BountyHistoryContainer"
31+
Orientation="Vertical"
32+
VerticalExpand="True"
33+
HorizontalExpand="True" />
34+
</ScrollContainer>
35+
</TabContainer>
2336
</PanelContainer>
2437
<!-- Footer -->
2538
<BoxContainer Orientation="Vertical">

Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs

+20-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ public sealed partial class CargoBountyMenu : FancyWindow
1515
public CargoBountyMenu()
1616
{
1717
RobustXamlLoader.Load(this);
18+
19+
MasterTabContainer.SetTabTitle(0, Loc.GetString("bounty-console-tab-available-label"));
20+
MasterTabContainer.SetTabTitle(1, Loc.GetString("bounty-console-tab-history-label"));
1821
}
1922

20-
public void UpdateEntries(List<CargoBountyData> bounties, TimeSpan untilNextSkip)
23+
public void UpdateEntries(List<CargoBountyData> bounties, List<CargoBountyHistoryData> history, TimeSpan untilNextSkip)
2124
{
2225
BountyEntriesContainer.Children.Clear();
2326
foreach (var b in bounties)
@@ -32,5 +35,21 @@ public void UpdateEntries(List<CargoBountyData> bounties, TimeSpan untilNextSkip
3235
{
3336
MinHeight = 10
3437
});
38+
39+
BountyHistoryContainer.Children.Clear();
40+
if (history.Count == 0)
41+
{
42+
NoHistoryLabel.Visible = true;
43+
}
44+
else
45+
{
46+
NoHistoryLabel.Visible = false;
47+
48+
// Show the history in reverse, so last entry is first in the list
49+
for (var i = history.Count - 1; i >= 0; i--)
50+
{
51+
BountyHistoryContainer.AddChild(new BountyHistoryEntry(history[i]));
52+
}
53+
}
3554
}
3655
}

Content.Client/Changelog/ChangelogWindow.xaml.cs

+20-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
using Robust.Client.AutoGenerated;
99
using Robust.Client.UserInterface;
1010
using Robust.Client.UserInterface.XAML;
11+
using Robust.Shared;
12+
using Robust.Shared.Configuration;
1113
using Robust.Shared.Console;
1214

1315
namespace Content.Client.Changelog
1416
{
1517
[GenerateTypedNameReferences]
1618
public sealed partial class ChangelogWindow : FancyWindow
1719
{
18-
[Dependency] private readonly IClientAdminManager _adminManager = default!;
1920
[Dependency] private readonly ChangelogManager _changelog = default!;
21+
[Dependency] private readonly IClientAdminManager _adminManager = default!;
22+
[Dependency] private readonly IConfigurationManager _cfg = default!;
2023

2124
public ChangelogWindow()
2225
{
@@ -67,8 +70,22 @@ private async void PopulateChangelog()
6770
Tabs.SetTabTitle(i++, Loc.GetString($"changelog-tab-title-{changelog.Name}"));
6871
}
6972

70-
var version = typeof(ChangelogWindow).Assembly.GetName().Version ?? new Version(1, 0);
71-
VersionLabel.Text = Loc.GetString("changelog-version-tag", ("version", version.ToString()));
73+
// Try to get the current version from the build.json file
74+
var version = _cfg.GetCVar(CVars.BuildVersion);
75+
var forkId = _cfg.GetCVar(CVars.BuildForkId);
76+
77+
var versionText = Loc.GetString("changelog-version-unknown");
78+
79+
// Make sure these aren't empty, like in a dev env
80+
if (!string.IsNullOrEmpty(version) && !string.IsNullOrEmpty(forkId))
81+
{
82+
versionText = Loc.GetString("changelog-version-tag",
83+
("fork", forkId),
84+
("version", version[..7])); // Only show the first 7 characters
85+
}
86+
87+
// if else statements are ugly, shut up
88+
VersionLabel.Text = versionText;
7289

7390
TabsUpdated();
7491
}
+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ui:RadialMenu xmlns="https://spacestation14.io"
1+
<ui:RadialMenu xmlns="https://spacestation14.io"
22
xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls"
33
BackButtonStyleClass="RadialMenuBackButton"
44
CloseButtonStyleClass="RadialMenuCloseButton"
@@ -8,25 +8,25 @@
88

99
<!-- Main -->
1010
<!-- Impstation edit - changed all pngs to new assets-->
11-
<ui:RadialContainer Name="Main" VerticalExpand="True" HorizontalExpand="True" Radius="64" ReserveSpaceForHiddenChildren="False">
12-
<ui:RadialMenuTextureButton StyleClasses="RadialMenuButton" SetSize="64 64" ToolTip="{Loc 'emote-menu-category-general'}" TargetLayer="General" Visible="False">
11+
<ui:RadialContainer Name="Main" VerticalExpand="True" HorizontalExpand="True" InitialRadius="100" ReserveSpaceForHiddenChildren="False">
12+
<ui:RadialMenuTextureButtonWithSector SetSize="64 64" ToolTip="{Loc 'emote-menu-category-general'}" TargetLayer="General" Visible="False">
1313
<TextureRect VerticalAlignment="Center" HorizontalAlignment="Center" TextureScale="2 2" TexturePath="/Textures/_Impstation/Interface/Emotes/general.png"/>
14-
</ui:RadialMenuTextureButton>
15-
<ui:RadialMenuTextureButton StyleClasses="RadialMenuButton" SetSize="64 64" ToolTip="{Loc 'emote-menu-category-vocal'}" TargetLayer="Vocal" Visible="False">
14+
</ui:RadialMenuTextureButtonWithSector>
15+
<ui:RadialMenuTextureButtonWithSector SetSize="64 64" ToolTip="{Loc 'emote-menu-category-vocal'}" TargetLayer="Vocal" Visible="False">
1616
<TextureRect VerticalAlignment="Center" HorizontalAlignment="Center" TextureScale="2 2" TexturePath="/Textures/_Impstation/Interface/Emotes/vocal.png"/>
17-
</ui:RadialMenuTextureButton>
18-
<ui:RadialMenuTextureButton StyleClasses="RadialMenuButton" SetSize="64 64" ToolTip="{Loc 'emote-menu-category-hands'}" TargetLayer="Hands" Visible="False">
17+
</ui:RadialMenuTextureButtonWithSector>
18+
<ui:RadialMenuTextureButtonWithSector SetSize="64 64" ToolTip="{Loc 'emote-menu-category-hands'}" TargetLayer="Hands" Visible="False">
1919
<TextureRect VerticalAlignment="Center" HorizontalAlignment="Center" TextureScale="2 2" TexturePath="/Textures/_Impstation/Interface/Emotes/hand.png"/>
20-
</ui:RadialMenuTextureButton>
20+
</ui:RadialMenuTextureButtonWithSector>
2121
</ui:RadialContainer>
2222

2323
<!-- General -->
24-
<ui:RadialContainer Name="General" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
24+
<ui:RadialContainer Name="General" VerticalExpand="True" HorizontalExpand="True" InitialRadius="100"/>
2525

2626
<!-- Vocal -->
27-
<ui:RadialContainer Name="Vocal" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
27+
<ui:RadialContainer Name="Vocal" VerticalExpand="True" HorizontalExpand="True" InitialRadius="100"/>
2828

2929
<!-- Hands -->
30-
<ui:RadialContainer Name="Hands" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
30+
<ui:RadialContainer Name="Hands" VerticalExpand="True" HorizontalExpand="True" InitialRadius="100"/>
3131

3232
</ui:RadialMenu>

Content.Client/Chat/UI/EmotesMenu.xaml.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public EmotesMenu()
5050

5151
var button = new EmoteMenuButton
5252
{
53-
StyleClasses = { "RadialMenuButton" },
5453
SetSize = new Vector2(64f, 64f),
5554
ToolTip = Loc.GetString(emote.Name),
5655
ProtoId = emote.ID,
@@ -106,7 +105,7 @@ private void AddEmoteClickAction(RadialContainer container)
106105
}
107106

108107

109-
public sealed class EmoteMenuButton : RadialMenuTextureButton
108+
public sealed class EmoteMenuButton : RadialMenuTextureButtonWithSector
110109
{
111110
public ProtoId<EmotePrototype> ProtoId { get; set; }
112111
}

Content.Client/Clickable/ClickMapManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal sealed class ClickMapManager : IClickMapManager, IPostInjectInit
2020
"/Textures/Logo",
2121
};
2222

23-
private const float Threshold = 0.25f;
23+
private const float Threshold = 0.1f;
2424
private const int ClickRadius = 2;
2525

2626
[Dependency] private readonly IResourceCache _resourceCache = default!;

Content.Client/CrewManifest/UI/CrewManifestSection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public CrewManifestSection(
2222
AddChild(new Label()
2323
{
2424
StyleClasses = { "LabelBig" },
25-
Text = Loc.GetString($"department-{section.ID}")
25+
Text = Loc.GetString(section.Name)
2626
});
2727

2828
var departmentContainer = new BoxContainer()

Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ protected override void Open()
3939
SendMessage(new CriminalRecordChangeStatus(status, null));
4040
_window.OnDialogConfirmed += (status, reason) =>
4141
SendMessage(new CriminalRecordChangeStatus(status, reason));
42+
_window.OnStatusFilterPressed += (statusFilter) =>
43+
SendMessage(new CriminalRecordSetStatusFilter(statusFilter));
4244
_window.OnHistoryUpdated += UpdateHistory;
4345
_window.OnHistoryClosed += () => _historyWindow?.Close();
4446
_window.OnClose += Close;

0 commit comments

Comments
 (0)