Skip to content

Commit 3a3a458

Browse files
committed
Fixes according new api
1 parent 80e8b7f commit 3a3a458

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

src/main/kotlin/HighwayTools.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ internal object HighwayTools : PluginModule(
144144
private val tryRefreshSlots by setting("Try refresh slot", false, { page == Page.STORAGE_MANAGEMENT }, description = "Clicks a slot on desync")
145145

146146
// stat settings
147-
private val anonymizeStats by setting("Anonymize", false, { page == Page.STATS }, description = "Censors all coordinates in HUD and Chat")
147+
val anonymizeStats by setting("Anonymize", false, { page == Page.STATS }, description = "Censors all coordinates in HUD and Chat")
148148
private val simpleMovingAverageRange by setting("Moving Average", 60, 5..600, 5, { page == Page.STATS }, description = "Sets the timeframe of the average in seconds")
149149
private val showSession by setting("Show Session", true, { page == Page.STATS }, description = "Toggles the Session section in HUD")
150150
private val showLifeTime by setting("Show Lifetime", true, { page == Page.STATS }, description = "Toggles the Lifetime section in HUD")
@@ -1723,7 +1723,8 @@ internal object HighwayTools : PluginModule(
17231723
} else {
17241724
if (mode != Mode.TUNNEL &&
17251725
containerTask.taskState == TaskState.DONE &&
1726-
player.allSlots.countBlock(material) < saveMaterial) {
1726+
player.allSlots.countBlock(material) < saveMaterial &&
1727+
storageManagement) {
17271728
if (player.allSlots.countItem(Items.DIAMOND_PICKAXE) > saveTools) {
17281729
handleRestock(material.item)
17291730
} else {
@@ -1756,7 +1757,7 @@ internal object HighwayTools : PluginModule(
17561757

17571758
private fun SafeClientEvent.swapOrMoveBestTool(blockTask: BlockTask): Boolean {
17581759
if (player.allSlots.countItem(Items.DIAMOND_PICKAXE) <= saveTools) {
1759-
return if (containerTask.taskState == TaskState.DONE) {
1760+
return if (containerTask.taskState == TaskState.DONE && storageManagement) {
17601761
handleRestock(Items.DIAMOND_PICKAXE)
17611762
false
17621763
} else {

src/main/kotlin/HighwayToolsPlugin.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ internal object HighwayToolsPlugin: Plugin() {
99
}
1010

1111
override fun onUnload() {
12-
// ?
12+
modules.forEach {
13+
it.disable()
14+
}
1315
}
1416
}

src/main/kotlin/HighwayToolsProcess.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ object HighwayToolsProcess : IBaritoneProcess {
2222
override fun displayName0(): String {
2323
val lastTask = HighwayTools.lastTask
2424

25-
val processName = HighwayTools.goal?.goalPos?.asString()
26-
?: lastTask?.toString()
27-
?: "Thinking"
25+
val processName = if (!HighwayTools.anonymizeStats) {
26+
HighwayTools.goal?.goalPos?.asString()
27+
?: lastTask?.toString()
28+
?: "Thinking"
29+
} else {
30+
"Running"
31+
}
2832

2933
return "HighwayTools: $processName"
3034
}

src/main/resources/plugin_info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "HighwayTools",
3-
"version": "v9.9",
3+
"version": "9.9",
44
"authors": [
55
"Constructor"
66
],

0 commit comments

Comments
 (0)