mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 18:59:15 +07:00
Welp added some lines I shouldn't have
This commit is contained in:
@ -38,8 +38,6 @@ class Ruleset {
|
||||
|
||||
|
||||
fun <T> getFromJson(tClass: Class<T>, filePath:String): T {
|
||||
val file = Gdx.files.internal(filePath)
|
||||
if(!file.exists()) return tClass Array<>().first()
|
||||
val jsonText = Gdx.files.internal(filePath).readString(Charsets.UTF_8.name())
|
||||
return Json().apply { ignoreUnknownFields = true }.fromJson(tClass, jsonText)
|
||||
}
|
||||
|
Reference in New Issue
Block a user