proper way of setting quickslot #

Former-commit-id: 5cd21f043def3c7622290df5bf11f0b3f0080d30
This commit is contained in:
Song Minjae
2017-03-28 03:44:43 +09:00
parent cd710de280
commit 48315daa7d
19 changed files with 272 additions and 287 deletions

View File

@@ -33,13 +33,10 @@ typealias Millisec = Int
*/
object Terrarum : StateBasedGame(GAME_NAME) {
val sysLang: String
get() {
val lan = System.getProperty("user.language")
val country = System.getProperty("user.country")
return lan + country
}
//////////////////////////////
// GLOBAL IMMUTABLE CONFIGS //
//////////////////////////////
val QUICKSLOT_MAX = 10
/**
* To be used with physics simulator
@@ -55,6 +52,19 @@ object Terrarum : StateBasedGame(GAME_NAME) {
*/
val TARGET_INTERNAL_FPS = 100
val sysLang: String
get() {
val lan = System.getProperty("user.language")
val country = System.getProperty("user.country")
return lan + country
}
lateinit var appgc: AppGameContainer
var WIDTH = 1072
@@ -89,7 +99,7 @@ object Terrarum : StateBasedGame(GAME_NAME) {
val memXmx: Long
get() = Runtime.getRuntime().maxMemory() shr 20
lateinit var environment: RunningEnvironment
val environment: RunningEnvironment
private val localeSimple = arrayOf("de", "en", "es", "it")
var gameLocale = "####" // lateinit placeholder
@@ -228,15 +238,15 @@ object Terrarum : StateBasedGame(GAME_NAME) {
val readFromDisk = readConfigJson()
if (!readFromDisk) readConfigJson()
try {
environment = try {
Controllers.getController(0)
environment = if (getConfigString("pcgamepadenv") == "console")
if (getConfigString("pcgamepadenv") == "console")
RunningEnvironment.CONSOLE
else
RunningEnvironment.PC
}
catch (e: IndexOutOfBoundsException) {
environment = RunningEnvironment.PC
RunningEnvironment.PC
}
}