Greek support, modular weather, command history for console window

Former-commit-id: b72d0b018c084e80cf4fef77e1b1a81101d6daea
Former-commit-id: 32da6a2998826de6519a901dcff7bf058f689b2f
This commit is contained in:
Song Minjae
2016-07-13 21:48:14 +09:00
parent c52015e429
commit 1d1f99605c
74 changed files with 1067 additions and 387 deletions

View File

@@ -1,8 +1,7 @@
package net.torvald.terrarum.console
import net.torvald.terrarum.StateInGame
import net.torvald.imagefont.GameFontBase
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarum.ui.ConsoleWindow
import java.util.Formatter
@@ -10,6 +9,9 @@ import java.util.Formatter
* Created by minjaesong on 16-01-16.
*/
class CodexEdictis : ConsoleCommand {
val ccW = GameFontBase.colToCode["o"]
override fun execute(args: Array<String>) {
if (args.size == 1) {
printList()
@@ -23,7 +25,7 @@ class CodexEdictis : ConsoleCommand {
val sb = StringBuilder()
val formatter = Formatter(sb)
Echo().execute("Codex: " + formatter.format(Lang.get("DEV_MESSAGE_CONSOLE_COMMAND_UNKNOWN"), args[1]).toString())
Echo().execute("Codex: " + formatter.format(Lang["DEV_MESSAGE_CONSOLE_COMMAND_UNKNOWN"], args[1]).toString())
}
}
@@ -38,8 +40,11 @@ class CodexEdictis : ConsoleCommand {
private fun printList() {
val echo = Echo()
echo.execute(Lang.get("DEV_MESSAGE_CONSOLE_AVAILABLE_COMMANDS"))
CommandDict.dict.keys.forEach { s -> echo.execute("" + s) }
echo.execute(Lang["DEV_MESSAGE_CONSOLE_AVAILABLE_COMMANDS"])
CommandDict.dict.forEach { name, cmd ->
echo.execute("$ccW" + name)
cmd.printUsage()
}
}
}