mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
UI testing env and working text buttons
Former-commit-id: b8fd27c7f71f9bc8da259ae132badcbc9ce117ac
This commit is contained in:
@@ -24,7 +24,7 @@ class WorldInformationProvider(globals: Globals) {
|
||||
companion object {
|
||||
fun getWorldTimeInLuaFormat() : LuaTable {
|
||||
val t = LuaTable()
|
||||
val time = if (Terrarum.gameStarted) Terrarum.ingame.world.time else WorldTime()
|
||||
val time = if (Terrarum.gameStarted) Terrarum.ingame!!.world.time else WorldTime()
|
||||
|
||||
// int Terrarum World Time format
|
||||
t["hour"] = time.hours
|
||||
@@ -43,7 +43,7 @@ class WorldInformationProvider(globals: Globals) {
|
||||
|
||||
/** evaluate single C date format */
|
||||
fun String.evalAsDate(): String {
|
||||
val time = if (Terrarum.gameStarted) Terrarum.ingame.world.time else WorldTime()
|
||||
val time = if (Terrarum.gameStarted) Terrarum.ingame!!.world.time else WorldTime()
|
||||
return when (this) {
|
||||
"%a" -> time.getDayNameShort()
|
||||
"%A" -> time.getDayNameFull()
|
||||
|
||||
Reference in New Issue
Block a user