Class SustainOutcome
ctx.sustain.maintain did. Plain immutable data.
What it proves: SustainOutcome.Kind.ACTED means the named item's carried count dropped within 1200 ms of the click,
so something was really consumed. SustainOutcome.Kind.NOTHING means everything needed was read and nothing was due.
SustainOutcome.Kind.OUT_OF means a need was read and nothing carried can meet it; reason() says which
("food" for hitpoints, "boost" for a boost that is due but has no dose carried), so a plugin can
tell a missing dose from being out of food. SustainOutcome.Kind.FAILED means the click was refused or the count did not
drop, so nothing is known to have been consumed.
A combo eat sends the combo food's click straight after the first food's; comboLanded() says whether
the combo food's count dropped too. It is only meaningful when a combo was attempted (ACTED after an Eat with a
combo food in the plan and carried); everywhere else it is false.
Unreadable looks like: SustainOutcome.Kind.UNREADABLE means the inventory, hitpoints or max hitpoints could not be
read, or the inventory could not be read to confirm a click. It is not NOTHING and not FAILED.
Thread rule: immutable, safe on any thread.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SustainOutcomeAn item was consumed (proved by its count dropping); no combo was involved or it did not land.static SustainOutcomeAn item was consumed (proved by its count dropping).booleanstatic SustainOutcomeAn item was chosen but not shown to be consumed.item()kind()static SustainOutcomeNothing was due.static SustainOutcomeA need was read and nothing carried meets it;whatis "food" or "boost".reason()toString()static SustainOutcomeunreadable(String why) Something needed could not be read.static SustainOutcomeunreadable(String item, String why) An item was clicked but the inventory could not be read to see whether it was consumed.
-
Method Details
-
acted
An item was consumed (proved by its count dropping); no combo was involved or it did not land. -
acted
An item was consumed (proved by its count dropping).- Parameters:
comboLanded- whether a combo food sent with it was consumed too (false when none was sent)
-
nothing
Nothing was due. -
outOf
A need was read and nothing carried meets it;whatis "food" or "boost". -
unreadable
Something needed could not be read. -
unreadable
An item was clicked but the inventory could not be read to see whether it was consumed. -
failed
An item was chosen but not shown to be consumed. -
kind
- Returns:
- the kind of outcome
-
item
- Returns:
- for ACTED the first item consumed; for FAILED, or UNREADABLE after a click, the item that was clicked (null when none was chosen); otherwise null
-
reason
- Returns:
- a short plain-words reason (never null); for OUT_OF it is "food" or "boost"
-
comboLanded
public boolean comboLanded()- Returns:
- true when a combo food was sent with the first Eat and its count dropped too. Only meaningful when a combo was attempted; false otherwise, including every outcome that is not ACTED
-
toString
-