using Robust.Shared.GameStates;
namespace Content.Shared.Cargo.Components;
///
/// Makes an entity a client of the station's bank account.
/// When its balance changes it will have raised on it.
/// Other systems can then use this for logic or to update ui states.
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedCargoSystem))]
[AutoGenerateComponentState]
public sealed partial class BankClientComponent : Component
{
///
/// The balance updated for the last station this entity was a part of.
///
[DataField, AutoNetworkedField]
public int Balance;
}
///
/// Raised on an entity with when the bank's balance is updated.
///
[ByRefEvent]
public readonly record struct BankBalanceUpdatedEvent(EntityUid Station, int Balance);