From 6cd7d9dc1a03c958ea55953c14562ce8e8cad0f7 Mon Sep 17 00:00:00 2001 From: user424242420 <142989209+user424242420@users.noreply.github.com> Date: Thu, 23 May 2024 13:52:19 +0300 Subject: [PATCH] fix --- Content.Server/PDA/PdaSystem.cs | 5 ++--- Content.Shared/PDA/PdaUpdateState.cs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Content.Server/PDA/PdaSystem.cs b/Content.Server/PDA/PdaSystem.cs index edb99b35ec4..047d671c9a2 100644 --- a/Content.Server/PDA/PdaSystem.cs +++ b/Content.Server/PDA/PdaSystem.cs @@ -166,9 +166,8 @@ 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 account)) + var balance = 0; + if (actor_uid != null && TryComp(actor_uid, out var account)) balance = account.Balance; var state = new PdaUpdateState( diff --git a/Content.Shared/PDA/PdaUpdateState.cs b/Content.Shared/PDA/PdaUpdateState.cs index d3f406f5095..840f8c5ac1c 100644 --- a/Content.Shared/PDA/PdaUpdateState.cs +++ b/Content.Shared/PDA/PdaUpdateState.cs @@ -17,7 +17,7 @@ public sealed class PdaUpdateState : CartridgeLoaderUiState // WTF is this. what public bool HasUplink; public bool CanPlayMusic; public string? Address; - public ulong Balance; + public int Balance; public PdaUpdateState( List programs, @@ -27,7 +27,7 @@ public PdaUpdateState( bool hasPai, bool hasBook, PdaIdInfoText pdaOwnerInfo, - ulong balance, + int balance, string? stationName, bool hasUplink = false, bool canPlayMusic = false,