refactoring the call order of the renderers' init code invocation

This commit is contained in:
minjaesong
2019-06-25 22:24:22 +09:00
parent d2e886aec2
commit ed58e72724
29 changed files with 283 additions and 195 deletions

View File

@@ -23,7 +23,7 @@ class WorldInformationProvider(globals: Globals) {
companion object {
fun getWorldTimeInLuaFormat() : LuaTable {
val t = LuaTable()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!!.world as GameWorldExtension).time else WorldTime()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!!.world as GameWorldExtension).worldTime 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!!.world as GameWorldExtension).time else WorldTime()
val time = if (Terrarum.ingame != null) (Terrarum.ingame!!.world as GameWorldExtension).worldTime else WorldTime()
return when (this) {
"%a" -> time.getDayNameShort()
"%A" -> time.getDayNameFull()