]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fixed station records console item list selection (#20369)
authorArtur <thearturzh@gmail.com>
Fri, 22 Sep 2023 19:57:05 +0000 (22:57 +0300)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2023 19:57:05 +0000 (14:57 -0500)
Content.Client/StationRecords/GeneralStationRecordConsoleBoundUserInterface.cs
Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs

index f888f7e80a810aa29425f47692aab057ae63a996..841ea7e79e16fc6199881b3c43ff320f2f6e200a 100644 (file)
@@ -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<SharedStationRecordsSystem>().Convert(key)));
+        SendMessage(new SelectGeneralStationRecord(key));
     }
 
     private void OnFiltersChanged(
index b629773708bb70cb405a40c6ab63237d9cf9dc00..c71b115c7a9ddd2b785d0262bb6771a0c549618d 100644 (file)
@@ -11,7 +11,7 @@ namespace Content.Client.StationRecords;
 [GenerateTypedNameReferences]
 public sealed partial class GeneralStationRecordConsoleWindow : DefaultWindow
 {
-    public Action<StationRecordKey?>? OnKeySelected;
+    public Action<(NetEntity, uint)?>? OnKeySelected;
 
     public Action<GeneralStationRecordFilterType, string>? 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<NetEntity, uint> cast)
             {
                 return;
             }