summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java
blob: f9339451e775d18892c396001eb50020088702eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package at.hannibal2.skyhanni.config.features.garden;

import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.utils.LorenzColor;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PlotMenuHighlightingConfig {
    @Expose
    @ConfigOption(name = "Enabled", desc = "Highlight plots based on their status.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean enabled = false;

    @Expose
    @ConfigOption(name = "Statuses", desc = "Change which statuses are enabled, and the hierarchy of them.")
    @ConfigEditorDraggableList
    public List<PlotStatusType> deskPlotStatusTypes = new ArrayList<>(Arrays.asList(
        PlotStatusType.CURRENT,
        PlotStatusType.PESTS,
        PlotStatusType.SPRAYS,
        PlotStatusType.LOCKED
    ));

    public enum PlotStatusType {
        PESTS("§cPests", LorenzColor.RED),
        SPRAYS("§6Sprays", LorenzColor.GOLD),
        LOCKED("§7Locked", LorenzColor.DARK_GRAY),
        CURRENT("§aCurrent plot", LorenzColor.GREEN),
        PASTING("§ePasting", LorenzColor.YELLOW),
        ;

        public final String name;
        public final LorenzColor highlightColor;

        PlotStatusType(String name, LorenzColor highlightColor) {
            this.name = name;
            this.highlightColor = highlightColor;
        }

        @Override
        public String toString() {
            return name;
        }
    }
}