Files
tbd-station-14/Content.Server/Cargo/CargoBankAccount.cs
2020-06-12 18:31:57 +02:00

34 lines
692 B
C#

using System;
namespace Content.Server.Cargo
{
public class CargoBankAccount : ICargoBankAccount
{
public int Id { get; }
public string Name { get; }
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)
{
Id = id;
Name = name;
Balance = balance;
}
}
}