mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
new console command 'error' (stderr equivalent of console window)
Former-commit-id: ab54663fd64f9ae9c758f53b3f5800a5894f0db3 Former-commit-id: 7aba1585ffa45195622bb25e1c62cace474420c9
This commit is contained in:
@@ -25,6 +25,7 @@ object CommandInterpreter {
|
||||
fun execute(command: String) {
|
||||
val cmd: Array<CommandInput?> = parse(command)
|
||||
val echo = Echo()
|
||||
val error = Error()
|
||||
|
||||
for (single_command in cmd) {
|
||||
var commandObj: ConsoleCommand? = null
|
||||
@@ -61,7 +62,7 @@ object CommandInterpreter {
|
||||
catch (e: Exception) {
|
||||
System.err.print("[CommandInterpreter] ")
|
||||
e.printStackTrace()
|
||||
echo.error(Lang["ERROR_GENERIC_TEXT"])
|
||||
error.execute(Lang["ERROR_GENERIC_TEXT"])
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,7 +104,7 @@ object CommandInterpreter {
|
||||
val sb = StringBuilder()
|
||||
val formatter = Formatter(sb)
|
||||
|
||||
Echo().error(
|
||||
Error().execute(
|
||||
formatter.format(Lang["DEV_MESSAGE_CONSOLE_COMMAND_UNKNOWN"], cmdname).toString())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user