-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
109 lines (102 loc) · 3.56 KB
/
Copy pathconfig.js
File metadata and controls
109 lines (102 loc) · 3.56 KB
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
import Settings from "../Amaterasu/core/Settings"
import DefaultConfig from "../Amaterasu/core/DefaultConfig"
const version = JSON.parse(FileLib.read("BuskeAddons", "metadata.json")).version
const CHANGELOG = `# §bBuskeAddons v${version}\n ${FileLib.read("BuskeAddons", "changelog.md")}`
const CREDITS = FileLib.read("BuskeAddons", "CREDIT.md")
const defaultConf = new DefaultConfig("BuskeAddons", "data/settings.json")
defaultConf
.addButton({
category: "General",
configName: "MyDiscord",
title: "Discord Server",
description: "Join if you want to report a bug or want to make a suggestion",
onClick(setting) {
ChatLib.command("ct copy https://discord.gg/YourDiscordLink", true)
ChatLib.chat("&6Copied Discord Link!")
}
})
.addSwitch({
category: "Mining",
configName: "miningSpeedBoostAlert",
title: "Mining Speed Boost Alert",
description: "Play a sound when Mining Speed Boost is available"
})
.addSwitch({
category: "Exploration",
configName: "fairySoulCounter",
title: "Fairy Soul Counter",
description: "Count and display found Fairy Souls (max 247)"
})
.addColorPicker({
category: "GUI",
configName: "bgColor",
title: "Change Background Color",
description: "Changes the color and alpha of the background",
value: [0, 0, 0, 80]
})
.addSlider({
category: "GUI",
configName: "x",
title: "Change X",
description: "Changes the starting X coordinate of the GUI (in percent)",
options: [0, 75],
value: 20
})
.addSlider({
category: "GUI",
configName: "y",
title: "Change Y",
description: "Changes the starting Y coordinate of the GUI (in percent)",
options: [0, 75],
value: 20
})
.addSlider({
category: "GUI",
configName: "width",
title: "Change Width",
description: "Changes the width of the GUI (in percent)",
options: [25, 100],
value: 60
})
.addSlider({
category: "GUI",
configName: "height",
title: "Change Height",
description: "Changes the height of the GUI (in percent)",
options: [25, 100],
value: 60
})
.addKeybind({
category: "Keybinds",
configName: "openGuiKey",
title: "Open GUI",
description: "Keybind to open the BuskeAddons GUI"
})
.addKeybind({
category: "Keybinds",
configName: "toggleFairySoulsKey",
title: "Toggle Fairy Souls Counter",
description: "Keybind to toggle the Fairy Souls Counter"
})
.addKeybind({
category: "Keybinds",
configName: "copyPurseKey",
title: "Copy Purse To Clipboard",
description: "Keybind to copy the current purse value to clipboard"
})
const config = new Settings("BuskeAddons", defaultConf, "data/ColorScheme.json")
.setCommand("buskeaddons", ["ba", "b"])
.addMarkdown("Changelog", CHANGELOG)
.addMarkdown("Credits", CREDITS)
.onOpenGui(() => {
ChatLib.chat("BuskeAddons config GUI has been opened")
})
.onCloseGui(() => {
ChatLib.chat("BuskeAddons config GUI has been closed")
})
config
.setPos(config.settings.x, config.settings.y)
.setSize(config.settings.width, config.settings.height)
.setScheme("data/ColorScheme.json")
.apply()
export default () => config.settings