diff --git a/src/bin/Turtle.hx b/src/bin/Turtle.hx index 41056df..3370481 100644 --- a/src/bin/Turtle.hx +++ b/src/bin/Turtle.hx @@ -1,5 +1,6 @@ package bin; +import lib.turtle.InvManager; import lib.CLIAppBase; using tink.CoreApi; @@ -30,6 +31,15 @@ class Turtle extends CLIAppBase { registerSyncSubcommand("down", (args) -> { return checkAvailable() && perform(kernel.turtle.Turtle.down()); }); + + registerSyncSubcommand("defrag", (args) -> { + if (!checkAvailable()) { + return false; + } + + InvManager.defrag(); + return true; + }); } private function checkAvailable():Bool {