mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Now ignore unknown fields on all jsons
This commit is contained in:
parent
e3bf80091a
commit
d080f37a94
@ -216,7 +216,7 @@ class NextTurnAutomation{
|
||||
&& civInfo.cities.none { it.cityConstructions.currentConstruction == "Settler" }) {
|
||||
|
||||
val bestCity = civInfo.cities.maxBy { it.cityStats.currentCityStats.production }!!
|
||||
if (bestCity.cityConstructions.builtBuildings.size > 1) // 2 buildings or more, otherwisse focus on self first
|
||||
if (bestCity.cityConstructions.builtBuildings.size > 1) // 2 buildings or more, otherwise focus on self first
|
||||
bestCity.cityConstructions.currentConstruction = "Settler"
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ object GameBasics {
|
||||
|
||||
fun <T> getFromJson(tClass: Class<T>, name: String): T {
|
||||
val jsonText = Gdx.files.internal("jsons/$name.json").readString()
|
||||
return Json().fromJson(tClass, jsonText)
|
||||
return Json().apply { ignoreUnknownFields=true }.fromJson(tClass, jsonText)
|
||||
}
|
||||
|
||||
private fun <T : INamed> createHashmap(items: Array<T>): LinkedHashMap<String, T> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user