Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Chains.cs
Go to the documentation of this file.
2
4
5public static class Chains
6{
8 {
9 public bool hideLootReport;
10
11 public IItemDropRule RuleToChain { get; private set; }
12
14 {
16 this.hideLootReport = hideLootReport;
17 }
18
20 {
21 return parentResult.State == ItemDropAttemptResultState.FailedRandomRoll;
22 }
23
31 }
32
34 {
35 public bool hideLootReport;
36
37 public IItemDropRule RuleToChain { get; private set; }
38
40 {
42 this.hideLootReport = hideLootReport;
43 }
44
46 {
47 return parentResult.State == ItemDropAttemptResultState.Success;
48 }
49
57 }
58
60 {
61 public bool hideLootReport;
62
63 public IItemDropRule RuleToChain { get; private set; }
64
66 {
68 this.hideLootReport = hideLootReport;
69 }
70
72 {
73 return parentResult.State == ItemDropAttemptResultState.DoesntFillConditions;
74 }
75
83 }
84
92
93 public static IItemDropRule OnFailedRoll(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport = false)
94 {
95 rule.ChainedRules.Add(new TryIfFailedRandomRoll(ruleToChain, hideLootReport));
96 return ruleToChain;
97 }
98
99 public static IItemDropRule OnSuccess(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport = false)
100 {
101 rule.ChainedRules.Add(new TryIfSucceeded(ruleToChain, hideLootReport));
102 return ruleToChain;
103 }
104
105 public static IItemDropRule OnFailedConditions(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport = false)
106 {
107 rule.ChainedRules.Add(new TryIfDoesntFillConditions(ruleToChain, hideLootReport));
108 return ruleToChain;
109 }
110}
void Add(TKey key, TValue value)
bool CanChainIntoRule(ItemDropAttemptResult parentResult)
Definition Chains.cs:71
void ReportDroprates(float personalDropRate, List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
Definition Chains.cs:76
TryIfDoesntFillConditions(IItemDropRule rule, bool hideLootReport=false)
Definition Chains.cs:65
void ReportDroprates(float personalDropRate, List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
Definition Chains.cs:24
bool CanChainIntoRule(ItemDropAttemptResult parentResult)
Definition Chains.cs:19
TryIfFailedRandomRoll(IItemDropRule rule, bool hideLootReport=false)
Definition Chains.cs:13
bool CanChainIntoRule(ItemDropAttemptResult parentResult)
Definition Chains.cs:45
TryIfSucceeded(IItemDropRule rule, bool hideLootReport=false)
Definition Chains.cs:39
void ReportDroprates(float personalDropRate, List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
Definition Chains.cs:50
static void ReportDroprates(List< IItemDropRuleChainAttempt > ChainedRules, float personalDropRate, List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
Definition Chains.cs:85
static IItemDropRule OnFailedConditions(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
Definition Chains.cs:105
static IItemDropRule OnFailedRoll(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
Definition Chains.cs:93
static IItemDropRule OnSuccess(this IItemDropRule rule, IItemDropRule ruleToChain, bool hideLootReport=false)
Definition Chains.cs:99
void ReportDroprates(List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)