diff options
author | syeyoung <cyoung06@naver.com> | 2021-09-18 12:29:50 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2021-09-18 12:29:50 +0900 |
commit | 3d42886e90d2d41603d5741a3d5d07907f7758fe (patch) | |
tree | 725c2c886d42fd9cb858a49bb9be326dbc6030d7 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | b5f5a1a613ab534e247c8eb04110344e2161d8d3 (diff) | |
download | Skyblock-Dungeons-Guide-3d42886e90d2d41603d5741a3d5d07907f7758fe.tar.gz Skyblock-Dungeons-Guide-3d42886e90d2d41603d5741a3d5d07907f7758fe.tar.bz2 Skyblock-Dungeons-Guide-3d42886e90d2d41603d5741a3d5d07907f7758fe.zip |
- Waypoints? and new JPS Pathfinding Algorithm
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java index 0fac0dba..72eb809b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java @@ -161,10 +161,12 @@ public class FeatureRegistry { public static final FeatureMechanicBrowse SECRET_BROWSE = register(new FeatureMechanicBrowse()); public static final FeatureActions SECRET_ACTIONS = register(new FeatureActions()); public static final FeatureSoulRoomWarning SECRET_FAIRYSOUL = register(new FeatureSoulRoomWarning()); - public static final SimpleFeature SECRET_AUTO_BROWSE_NEXT = register(new SimpleFeature("Dungeon Secret.Secret Pathfind", "Auto Pathfind to next secret", "Auto browse best next secret after current one completes.\nthe first pathfinding of first secret needs to be triggered first in order for this option to work", "secret.autobrowse", false)); - public static final SimpleFeature SECRET_AUTO_START = register(new SimpleFeature("Dungeon Secret.Secret Pathfind", "Auto pathfind to new secret", "Auto browse best secret upon entering the room.", "secret.autouponenter", false)); - public static final SimpleFeature SECRET_NEXT_KEY = register(new SimpleFeature("Dungeon Secret.Secret Pathfind", "Auto Pathfind to new secret upon pressing a key", "Auto browse the best next secret when you press key.\nChange key at your key settings (Settings -> Controls)", "secret.keyfornext", false)); + public static final SimpleFeature SECRET_AUTO_BROWSE_NEXT = register(new SimpleFeature("Dungeon Secret.Secret Pathfind.Legacy AutoPathfind", "Auto Pathfind to next secret", "Auto browse best next secret after current one completes.\nthe first pathfinding of first secret needs to be triggered first in order for this option to work", "secret.autobrowse", false)); + public static final SimpleFeature SECRET_AUTO_START = register(new SimpleFeature("Dungeon Secret.Secret Pathfind.Legacy AutoPathfind", "Auto pathfind to new secret", "Auto browse best secret upon entering the room.", "secret.autouponenter", false)); + public static final SimpleFeature SECRET_NEXT_KEY = register(new SimpleFeature("Dungeon Secret.Secret Pathfind.Legacy AutoPathfind", "Auto Pathfind to new secret upon pressing a key", "Auto browse the best next secret when you press key.\nChange key at your key settings (Settings -> Controls)", "secret.keyfornext", false)); + public static final SimpleFeature SECRET_PATHFIND_ALL = register(new SimpleFeature("Dungeon Secret.Secret Pathfind", "Start pathfind to all secrets upon entering a room", "Auto browse to all secrets in the room", "secret.secretpathfind.allbrowse", false)); public static final SimpleFeature SECRET_TOGGLE_KEY = register(new SimpleFeature("Dungeon Secret.Pathfind Display", "Toggle Pathfind Lines", "A key for toggling pathfound line visibility.\nChange key at your key settings (Settings -> Controls)", "secret.togglePathfind")); + public static final SimpleFeature SECRET_BEACONS = register(new SimpleFeature("Dungeon Secret.Pathfind Display", "Beacons on pathfind", "When pathfinding, display beacons as well as lines", "secret.beacons")); public static final SimpleFeature SECRET_FREEZE_LINES = register(new FeatureFreezePathfind()); public static final FeatureNicknamePrefix COSMETIC_PREFIX = register(new FeatureNicknamePrefix()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java index b62a168f..0ae1e668 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java @@ -115,9 +115,7 @@ public class FeatureActions extends TextHUDFeature { Point roomPt = context.getMapProcessor().worldPointToRoomPoint(thePlayer.getPosition()); DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt); - ActionRoute path = ((GeneralRoomProcessor)dungeonRoom.getRoomProcessor()).getPath(); - - if (path != null) { + for (ActionRoute path : ((GeneralRoomProcessor) dungeonRoom.getRoomProcessor()).getPath().values()) { actualBit.add(new StyledText("Pathfinding ","pathfinding")); actualBit.add(new StyledText(path.getMechanic()+" ","mechanic")); actualBit.add(new StyledText("-> ","separator")); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java index 72ce5e01..5a558a1e 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java @@ -93,10 +93,10 @@ public class PanelMechanicBrowser extends MPanelScaledGUI { GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); fr.drawString("Selected: ", 2,2, 0xFFAAAAAA); - if (grp.getPath() == null) + if (grp.getPath("MECH-BROWSER") == null) fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000); else { - ActionRoute route = grp.getPath(); + ActionRoute route = grp.getPath("MECH-BROWSER"); fr.drawString(route.getMechanic()+" -> "+route.getState(), fr.getStringWidth("Selected: ") + 2,2, 0xFFFFFF00); } fr.drawString("Open Chat to Select Secrets", 2, fr.FONT_HEIGHT + 5, 0xFFAAAAAA); @@ -256,7 +256,7 @@ public class PanelMechanicBrowser extends MPanelScaledGUI { for (String state : states) { mechanicBrowserTooltip.getMList().add(new MechanicBrowserElement(() -> state, false, (m2, pt2) -> { if (dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor) - ((GeneralRoomProcessor)dungeonRoom.getRoomProcessor()).pathfind(id, state); + ((GeneralRoomProcessor)dungeonRoom.getRoomProcessor()).pathfind("MECH-BROWSER", id, state); mechanicBrowserTooltip.close(); mechanicBrowserTooltip = null; })); @@ -276,7 +276,7 @@ public class PanelMechanicBrowser extends MPanelScaledGUI { if (!dungeonRoomOpt.isPresent()) return; DungeonRoom dungeonRoom = dungeonRoomOpt.get(); if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return; - ((GeneralRoomProcessor) dungeonRoom.getRoomProcessor()).cancel(); + ((GeneralRoomProcessor) dungeonRoom.getRoomProcessor()).cancel("MECH-BROWSER"); } public void toggleTooltip(boolean open) { |