Refactored GalacticBankManager (#1089)

This commit is contained in:
DamianX
2020-06-12 18:31:57 +02:00
committed by GitHub
parent 48d9ffa78b
commit 7817681894
8 changed files with 161 additions and 152 deletions

View File

@@ -8,7 +8,20 @@ namespace Content.Server.Cargo
public string Name { get; }
public int Balance { get; set; }
private int _balance;
public int Balance
{
get => _balance;
set
{
if (_balance == value)
return;
_balance = value;
OnBalanceChange?.Invoke();
}
}
public event Action OnBalanceChange;
public CargoBankAccount(int id, string name, int balance)
{