Vixen
c7401864
csharp
public readonly record struct EconomyAccount

One side of a movement: a player, or a place in the world that is not one.

Read the guide page for this →

Remarks

The gameplay-side mirror of doc 27's LedgerAccount, and it has to be a mirror rather than the thing itself — the ledger is Live/'s and doc 28's spine says Gameplay/ may not reference it. So this library says what must move and the realm translates, which is task #27's bridge and the same shape IPityStore has.

⚠ Exactly one of the two, which is what makes a movement checkable. An account that was both a player and a world sink is one a balanced intent could route round; an account that was neither is a movement into nowhere that still balances.

Fields and properties (9)

  • public PlayerId Player

    Whose it is, or None.

  • public string World

    What it is called, for an account that is not a player's.

  • public const string Vendor

    Where a vendor's goods and takings come from and go.

  • public const string Sink

    Where currency goes to be destroyed. The thing an economy needs most of.

  • public const string Escrow

    Where a trade's goods sit while both parties are deciding.

  • public const string Mail

    Where an unclaimed attachment waits.

  • public static EconomyAccount Nowhere

    No account.

  • public bool IsValid

    Whether it names exactly one thing.

  • public bool IsPlayer

    Whether it is somebody's.

Methods (4)

  • public EconomyAccount(PlayerId Player, string World)

    One side of a movement: a player, or a place in the world that is not one.

  • public static EconomyAccount Of(PlayerId player)

    A player's account.

  • public static EconomyAccount Of(string name)

    A world account.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (18)

  • SoakMmo.Soak
  • AssetMoveVixen.Gameplay.Economy
  • AuctionHouseVixen.Gameplay.Economy
  • EconomyIntentVixen.Gameplay.Economy
  • HousekeepingTestsVixen.Live.Gameplay.Tests
  • IEconomyLedgerVixen.Gameplay.Economy
  • KeyHorizonTestsVixen.Gameplay.Economy.Tests
  • LedgerBridgeVixen.Live.Gameplay
  • LedgerBridgeTestsVixen.Live.Gameplay.Tests
  • LedgerReleaseTestsVixen.Gameplay.Economy.Tests
  • LedgerTestsVixen.Gameplay.Economy.Tests
  • MarketFixtureVixen.Gameplay.Economy.Tests
  • MemoryEconomyLedgerVixen.Gameplay.Economy
  • PostOfficeVixen.Gameplay.Economy
  • TradeSessionVixen.Gameplay.Economy
  • TradeTestsVixen.Gameplay.Economy.Tests
  • VendorStateVixen.Gameplay.Economy
  • VendorTestsVixen.Gameplay.Economy.Tests