Show / Hide Table of Contents

Class BankAccountManager

Inheritance
System.Object
BankAccountManager
Implements
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
Namespace: Eco.Gameplay.Economy
Assembly: Eco.Gameplay.dll
Syntax
[ChatCommandHandler]
public class BankAccountManager : Singleton<BankAccountManager>, IController, IViewController, IHasUniversalID, INotifyPropertyChanged

Constructors

BankAccountManager()

Declaration
public BankAccountManager()

Fields

MaxAccountsPerUser

Declaration
public int MaxAccountsPerUser
Field Value
Type Description
System.Int32

OnBankAccountChanged

Declaration
public ThreadSafeAction OnBankAccountChanged
Field Value
Type Description
ThreadSafeAction

Properties

Accounts

Declaration
public IEnumerable<BankAccount> Accounts { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<BankAccount>

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

Registrar

Declaration
public Registrar<BankAccount> Registrar { get; }
Property Value
Type Description
Registrar<BankAccount>

Methods

AddAccountManager(User, BankAccount, User)

Declaration
[ChatSubCommand]
public static void AddAccountManager(User user, BankAccount account, User target)
Parameters
Type Name Description
User user
BankAccount account
User target

AddAccountUser(User, BankAccount, User)

Declaration
[ChatSubCommand]
public static void AddAccountUser(User user, BankAccount account, User target)
Parameters
Type Name Description
User user
BankAccount account
User target

CreateAccount(User, String)

Declaration
[ChatSubCommand]
public static void CreateAccount(User user, string name = null)
Parameters
Type Name Description
User user
System.String name

DeleteAccount(User, BankAccount)

Declaration
[ChatSubCommand]
public static void DeleteAccount(User user, BankAccount account)
Parameters
Type Name Description
User user
BankAccount account

DirectTransfer(User, BankAccount, BankAccount, Currency, Single)

Public acessor for game action tests. Use Transfer(GameActionPack, TransferData) instead.

Declaration
public Result DirectTransfer(User user, BankAccount source, BankAccount target, Currency currency, float amount)
Parameters
Type Name Description
User user
BankAccount source
BankAccount target
Currency currency
System.Single amount
Returns
Type Description
Result

DisplayGovernmentAccounts(Player, Settlement)

Declaration
public void DisplayGovernmentAccounts(Player player, Settlement settlement)
Parameters
Type Name Description
Player player
Settlement settlement

Escrow()

Declaration
public BankAccount Escrow()
Returns
Type Description
BankAccount

GetAccountsForCurrency(Currency)

Declaration
public IEnumerable<(BankAccount, CurrencyHolding)> GetAccountsForCurrency(Currency currency)
Parameters
Type Name Description
Currency currency
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<BankAccount, CurrencyHolding>>

GetAccountsOfBackedCurrency()

Return a tuple of accounts and holdings for all backed currencies.

Declaration
public IEnumerable<(BankAccount, CurrencyHolding)> GetAccountsOfBackedCurrency()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<BankAccount, CurrencyHolding>>

GetBankAccount(Int32)

Declaration
public BankAccount GetBankAccount(int accountID)
Parameters
Type Name Description
System.Int32 accountID
Returns
Type Description
BankAccount

GetBankAccount(Int32, User, AccountAccess)

Declaration
public BankAccount GetBankAccount(int accountID, User user, AccountAccess access)
Parameters
Type Name Description
System.Int32 accountID
User user
AccountAccess access
Returns
Type Description
BankAccount

GetPersonalBankAccount(String)

Declaration
public PersonalBankAccount GetPersonalBankAccount(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
PersonalBankAccount

Initialize()

Declaration
public void Initialize()

RemoveAccountManager(User, BankAccount, User)

Declaration
[ChatSubCommand]
public static void RemoveAccountManager(User user, BankAccount account, User target)
Parameters
Type Name Description
User user
BankAccount account
User target

RemoveAccountUser(User, BankAccount, User)

Declaration
[ChatSubCommand]
public static void RemoveAccountUser(User user, BankAccount account, User target)
Parameters
Type Name Description
User user
BankAccount account
User target

SetAccountOwner(User, BankAccount, User)

Declaration
[ChatSubCommand]
public static void SetAccountOwner(User user, BankAccount account, User target)
Parameters
Type Name Description
User user
BankAccount account
User target

SpawnMoney(Currency, User, Single)

Declaration
public void SpawnMoney(Currency currency, User user, float amount)
Parameters
Type Name Description
Currency currency
User user
System.Single amount

Treasury()

Declaration
public BankAccount Treasury()
Returns
Type Description
BankAccount

TryCreateUserAccount(User)

Create a personal bank account for them with infinite amount of that currency.

Declaration
public void TryCreateUserAccount(User user)
Parameters
Type Name Description
User user

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾