mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
taking screenshot
This commit is contained in:
@@ -43,6 +43,7 @@ object CommandDict {
|
||||
"setscale" to SetScale,
|
||||
"kill" to KillActor,
|
||||
"money" to MoneyDisp,
|
||||
"screenshot" to TakeScreenshot,
|
||||
|
||||
// Test codes
|
||||
"bulletintest" to SetBulletin,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.ccG
|
||||
import net.torvald.terrarum.ccW
|
||||
import net.torvald.terrarum.ccY
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import java.time.ZonedDateTime
|
||||
import java.util.ArrayList
|
||||
import java.util.Formatter
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
@@ -20,7 +21,8 @@ internal object CommandInterpreter {
|
||||
"getlocale",
|
||||
"help",
|
||||
"version",
|
||||
"tips"
|
||||
"tips",
|
||||
"screenshot"
|
||||
)
|
||||
|
||||
internal fun execute(command: String) {
|
||||
|
||||
13
src/net/torvald/terrarum/console/TakeScreenshot.kt
Normal file
13
src/net/torvald/terrarum/console/TakeScreenshot.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
import net.torvald.terrarum.AppLoader
|
||||
|
||||
object TakeScreenshot: ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
AppLoader.requestScreenshot()
|
||||
}
|
||||
|
||||
override fun printUsage() {
|
||||
Echo("Takes screenshot and save it to the default directory as 'screenshot.tga'")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user