From: Artur Date: Fri, 22 Sep 2023 19:57:05 +0000 (+0300) Subject: fixed station records console item list selection (#20369) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bd513e623ce12c67377459586478dc16b201a4b1;p=space-station-14.git fixed station records console item list selection (#20369) --- diff --git a/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs b/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs index f888f7e80a..841ea7e79e 100644 --- a/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs +++ b/Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs @@ -24,9 +24,9 @@ public sealed class GeneralStationRecordConsoleBoundUserInterface : BoundUserInt _window.OpenCentered(); } - private void OnKeySelected(StationRecordKey? key) + private void OnKeySelected((NetEntity, uint)? key) { - SendMessage(new SelectGeneralStationRecord(EntMan.System().Convert(key))); + SendMessage(new SelectGeneralStationRecord(key)); } private void OnFiltersChanged( diff --git a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs index b629773708..c71b115c7a 100644 --- a/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs +++ b/Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs @@ -11,7 +11,7 @@ namespace Content.Client.StationRecords; [GenerateTypedNameReferences] public sealed partial class GeneralStationRecordConsoleWindow : DefaultWindow { - public Action? OnKeySelected; + public Action<(NetEntity, uint)?>? OnKeySelected; public Action? OnFiltersChanged; @@ -32,7 +32,7 @@ public sealed partial class GeneralStationRecordConsoleWindow : DefaultWindow RecordListing.OnItemSelected += args => { - if (_isPopulating || RecordListing[args.ItemIndex].Metadata is not StationRecordKey cast) + if (_isPopulating || RecordListing[args.ItemIndex].Metadata is not ValueTuple cast) { return; }