some changes regarding actorblocks

This commit is contained in:
minjaesong
2022-07-19 18:32:21 +09:00
parent 5fbbf34c10
commit 06ef46d369
13 changed files with 128 additions and 51 deletions

View File

@@ -1,7 +1,8 @@
package net.torvald.terrarum.console
import java.nio.file.FileSystems
import net.torvald.terrarum.App
import java.nio.file.Files
import kotlin.io.path.Path
/**
* Created by minjaesong on 2016-03-07.
@@ -10,7 +11,7 @@ internal object Batch : ConsoleCommand {
@Throws(Exception::class)
override fun execute(args: Array<String>) {
if (args.size == 2) {
Files.lines(FileSystems.getDefault().getPath(args[1])).forEach(
Files.lines(Path(App.defaultDir, args[1])).forEach(
{ CommandInterpreter.execute(it) })
}
else {
@@ -19,6 +20,6 @@ internal object Batch : ConsoleCommand {
}
override fun printUsage() {
Echo("Usage: batch path/to/batch.txt")
Echo("Usage: batch path/to/batch.txt relative to the app data folder")
}
}