Class SustainPlan
java.lang.Object
privbot.mechanics.SustainPlan
What to eat and drink, and when. A plan is data: thresholds and item names in preference order. Build one with
builder() and hand it to SustainPolicy.
What it proves: nothing by itself. A threshold left at 0 means that rule is off. Item lists are in the order the policy tries them; the first name the inventory holds with the right action wins.
Unreadable looks like: not applicable here; a plan holds no reads.
Thread rule: immutable once built, except the BoostDosePolicy objects handed to
SustainPlan.Builder.boost(net.runelite.api.Skill, privbot.mechanics.BoostDosePolicy, java.lang.String...), which keep their own state and belong to one worker thread.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboostPolicy(net.runelite.api.Skill skill) net.runelite.api.SkillboostSkillFor(String itemName) Set<net.runelite.api.Skill> static SustainPlan.Builderbuilder()
-
Method Details
-
boostSkills
- Returns:
- the skills that have a boost rule, in the order they were added
-
boostPolicy
- Returns:
- the dose policy for
skill, or null when the plan has no boost rule for it
-
boostSkillFor
- Parameters:
itemName- a carried item name- Returns:
- the skill whose boost rule owns this dose (its policy says it is a dose, or it is one of the listed dose names), or null when no boost rule claims it
-
builder
- Returns:
- a new builder with every rule off
-