mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
some changes regarding actorblocks
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user