Record Class WalkStatus
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.WalkStatus
- Record Components:
state- walker state, one of:idle(this script has not asked for a walk),walking,arrived,cancelled,failed, orrefused_busy(another script was already walking this character, so nothing was started). Treat an unrecognised value as non-terminal rather than switching exhaustively — states are added additivelytargetX- target world tile XtargetY- target world tile YcurrentStep- current step in the local path segmenttotalSteps- total steps in the local path segment- current navigation step (for world paths with multiple segments)- total navigation stepsisWalking- whether the walker is currently activeisDone- whether the walk has completedhpaReady- whether the HPA* graph is ready for world pathfinding
public record WalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady)
extends Record
Current walker state.
The state is computed host-side by the walker that drives the character,
not reported by the game — so it describes what this host is trying to do,
and is scoped to the script that asked. See
NavigationAPI.getWalkStatus().
-
Constructor Summary
ConstructorsConstructorDescriptionWalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady) Creates an instance of aWalkStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentSteprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhpaReady()Returns the value of thehpaReadyrecord component.booleanisDone()Returns the value of theisDonerecord component.booleanReturns the value of theisWalkingrecord component.intnavStep()Returns the value of thenavSteprecord component.state()Returns the value of thestaterecord component.inttargetX()Returns the value of thetargetXrecord component.inttargetY()Returns the value of thetargetYrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalNavStepsrecord component.intReturns the value of thetotalStepsrecord component.
-
Constructor Details
-
WalkStatus
public WalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady) Creates an instance of aWalkStatusrecord class.- Parameters:
state- the value for thestaterecord componenttargetX- the value for thetargetXrecord componenttargetY- the value for thetargetYrecord componentcurrentStep- the value for thecurrentSteprecord componenttotalSteps- the value for thetotalStepsrecord componentnavStep- the value for thenavSteprecord componenttotalNavSteps- the value for thetotalNavStepsrecord componentisWalking- the value for theisWalkingrecord componentisDone- the value for theisDonerecord componenthpaReady- the value for thehpaReadyrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
state
-
targetX
-
targetY
-
currentStep
public int currentStep()Returns the value of thecurrentSteprecord component.- Returns:
- the value of the
currentSteprecord component
-
totalSteps
public int totalSteps()Returns the value of thetotalStepsrecord component.- Returns:
- the value of the
totalStepsrecord component
-
isWalking
-
isDone
-
hpaReady
-