diff --git a/.editorconfig b/.editorconfig index 8b921444539..1583c600aa5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -344,9 +344,6 @@ resharper_keep_existing_attribute_arrangement = true resharper_wrap_chained_binary_patterns = chop_if_long resharper_wrap_chained_method_calls = chop_if_long resharper_csharp_trailing_comma_in_multiline_lists = true -resharper_csharp_qualified_using_at_nested_scope = false -resharper_csharp_prefer_qualified_reference = false -resharper_csharp_allow_alias = false [*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}] indent_size = 2 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c49a7d5314..85cd8487ff7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,3 +9,5 @@ # Head Spriter *.png @CatBackGround +# Head Wiki +*.xml @Danone453 diff --git a/Content.Benchmarks/MapLoadBenchmark.cs b/Content.Benchmarks/MapLoadBenchmark.cs index bc050b59f16..8c04d9a40dc 100644 --- a/Content.Benchmarks/MapLoadBenchmark.cs +++ b/Content.Benchmarks/MapLoadBenchmark.cs @@ -46,7 +46,7 @@ public async Task Cleanup() PoolManager.Shutdown(); } - public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog", "Convex"}; + public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog" }; [ParamsSource(nameof(MapsSource))] public string Map; diff --git a/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs b/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs index 04075000f5b..44c40143d83 100644 --- a/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs +++ b/Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs @@ -39,6 +39,6 @@ protected override void UpdateState(BoundUserInterfaceState message) if (message is not CargoBountyConsoleState state) return; - _menu?.UpdateEntries(state.Bounties, state.History, state.UntilNextSkip); + _menu?.UpdateEntries(state.Bounties, state.UntilNextSkip); } } diff --git a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml deleted file mode 100644 index 905cf020ed1..00000000000 --- a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs b/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs deleted file mode 100644 index 54804be641c..00000000000 --- a/Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Content.Client.Message; -using Content.Shared.Cargo; -using Content.Shared.Cargo.Prototypes; -using Robust.Client.AutoGenerated; -using Robust.Client.UserInterface.Controls; -using Robust.Client.UserInterface.XAML; -using Robust.Shared.Prototypes; -using Robust.Shared.Timing; - -namespace Content.Client.Cargo.UI; - -[GenerateTypedNameReferences] -public sealed partial class BountyHistoryEntry : BoxContainer -{ - [Dependency] private readonly IPrototypeManager _prototype = default!; - - public BountyHistoryEntry(CargoBountyHistoryData bounty) - { - RobustXamlLoader.Load(this); - IoCManager.InjectDependencies(this); - - if (!_prototype.TryIndex(bounty.Bounty, out var bountyPrototype)) - return; - - var items = new List(); - foreach (var entry in bountyPrototype.Entries) - { - items.Add(Loc.GetString("bounty-console-manifest-entry", - ("amount", entry.Amount), - ("item", Loc.GetString(entry.Name)))); - } - - ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items)))); - RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward))); - IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id))); - - TimestampLabel.SetMarkup(bounty.Timestamp.ToString(@"hh\:mm\:ss")); - - if (bounty.Result == CargoBountyHistoryData.BountyResult.Completed) - { - NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-completed-label")); - } - else - { - NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-skipped-label", - ("id", bounty.ActorName ?? ""))); - } - } -} diff --git a/Content.Client/Cargo/UI/CargoBountyMenu.xaml b/Content.Client/Cargo/UI/CargoBountyMenu.xaml index 526ba69129b..bb263ff6c4a 100644 --- a/Content.Client/Cargo/UI/CargoBountyMenu.xaml +++ b/Content.Client/Cargo/UI/CargoBountyMenu.xaml @@ -11,28 +11,15 @@ - - - - - - - + + + + diff --git a/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs b/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs index c289fb6ed83..3767b45e4be 100644 --- a/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs +++ b/Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs @@ -15,12 +15,9 @@ public sealed partial class CargoBountyMenu : FancyWindow public CargoBountyMenu() { RobustXamlLoader.Load(this); - - MasterTabContainer.SetTabTitle(0, Loc.GetString("bounty-console-tab-available-label")); - MasterTabContainer.SetTabTitle(1, Loc.GetString("bounty-console-tab-history-label")); } - public void UpdateEntries(List bounties, List history, TimeSpan untilNextSkip) + public void UpdateEntries(List bounties, TimeSpan untilNextSkip) { BountyEntriesContainer.Children.Clear(); foreach (var b in bounties) @@ -35,21 +32,5 @@ public void UpdateEntries(List bounties, List= 0; i--) - { - BountyHistoryContainer.AddChild(new BountyHistoryEntry(history[i])); - } - } } } diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs index cb07e16a9c2..9b7fd754369 100644 --- a/Content.Client/Changelog/ChangelogWindow.xaml.cs +++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs @@ -8,8 +8,6 @@ using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; -using Robust.Shared; -using Robust.Shared.Configuration; using Robust.Shared.Console; namespace Content.Client.Changelog @@ -17,9 +15,8 @@ namespace Content.Client.Changelog [GenerateTypedNameReferences] public sealed partial class ChangelogWindow : FancyWindow { - [Dependency] private readonly ChangelogManager _changelog = default!; [Dependency] private readonly IClientAdminManager _adminManager = default!; - [Dependency] private readonly IConfigurationManager _cfg = default!; + [Dependency] private readonly ChangelogManager _changelog = default!; public ChangelogWindow() { @@ -70,22 +67,8 @@ private async void PopulateChangelog() Tabs.SetTabTitle(i++, Loc.GetString($"changelog-tab-title-{changelog.Name}")); } - // Try to get the current version from the build.json file - var version = _cfg.GetCVar(CVars.BuildVersion); - var forkId = _cfg.GetCVar(CVars.BuildForkId); - - var versionText = Loc.GetString("changelog-version-unknown"); - - // Make sure these aren't empty, like in a dev env - if (!string.IsNullOrEmpty(version) && !string.IsNullOrEmpty(forkId)) - { - versionText = Loc.GetString("changelog-version-tag", - ("fork", forkId), - ("version", version[..7])); // Only show the first 7 characters - } - - // if else statements are ugly, shut up - VersionLabel.Text = versionText; + var version = typeof(ChangelogWindow).Assembly.GetName().Version ?? new Version(1, 0); + VersionLabel.Text = Loc.GetString("changelog-version-tag", ("version", version.ToString())); TabsUpdated(); } diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs b/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs index d5cc4ecfa9a..9047624f49b 100644 --- a/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs +++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleBoundUserInterface.cs @@ -39,8 +39,6 @@ protected override void Open() SendMessage(new CriminalRecordChangeStatus(status, null)); _window.OnDialogConfirmed += (status, reason) => SendMessage(new CriminalRecordChangeStatus(status, reason)); - _window.OnStatusFilterPressed += (statusFilter) => - SendMessage(new CriminalRecordSetStatusFilter(statusFilter)); _window.OnHistoryUpdated += UpdateHistory; _window.OnHistoryClosed += () => _historyWindow?.Close(); _window.OnClose += Close; diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml index d36718cf08b..77da0ba1b06 100644 --- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml +++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml @@ -1,142 +1,36 @@ + xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" + Title="{Loc 'criminal-records-console-window-title'}" + MinSize="660 400"> - - - - - - + + + + + + + + + - - - - -