aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java
index 667e32331..bb7ea595b 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/laneswitch/FarmingLaneConfig.java
@@ -2,13 +2,18 @@ package at.hannibal2.skyhanni.config.features.garden.laneswitch;
import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.core.config.Position;
+import at.hannibal2.skyhanni.features.garden.CropType;
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.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText;
import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+import java.util.ArrayList;
+import java.util.List;
+
public class FarmingLaneConfig {
@Expose
@@ -37,4 +42,11 @@ public class FarmingLaneConfig {
@FeatureToggle
public boolean cornerWaypoints = false;
+ @Expose
+ @ConfigOption(
+ name = "Ignored Crops",
+ desc = "Add the crops you wish to not setup a lane for."
+ )
+ @ConfigEditorDraggableList()
+ public List<CropType> ignoredCrops = new ArrayList<>();
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
index ba0eaee5d..b9b091e53 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
@@ -43,6 +43,7 @@ object FarmingLaneAPI {
private fun warnNoLane(crop: CropType?) {
if (crop == null || currentLane != null) return
+ if (crop in config.ignoredCrops) return
if (!GardenAPI.hasFarmingToolInHand()) return
if (FarmingLaneCreator.detection) return
if (!config.distanceDisplay && !config.laneSwitchNotification.enabled) return