From 5e01624dcc315a2bf7665fc808b1113fa4c9e0d8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 13 Sep 2024 20:23:57 +0200 Subject: Feature: Graphs Pathfinding (#2468) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/config/features/dev/GraphConfig.java | 5 +++ .../features/event/hoppity/HoppityEggsConfig.java | 6 ++++ .../config/features/misc/AreaNavigationConfig.java | 32 +++++++++++++++++ .../config/features/misc/AreaPathfinderConfig.java | 41 ++++++++++++++++++++++ .../skyhanni/config/features/misc/MiscConfig.java | 4 +++ 5 files changed, 88 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaNavigationConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaPathfinderConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/GraphConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/GraphConfig.java index 9a2806f64..9eed8233c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/GraphConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/GraphConfig.java @@ -103,4 +103,9 @@ public class GraphConfig { @ConfigOption(name = "Shows Stats", desc = "Show funny extra statistics on save. May lag the game a bit.") @ConfigEditorBoolean public boolean showsStats = true; + + @Expose + @ConfigOption(name = "Use as Island Area", desc = "When saving, use the current edited graph as temporary island area for the current island.") + @ConfigEditorBoolean + public boolean useAsIslandArea = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java index c270dae8b..b438d83f5 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java @@ -50,6 +50,12 @@ public class HoppityEggsConfig { @FeatureToggle public boolean showLine = false; + @Expose + @ConfigOption(name = "Show Path Finder", desc = "Show a pathfind to the next hoppity egg.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showPathFinder = false; + @Expose @ConfigOption(name = "Show All Waypoints", desc = "Show all possible egg waypoints for the current lobby. §e" + "Only works when you don't have an Egglocator in your inventory.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaNavigationConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaNavigationConfig.java new file mode 100644 index 000000000..38a399ed4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaNavigationConfig.java @@ -0,0 +1,32 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.Accordion; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class AreaNavigationConfig { + + @Expose + @ConfigOption(name = "Area Path Finder", desc = "") + @Accordion + public AreaPathfinderConfig pathfinder = new AreaPathfinderConfig(); + + @Expose + @ConfigOption(name = "In World", desc = "Shows the area names in world") + @ConfigEditorBoolean + @FeatureToggle + public boolean inWorld = false; + + @Expose + @ConfigOption(name = "Small Areas", desc = "Include small areas.") + @ConfigEditorBoolean + public boolean includeSmallAreas = false; + + @Expose + @ConfigOption(name = "Title on Enter", desc = "Sends a titles on screen when entering an area.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enterTitle = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaPathfinderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaPathfinderConfig.java new file mode 100644 index 000000000..af9b1de64 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/AreaPathfinderConfig.java @@ -0,0 +1,41 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +public class AreaPathfinderConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "While in your invenotry, show all areas of the island. Click on an area to display the path to this area.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Show Always", desc = "Show the list always, not only while inside the inventory.") + @ConfigEditorBoolean + public boolean showAlways = false; + + @Expose + @ConfigOption(name = "Current Area", desc = "Show the name of the current area at the top of the list") + @ConfigEditorBoolean + public Property includeCurrentArea = Property.of(false); + + @Expose + @ConfigOption( + name = "Path Color", + desc = "Change the color of the path." + ) + @ConfigEditorColour + public Property color = Property.of("0:245:85:255:85"); + + @Expose + @ConfigLink(owner = AreaPathfinderConfig.class, field = "enabled") + public Position position = new Position(20, 20); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index f3b9ab16e..03b0bf779 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -42,6 +42,10 @@ public class MiscConfig { @Category(name = "Stranded", desc = "Features for the Stranded game mode.") public StrandedConfig stranded = new StrandedConfig(); + @Expose + @Category(name = "Area Navigation", desc = "Helps navigate to different areas on the current island.") + public AreaNavigationConfig areaNavigation = new AreaNavigationConfig(); + @ConfigOption(name = "Hide Armor", desc = "") @Accordion @Expose -- cgit