Skip to main content

PlayerGoldBankAccountData

A class in Root.Township, the global namespace.

Server: the saved contents of a player's gold bank account (one coin count), stored per player as a small binary file. While an ATM is open for the player it reads through to the ATM.

Constructors​

MemberWhat it is
PlayerGoldBankAccountData()Creates a PlayerGoldBankAccountData with default values.

Fields​

1 private and internal field
MemberWhat it is
private int quantityBacking field for Quantity when no ATM is open.

Properties​

MemberWhat it is
ATMMachine CurrentAtm { get; set; }The ATMMachine the player is using right now, or null. While set, Quantity reads and writes go through it.
int Quantity { get; set; }Coins in the account. Reads the ATM teller amount while an ATM is open, and setting it updates that ATM.

Methods​

MemberWhat it is
override IAltaFileFormat Clone()Returns a copy with the same quantity.
override void ReadFrom(FileInfo info, Stream stream)Reads the quantity as one 32-bit integer.
override void WriteTo(Stream stream, CancellationToken token)Writes the quantity as one 32-bit integer.