forked from Ninjabrain1/Ninjabrain-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to activate boat mode by default
- Loading branch information
1 parent
d54fbfc
commit 7854e18
Showing
9 changed files
with
69 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/ninjabrainbot/model/actions/boat/ResetBoatStateAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package ninjabrainbot.model.actions.boat; | ||
|
||
import ninjabrainbot.model.actions.IAction; | ||
import ninjabrainbot.model.datastate.IDataState; | ||
import ninjabrainbot.model.datastate.highprecision.IBoatDataState; | ||
|
||
public class ResetBoatStateAction implements IAction { | ||
|
||
private final IDataState dataState; | ||
|
||
public ResetBoatStateAction(IDataState dataState) { | ||
this.dataState = dataState; | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if (dataState.locked().get()) | ||
return; | ||
|
||
IBoatDataState boatDataState = dataState.boatDataState(); | ||
boatDataState.enteringBoat().reset(); | ||
boatDataState.boatState().reset(); | ||
boatDataState.boatAngle().reset(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters