tModLoader v2024.09
A mod to make and play Terraria mods
AlwaysAtleastOneSuccessDropRule Class Reference

Re-runs all drop rules if none succeeded. More...

Inherits IItemDropRule, and INestedItemDropRule.

Public Member Functions

 AlwaysAtleastOneSuccessDropRule (params IItemDropRule[] rules)
 
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)
 

Static Public Member Functions

static float GetPersonalDropRate (IItemDropRule rule)
 

Public Attributes

IItemDropRule[] rules
 

Properties

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

Detailed Description

Re-runs all drop rules if none succeeded.

Member Function Documentation

◆ CanDrop()

bool AlwaysAtleastOneSuccessDropRule.CanDrop ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ ReportDroprates()

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

Implements IItemDropRule.

◆ TryDroppingItem() [1/2]

ItemDropAttemptResult AlwaysAtleastOneSuccessDropRule.TryDroppingItem ( DropAttemptInfo  info)

Implements IItemDropRule.

◆ TryDroppingItem() [2/2]

ItemDropAttemptResult AlwaysAtleastOneSuccessDropRule.TryDroppingItem ( DropAttemptInfo  info,
ItemDropRuleResolveAction  resolveAction 
)

Implements INestedItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> AlwaysAtleastOneSuccessDropRule.ChainedRules
get

Implements IItemDropRule.