tModLoader v2024.03
A mod to make and play Terraria mods
FewFromRulesRule Class Reference

Runs multiple drop rules if successes. More...

Inherits IItemDropRule, and INestedItemDropRule.

Public Member Functions

 FewFromRulesRule (int amount, 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 amount
 
int chanceDenominator
 
IItemDropRule[] options
 

Properties

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

Detailed Description

Runs multiple drop rules if successes.

Member Function Documentation

◆ CanDrop()

bool FewFromRulesRule.CanDrop ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ ReportDroprates()

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

Implements IItemDropRule.

◆ TryDroppingItem() [1/2]

ItemDropAttemptResult FewFromRulesRule.TryDroppingItem ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ TryDroppingItem() [2/2]

ItemDropAttemptResult FewFromRulesRule.TryDroppingItem ( DropAttemptInfo  info,
ItemDropRuleResolveAction  resolveAction 
)

Implements INestedItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> FewFromRulesRule.ChainedRules
get

Implements IItemDropRule.