aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
index 508cc93d..2601b67f 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
@@ -46,12 +46,15 @@ public class GeneralRoomProcessor implements RoomProcessor {
private DungeonRoom dungeonRoom;
public GeneralRoomProcessor(DungeonRoom dungeonRoom) {
this.dungeonRoom = dungeonRoom;
- if (FeatureRegistry.SECRET_AUTO_START.isEnabled())
- searchForNextTarget();
}
+ private boolean ticked = false;
@Override
public void tick() {
+ if (!ticked && FeatureRegistry.SECRET_AUTO_START.isEnabled())
+ searchForNextTarget();
+
+ ticked = true;
if (path != null) {
path.onTick();
if (FeatureRegistry.SECRET_AUTO_BROWSE_NEXT.isEnabled() && path.getCurrentAction() instanceof ActionComplete) {
@@ -184,6 +187,9 @@ public class GeneralRoomProcessor implements RoomProcessor {
public void pathfind(String mechanic, String state) {
path = new ActionRoute(getDungeonRoom(), mechanic, state);
}
+ public void cancel() {
+ path = null;
+ }
@Override
public void onPostGuiRender(GuiScreenEvent.DrawScreenEvent.Post event) {