mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
new console command 'error' (stderr equivalent of console window)
Former-commit-id: ab54663fd64f9ae9c758f53b3f5800a5894f0db3 Former-commit-id: 7aba1585ffa45195622bb25e1c62cace474420c9
This commit is contained in:
@@ -6,8 +6,14 @@ import net.torvald.terrarum.Terrarum
|
||||
* Created by minjaesong on 16-03-20.
|
||||
*/
|
||||
class SetTimeDelta : ConsoleCommand {
|
||||
|
||||
val HARD_LIMIT = 60
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2) {
|
||||
if (args[1].toInt() > HARD_LIMIT)
|
||||
Error().execute("Delta too large -- acceptable delta is 0-60.")
|
||||
|
||||
Terrarum.game.map.worldTime.setTimeDelta(args[1].toInt())
|
||||
if (Terrarum.game.map.worldTime.timeDelta == 0)
|
||||
Echo().execute("時間よ止まれ!ザ・ワルド!!")
|
||||
|
||||
Reference in New Issue
Block a user