mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
new WorldTime based on TIME_T
This commit is contained in:
@@ -11,10 +11,10 @@ internal object SetTime : ConsoleCommand {
|
||||
if (args.size == 2) {
|
||||
val timeToSet = WorldTime.parseTime(args[1])
|
||||
|
||||
Terrarum.ingame!!.world.time.setTime(timeToSet)
|
||||
Terrarum.ingame!!.world.time.setTimeOfToday(timeToSet)
|
||||
|
||||
Echo("Set time to ${Terrarum.ingame!!.world.time.elapsedSeconds} " +
|
||||
"(${Terrarum.ingame!!.world.time.hours}h${formatMin(Terrarum.ingame!!.world.time.minutes)})")
|
||||
Echo("Set time to ${Terrarum.ingame!!.world.time.todaySeconds} " +
|
||||
"(${Terrarum.ingame!!.world.time.hours}h${formatMin(Terrarum.ingame!!.world.time.minutes)})")
|
||||
}
|
||||
else {
|
||||
printUsage()
|
||||
|
||||
@@ -11,10 +11,7 @@ internal object SetTimeDelta : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2) {
|
||||
if (args[1].toInt() > HARD_LIMIT)
|
||||
EchoError("Delta too large -- acceptable delta is 0-60.")
|
||||
|
||||
Terrarum.ingame!!.world.time.setTimeDelta(args[1].toInt())
|
||||
Terrarum.ingame!!.world.time.timeDelta = args[1].toInt()
|
||||
if (Terrarum.ingame!!.world.time.timeDelta == 0)
|
||||
Echo("時間よ止まれ!ザ・ワルド!!")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user