mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 14:34:04 +09:00
proper way of setting quickslot #
Former-commit-id: 5cd21f043def3c7622290df5bf11f0b3f0080d30
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user