summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features/garden/MoneyPerHourConfig.java
blob: 244c35b9d282fa587bd08806af3cd868e2e3d54c (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
package at.hannibal2.skyhanni.config.features.garden;

import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.HasLegacyId;
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.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

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

import static at.hannibal2.skyhanni.config.features.garden.MoneyPerHourConfig.CustomFormatEntry.INSTANT_SELL;
import static at.hannibal2.skyhanni.config.features.garden.MoneyPerHourConfig.CustomFormatEntry.NPC_PRICE;
import static at.hannibal2.skyhanni.config.features.garden.MoneyPerHourConfig.CustomFormatEntry.SELL_OFFER;

public class MoneyPerHourConfig {
    @Expose
    @ConfigOption(name = "Show Money per Hour",
        desc = "Display the money per hour YOU get with YOUR crop/minute value when selling the item to bazaar.\n" +
            "Supports Bountiful, Mushroom Cow Perk, Armor Crops and Dicer Drops. Their toggles are below.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean display = false;

    // TODO moulconfig runnable support
    @Expose
    @ConfigOption(name = "Only Show Top", desc = "Only show the best # items.")
    @ConfigEditorSlider(
        minValue = 1,
        maxValue = 25,
        minStep = 1
    )
    public int showOnlyBest = 5;

    @Expose
    @ConfigOption(name = "Extend Top List", desc = "Add current crop to the list if its lower ranked than the set limit by extending the list.")
    @ConfigEditorBoolean
    public boolean showCurrent = true;

    // TODO moulconfig runnable support
    @Expose
    @ConfigOption(
        name = "Always On",
        desc = "Always show the money/hour Display while in the garden.")
    @ConfigEditorBoolean
    public boolean alwaysOn = false;

    @Expose
    @ConfigOption(
        name = "Compact Mode",
        desc = "Hide the item name and the position number.")
    @ConfigEditorBoolean
    public boolean compact = false;

    @Expose
    @ConfigOption(
        name = "Compact Price",
        desc = "Show the price more compact.")
    @ConfigEditorBoolean
    public boolean compactPrice = false;

    @Expose
    @ConfigOption(
        name = "Use Custom",
        desc = "Use the custom format below instead of classic ➜ §eSell Offer §7and other profiles ➜ §eNPC Price.")
    @ConfigEditorBoolean
    public boolean useCustomFormat = false;

    @Expose
    @ConfigOption(
        name = "Custom Format",
        desc = "Set what prices to show")
    @ConfigEditorDraggableList(
        requireNonEmpty = true
    )
    public List<CustomFormatEntry> customFormat = new ArrayList<>(Arrays.asList(
        SELL_OFFER,
        INSTANT_SELL,
        NPC_PRICE
    ));

    public enum CustomFormatEntry implements HasLegacyId {
        SELL_OFFER("§eSell Offer", 0),
        INSTANT_SELL("§eInstant Sell", 1),
        NPC_PRICE("§eNPC Price", 2),
        ;

        private final String str;
        private final int legacyId;

        CustomFormatEntry(String str, int legacyId) {
            this.str = str;
            this.legacyId = legacyId;
        }

        // Constructor if new enum elements are added post-migration
        CustomFormatEntry(String str) {
            this(str, -1);
        }

        @Override
        public int getLegacyId() {
            return legacyId;
        }

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

    @Expose
    @ConfigOption(
        name = "Merge Seeds",
        desc = "Merge the seeds price with the wheat price.")
    @ConfigEditorBoolean
    public boolean mergeSeeds = true;

    @Expose
    @ConfigOption(
        name = "Include Bountiful",
        desc = "Include the coins from Bountiful in the calculation.")
    @ConfigEditorBoolean
    public boolean bountiful = true;

    @Expose
    @ConfigOption(
        name = "Include Mooshroom Cow",
        desc = "Include the coins you get from selling the mushrooms from your Mooshroom Cow pet.")
    @ConfigEditorBoolean
    public boolean mooshroom = true;

    @Expose
    @ConfigOption(
        name = "Include Armor Drops",
        desc = "Include the average coins/hr from your armor.")
    @ConfigEditorBoolean
    public boolean armor = true;

    @Expose
    @ConfigOption(
        name = "Include Dicer Drops",
        desc = "Include the average coins/hr from your melon or pumpkin dicer.")
    @ConfigEditorBoolean
    public boolean dicer = true;

    @Expose
    @ConfigOption(
        name = "Hide Title",
        desc = "Hide the first line of 'Money Per Hour' entirely.")
    @ConfigEditorBoolean
    public boolean hideTitle = false;

    @Expose
    @ConfigLink(owner = MoneyPerHourConfig.class, field = "display")
    public Position pos = new Position(-330, 170, false, true);
}