Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
user424242420 committed May 23, 2024
1 parent 0467d1e commit 6cd7d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions Content.Server/PDA/PdaSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ public void UpdatePdaUi(EntityUid uid, PdaComponent? pda = null, EntityUid? acto

var programs = _cartridgeLoader.GetAvailablePrograms(uid, loader);
var id = CompOrNull<IdCardComponent>(pda.ContainedId);
ulong balance = 0;
if (actor_uid != null)
if (TryComp<BankAccountComponent>(actor_uid, out var account))
var balance = 0;
if (actor_uid != null && TryComp<BankAccountComponent>(actor_uid, out var account))
balance = account.Balance;

var state = new PdaUpdateState(
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/PDA/PdaUpdateState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NetEntity> programs,
Expand All @@ -27,7 +27,7 @@ public PdaUpdateState(
bool hasPai,
bool hasBook,
PdaIdInfoText pdaOwnerInfo,
ulong balance,
int balance,
string? stationName,
bool hasUplink = false,
bool canPlayMusic = false,
Expand Down

0 comments on commit 6cd7d9d

Please sign in to comment.