tModLoader v2024.05
A mod to make and play Terraria mods
CustomCurrencySystem Class Reference

Inherited by CustomCurrencySingleCoin.

Public Member Functions

virtual bool Accepts (Item item)
virtual long CombineStacks (out bool overFlowing, params long[] coinCounts)
virtual long CountCurrency (out bool overFlowing, Item[] inv, params int[] ignoreSlots)
virtual void DrawSavingsMoney (SpriteBatch sb, string text, float shopx, float shopy, long totalCoins, bool horizontal=false)
virtual void GetItemExpectedPrice (Item item, out long calcForSelling, out long calcForBuying)
virtual void GetPriceText (string[] lines, ref int currentLine, long price)
void Include (int coin, int howMuchIsItWorth)
void SetCurrencyCap (long cap)
virtual bool TryPurchasing (long price, List< Item[]> inv, List< Point > slotCoins, List< Point > slotsEmpty, List< Point > slotEmptyBank, List< Point > slotEmptyBank2, List< Point > slotEmptyBank3, List< Point > slotEmptyBank4)

Protected Member Functions

List< Tuple< Point, Item > > ItemCacheCreate (List< Item[]> inventories)
void ItemCacheRestore (List< Tuple< Point, Item > > cache, List< Item[]> inventories)
int SortByHighest (Tuple< int, int > valueA, Tuple< int, int > valueB)

Protected Attributes

Dictionary< int, int > _valuePerUnit = new Dictionary<int, int>()


long CurrencyCap [get]