tModLoader v2025.03
A mod to make and play Terraria mods
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
OneFromRulesRule Class Reference

Inherits IItemDropRule, and INestedItemDropRule.

Public Member Functions

 OneFromRulesRule (int chanceDenominator, int chanceNumerator, params IItemDropRule[] options)
 
 OneFromRulesRule (int chanceDenominator, params IItemDropRule[] options)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 

Public Attributes

int chanceDenominator
 
int chanceNumerator
 
IItemDropRule[] options
 

Properties

List< IItemDropRuleChainAttemptChainedRules [get]
 
- Properties inherited from IItemDropRule
List< IItemDropRuleChainAttemptChainedRules [get]
 

Member Function Documentation

◆ CanDrop()

bool OneFromRulesRule.CanDrop ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ ReportDroprates()

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

Implements IItemDropRule.

◆ TryDroppingItem() [1/2]

ItemDropAttemptResult OneFromRulesRule.TryDroppingItem ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ TryDroppingItem() [2/2]

ItemDropAttemptResult OneFromRulesRule.TryDroppingItem ( DropAttemptInfo  info,
ItemDropRuleResolveAction  resolveAction 
)

Implements INestedItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> OneFromRulesRule.ChainedRules
get

Implements IItemDropRule.