mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
refactoring the call order of the renderers' init code invocation
This commit is contained in:
@@ -11,7 +11,7 @@ import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
|
||||
internal object GetTime : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
|
||||
val worldTime = (Terrarum.ingame!!.world as GameWorldExtension).time
|
||||
val worldTime = (Terrarum.ingame!!.world as GameWorldExtension).worldTime
|
||||
Echo(worldTime.getFormattedTime())
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ internal object SetTime : ConsoleCommand {
|
||||
if (args.size == 2) {
|
||||
val timeToSet = WorldTime.parseTime(args[1])
|
||||
|
||||
world.time.setTimeOfToday(timeToSet)
|
||||
world.worldTime.setTimeOfToday(timeToSet)
|
||||
|
||||
Echo("Set time to ${world.time.todaySeconds} " +
|
||||
"(${world.time.hours}h${formatMin(world.time.minutes)})")
|
||||
Echo("Set time to ${world.worldTime.todaySeconds} " +
|
||||
"(${world.worldTime.hours}h${formatMin(world.worldTime.minutes)})")
|
||||
}
|
||||
else {
|
||||
printUsage()
|
||||
|
||||
@@ -17,11 +17,11 @@ internal object SetTimeDelta : ConsoleCommand {
|
||||
|
||||
|
||||
if (args.size == 2) {
|
||||
world.time.timeDelta = args[1].toInt()
|
||||
if (world.time.timeDelta == 0)
|
||||
world.worldTime.timeDelta = args[1].toInt()
|
||||
if (world.worldTime.timeDelta == 0)
|
||||
Echo("時間よ止まれ!ザ・ワルド!!")
|
||||
else
|
||||
Echo("Set time delta to ${world.time.timeDelta}")
|
||||
Echo("Set time delta to ${world.worldTime.timeDelta}")
|
||||
}
|
||||
else {
|
||||
printUsage()
|
||||
|
||||
Reference in New Issue
Block a user