mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +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 {
|
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())
|
val jsonText = Gdx.files.internal(filePath).readString(Charsets.UTF_8.name())
|
||||||
return Json().apply { ignoreUnknownFields = true }.fromJson(tClass, jsonText)
|
return Json().apply { ignoreUnknownFields = true }.fromJson(tClass, jsonText)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user