From 33761ab50c2ea14452a15e422578326405bc5136 Mon Sep 17 00:00:00 2001 From: Ivan Rubinov Date: Wed, 22 May 2024 21:12:39 +0300 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B5=D0=BA=D0=B2=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/PDA/PdaMenu.xaml.cs | 6 ++---- Content.Server/PDA/PdaSystem.cs | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Content.Client/PDA/PdaMenu.xaml.cs b/Content.Client/PDA/PdaMenu.xaml.cs index 2ba4a8a588e..e6c4b82a918 100644 --- a/Content.Client/PDA/PdaMenu.xaml.cs +++ b/Content.Client/PDA/PdaMenu.xaml.cs @@ -32,7 +32,8 @@ public sealed partial class PdaMenu : PdaWindow private string _stationName = Loc.GetString("comp-pda-ui-unknown"); private string _alertLevel = Loc.GetString("comp-pda-ui-unknown"); private string _instructions = Loc.GetString("comp-pda-ui-unknown"); - private string _balance = Loc.GetString("comp-pda-ui-balance", ("balance", 0)); + private string _balance = 0; + private int _currentView; @@ -131,9 +132,6 @@ public PdaMenu() _clipboard.SetText(_instructions); }; - - - HideAllViews(); ToHomeScreen(); } diff --git a/Content.Server/PDA/PdaSystem.cs b/Content.Server/PDA/PdaSystem.cs index 33a0eb9fc97..9bb1c250b6c 100644 --- a/Content.Server/PDA/PdaSystem.cs +++ b/Content.Server/PDA/PdaSystem.cs @@ -167,11 +167,10 @@ public void UpdatePdaUi(EntityUid uid, PdaComponent? pda = null, EntityUid? acto var programs = _cartridgeLoader.GetAvailablePrograms(uid, loader); var id = CompOrNull(pda.ContainedId); ulong balance = 0; - if (actor_uid != null){ - if (TryComp(actor_uid, out var bank)) { + if (actor_uid != null) + if (TryComp(actor_uid, out var bank)) balance = (ulong)bank.Balance; - } - } + var state = new PdaUpdateState( programs, GetNetEntity(loader.ActiveProgram),