aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/commands/rome.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-08-15 19:34:56 +0200
committernea <nea@nea.moe>2023-08-15 19:38:27 +0200
commit8c5570bfe6ab93855e24e6924fac1105fe8342ff (patch)
tree71c412ffefede775f36411531fed089d21b6d49d /src/main/kotlin/moe/nea/firmament/commands/rome.kt
parentb32f5da88c355645a9eaf343987f10506aa25bee (diff)
downloadfirmament-8c5570bfe6ab93855e24e6924fac1105fe8342ff.tar.gz
firmament-8c5570bfe6ab93855e24e6924fac1105fe8342ff.tar.bz2
firmament-8c5570bfe6ab93855e24e6924fac1105fe8342ff.zip
Add ursa client
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/commands/rome.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/commands/rome.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/commands/rome.kt b/src/main/kotlin/moe/nea/firmament/commands/rome.kt
index 4465459..221c7c1 100644
--- a/src/main/kotlin/moe/nea/firmament/commands/rome.kt
+++ b/src/main/kotlin/moe/nea/firmament/commands/rome.kt
@@ -8,8 +8,10 @@ package moe.nea.firmament.commands
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.arguments.StringArgumentType.string
+import io.ktor.client.statement.*
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
import net.minecraft.text.Text
+import moe.nea.firmament.apis.UrsaManager
import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlayScreen
import moe.nea.firmament.features.world.FairySouls
import moe.nea.firmament.gui.config.AllConfigsGui
@@ -135,6 +137,15 @@ fun firmamentCommand() = literal("firmament") {
}
}
}
+ thenLiteral("callUrsa") {
+ thenArgument("path", string()) { path ->
+ thenExecute {
+ source.sendFeedback(Text.translatable("firmament.ursa.debugrequest.start"))
+ val text = UrsaManager.request(this[path].split("/")).bodyAsText()
+ source.sendFeedback(Text.translatable("firmament.ursa.debugrequest.result", text))
+ }
+ }
+ }
}
}