tModLoader v2024.11
A mod to make and play Terraria mods
CustomCurrencySingleCoin Class Reference

Inherits CustomCurrencySystem.

Public Member Functions

 CustomCurrencySingleCoin (int coinItemID, long currencyCap)
 
override void DrawSavingsMoney (SpriteBatch sb, string text, float shopx, float shopy, long totalCoins, bool horizontal=false)
 
override void GetPriceText (string[] lines, ref int currentLine, long price)
 
override 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)
 
- Public Member Functions inherited from CustomCurrencySystem
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)
 

Public Attributes

float CurrencyDrawScale = 0.8f
 
Color CurrencyTextColor = new Color(240, 100, 120)
 
string CurrencyTextKey = "Currency.DefenderMedals"
 

Additional Inherited Members

- Protected Member Functions inherited from CustomCurrencySystem
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 inherited from CustomCurrencySystem
Dictionary< int, int > _valuePerUnit = new Dictionary<int, int>()
 
- Properties inherited from CustomCurrencySystem
long CurrencyCap [get]
 

Member Function Documentation

◆ DrawSavingsMoney()

override void CustomCurrencySingleCoin.DrawSavingsMoney ( SpriteBatch  sb,
string  text,
float  shopx,
float  shopy,
long  totalCoins,
bool  horizontal = false 
)
virtual

Reimplemented from CustomCurrencySystem.

◆ GetPriceText()

override void CustomCurrencySingleCoin.GetPriceText ( string[]  lines,
ref int  currentLine,
long  price 
)
virtual

Reimplemented from CustomCurrencySystem.

◆ TryPurchasing()

override bool CustomCurrencySingleCoin.TryPurchasing ( long  price,
List< Item[]>  inv,
List< Point >  slotCoins,
List< Point >  slotsEmpty,
List< Point >  slotEmptyBank,
List< Point >  slotEmptyBank2,
List< Point >  slotEmptyBank3,
List< Point >  slotEmptyBank4 
)
virtual

Reimplemented from CustomCurrencySystem.