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

Inherits IItemDropRule.

Public Member Functions

 CoinsRule (long value, bool withRandomBonus=false)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 

Static Public Member Functions

static IEnumerable<(int itemId, int count)> ToCoins (long money)
 

Public Attributes

long value
 
bool withRandomBonus = false
 

Properties

List< IItemDropRuleChainAttemptChainedRules = new() [get]
 
- Properties inherited from IItemDropRule
List< IItemDropRuleChainAttemptChainedRules [get]
 

Member Function Documentation

◆ CanDrop()

bool CoinsRule.CanDrop ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ ReportDroprates()

void CoinsRule.ReportDroprates ( List< DropRateInfo drops,
DropRateInfoChainFeed  ratesInfo 
)

Implements IItemDropRule.

◆ TryDroppingItem()

ItemDropAttemptResult CoinsRule.TryDroppingItem ( DropAttemptInfo  info)

Implements IItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> CoinsRule.ChainedRules = new()
get

Implements IItemDropRule.