dump (another useless message)

This commit is contained in:
minjaesong
2018-08-05 21:57:18 +09:00
parent 24b2e2a2af
commit eee8a18875
130 changed files with 1350 additions and 563 deletions

View File

@@ -3,7 +3,7 @@ package net.torvald.terrarum.modulecomputers.virtualcomputer.luaapi
import org.luaj.vm2.Globals
import org.luaj.vm2.LuaFunction
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
import net.torvald.terrarum.modulebasegame.gameworld.WorldTime
import org.luaj.vm2.LuaTable
import org.luaj.vm2.LuaValue
@@ -23,7 +23,7 @@ class WorldInformationProvider(globals: Globals) {
companion object {
fun getWorldTimeInLuaFormat() : LuaTable {
val t = LuaTable()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!! as Ingame).world.time else WorldTime()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!!.world as GameWorldExtension).time else WorldTime()
// int Terrarum World Time format
t["hour"] = time.hours
@@ -42,7 +42,7 @@ class WorldInformationProvider(globals: Globals) {
/** evaluate single C date format */
fun String.evalAsDate(): String {
val time = if (Terrarum.ingame != null) (Terrarum.ingame!! as Ingame).world.time else WorldTime()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!!.world as GameWorldExtension).time else WorldTime()
return when (this) {
"%a" -> time.getDayNameShort()
"%A" -> time.getDayNameFull()