added defrag to turtle command
This commit is contained in:
parent
638d1acbe0
commit
1d9e08641e
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user