mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
Object-ified console commands (singleton!)
Former-commit-id: d04fc939a659fc4a6b952d64894bd28edf97bc38 Former-commit-id: 6c20526f3bdda2d9d08dc156b3b0fe271e89bffb
This commit is contained in:
@@ -6,21 +6,21 @@ import net.torvald.terrarum.langpack.Lang
|
||||
/**
|
||||
* Created by minjaesong on 16-03-22.
|
||||
*/
|
||||
class Help : ConsoleCommand {
|
||||
internal object Help : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val echo = Echo()
|
||||
|
||||
if (args.size == 1) {
|
||||
for (i in 1..6) echo.execute(Lang["HELP_OTF_MAIN_$i"])
|
||||
for (i in 1..6) Echo.execute(Lang["HELP_OTF_MAIN_$i"])
|
||||
}
|
||||
else if (args[1].toLowerCase() == "slow") {
|
||||
for (i in 1..4) echo.execute(Lang["HELP_OTF_SLOW_$i"])
|
||||
for (i in 1..4) Echo.execute(Lang["HELP_OTF_SLOW_$i"])
|
||||
}
|
||||
else {
|
||||
for (i in 1..6) echo.execute(Lang["HELP_OTF_MAIN_$i"])
|
||||
for (i in 1..6) Echo.execute(Lang["HELP_OTF_MAIN_$i"])
|
||||
}
|
||||
}
|
||||
|
||||
override fun printUsage() {
|
||||
Echo().execute("Prints some utility functions assigned to function row of the keyboard.")
|
||||
Echo.execute("Prints some utility functions assigned to function row of the keyboard.")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user