diff --git a/core/src/com/unciv/ui/GameSettings.kt b/core/src/com/unciv/GameSettings.kt similarity index 98% rename from core/src/com/unciv/ui/GameSettings.kt rename to core/src/com/unciv/GameSettings.kt index 383d7f41..1f993828 100644 --- a/core/src/com/unciv/ui/GameSettings.kt +++ b/core/src/com/unciv/GameSettings.kt @@ -1,4 +1,4 @@ -package com.unciv.ui +package com.unciv class GameSettings : LinkedHashMap() { diff --git a/core/src/com/unciv/UnCivGame.kt b/core/src/com/unciv/UnCivGame.kt index 2691ea57..97f33c77 100644 --- a/core/src/com/unciv/UnCivGame.kt +++ b/core/src/com/unciv/UnCivGame.kt @@ -5,7 +5,6 @@ import com.badlogic.gdx.Gdx import com.unciv.logic.GameInfo import com.unciv.logic.GameSaver import com.unciv.models.gamebasics.GameBasics -import com.unciv.ui.GameSettings import com.unciv.ui.worldscreen.WorldScreen class UnCivGame : Game() { diff --git a/core/src/com/unciv/logic/GameSaver.kt b/core/src/com/unciv/logic/GameSaver.kt index a4e90756..fbc0d34c 100644 --- a/core/src/com/unciv/logic/GameSaver.kt +++ b/core/src/com/unciv/logic/GameSaver.kt @@ -3,7 +3,7 @@ package com.unciv.logic import com.badlogic.gdx.Gdx import com.badlogic.gdx.files.FileHandle import com.badlogic.gdx.utils.Json -import com.unciv.ui.GameSettings +import com.unciv.GameSettings class GameSaver { private val saveFilesFolder = "SaveFiles" @@ -34,7 +34,7 @@ class GameSaver { return Gdx.files.local("GameSettings.json") } - fun getGeneralSettings():GameSettings{ + fun getGeneralSettings(): GameSettings { val settingsFile = getGeneralSettingsFile() if(!settingsFile.exists()) return GameSettings() return Json().fromJson(GameSettings::class.java, settingsFile) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index e3a602db..f49a9177 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -153,5 +153,4 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) { capturedUnit.civInfo = attacker.getCivilization() capturedUnit.owner = capturedUnit.civInfo.civName } -} - +} \ No newline at end of file diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 52ed6251..0c779cec 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -9,7 +9,7 @@ import com.unciv.logic.map.TileMap import com.unciv.models.gamebasics.GameBasics import com.unciv.models.gamebasics.tile.ResourceType import com.unciv.models.gamebasics.tile.TileResource -import com.unciv.models.linq.Counter +import com.unciv.models.Counter import com.unciv.models.stats.Stats import kotlin.math.min diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index 5cf74f67..6da4bb47 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -9,10 +9,10 @@ import com.unciv.logic.map.RoadStatus import com.unciv.logic.map.TileInfo import com.unciv.models.gamebasics.Civilization import com.unciv.models.gamebasics.GameBasics -import com.unciv.models.gamebasics.TechEra +import com.unciv.models.gamebasics.tech.TechEra import com.unciv.models.gamebasics.tile.ResourceType import com.unciv.models.gamebasics.tile.TileResource -import com.unciv.models.linq.Counter +import com.unciv.models.Counter import com.unciv.models.stats.Stats import com.unciv.ui.utils.getRandom import kotlin.math.max diff --git a/core/src/com/unciv/logic/civilization/ScienceVictoryManager.kt b/core/src/com/unciv/logic/civilization/ScienceVictoryManager.kt index 2c21a32c..3fae5d6d 100644 --- a/core/src/com/unciv/logic/civilization/ScienceVictoryManager.kt +++ b/core/src/com/unciv/logic/civilization/ScienceVictoryManager.kt @@ -1,6 +1,6 @@ package com.unciv.logic.civilization -import com.unciv.models.linq.Counter +import com.unciv.models.Counter class ScienceVictoryManager { diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index 87d87d1b..e6f61a22 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -3,7 +3,7 @@ package com.unciv.logic.civilization import com.badlogic.gdx.graphics.Color import com.unciv.models.gamebasics.GameBasics -import com.unciv.models.gamebasics.Technology +import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.gamebasics.unit.Unit import com.unciv.ui.utils.tr import java.util.* diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 76338db5..896ac8f8 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -112,7 +112,7 @@ open class TileInfo { if (improvement.improvingTech != null && observingCiv.tech.isResearched(improvement.improvingTech!!)) stats.add(improvement.improvingTechStats!!) // eg Chemistry for mines if (improvement.name == "Trading post" && city != null && city.civInfo.policies.isAdopted("Free Thought")) stats.science += 1f - if (listOf("Academy", "Landmark", "Manufactory", "Customs House").contains(improvement.name) && observingCiv.policies.isAdopted("Freedom Complete")) + if (improvement.name in listOf("Academy", "Landmark", "Manufactory", "Customs house") && observingCiv.policies.isAdopted("Freedom Complete")) stats.add(improvement) // again, for the double effect } diff --git a/core/src/com/unciv/models/linq/Counter.java b/core/src/com/unciv/models/Counter.java similarity index 96% rename from core/src/com/unciv/models/linq/Counter.java rename to core/src/com/unciv/models/Counter.java index 759684f2..3e23b005 100644 --- a/core/src/com/unciv/models/linq/Counter.java +++ b/core/src/com/unciv/models/Counter.java @@ -1,4 +1,4 @@ -package com.unciv.models.linq; +package com.unciv.models; import java.util.LinkedHashMap; diff --git a/core/src/com/unciv/models/gamebasics/Building.kt b/core/src/com/unciv/models/gamebasics/Building.kt index 3987e34a..b12a0cc7 100644 --- a/core/src/com/unciv/models/gamebasics/Building.kt +++ b/core/src/com/unciv/models/gamebasics/Building.kt @@ -2,6 +2,7 @@ package com.unciv.models.gamebasics import com.unciv.logic.city.CityConstructions import com.unciv.logic.city.IConstruction +import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.stats.NamedStats import com.unciv.models.stats.Stats import com.unciv.ui.utils.tr diff --git a/core/src/com/unciv/models/gamebasics/GameBasics.kt b/core/src/com/unciv/models/gamebasics/GameBasics.kt index caaa660b..e52446a2 100644 --- a/core/src/com/unciv/models/gamebasics/GameBasics.kt +++ b/core/src/com/unciv/models/gamebasics/GameBasics.kt @@ -2,6 +2,8 @@ package com.unciv.models.gamebasics import com.badlogic.gdx.Gdx import com.badlogic.gdx.utils.Json +import com.unciv.models.gamebasics.tech.TechColumn +import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.gamebasics.tile.Terrain import com.unciv.models.gamebasics.tile.TileImprovement import com.unciv.models.gamebasics.tile.TileResource diff --git a/core/src/com/unciv/models/gamebasics/PolicyBranch.kt b/core/src/com/unciv/models/gamebasics/PolicyBranch.kt index 027bccdb..ac0ad94c 100644 --- a/core/src/com/unciv/models/gamebasics/PolicyBranch.kt +++ b/core/src/com/unciv/models/gamebasics/PolicyBranch.kt @@ -1,6 +1,8 @@ package com.unciv.models.gamebasics +import com.unciv.models.gamebasics.tech.TechEra + class PolicyBranch : Policy() { var policies: ArrayList = arrayListOf() - lateinit var era:TechEra + lateinit var era: TechEra } diff --git a/core/src/com/unciv/models/gamebasics/TechColumn.kt b/core/src/com/unciv/models/gamebasics/tech/TechColumn.kt similarity index 57% rename from core/src/com/unciv/models/gamebasics/TechColumn.kt rename to core/src/com/unciv/models/gamebasics/tech/TechColumn.kt index 764056d9..dc62f425 100644 --- a/core/src/com/unciv/models/gamebasics/TechColumn.kt +++ b/core/src/com/unciv/models/gamebasics/tech/TechColumn.kt @@ -1,4 +1,4 @@ -package com.unciv.models.gamebasics +package com.unciv.models.gamebasics.tech import java.util.* @@ -12,13 +12,3 @@ class TechColumn { } -enum class TechEra{ - Ancient, - Classical, - Medieval, - Renaissance, - Industrial, - Modern, - Information, - Future -} \ No newline at end of file diff --git a/core/src/com/unciv/models/gamebasics/tech/TechEra.kt b/core/src/com/unciv/models/gamebasics/tech/TechEra.kt new file mode 100644 index 00000000..181b8255 --- /dev/null +++ b/core/src/com/unciv/models/gamebasics/tech/TechEra.kt @@ -0,0 +1,12 @@ +package com.unciv.models.gamebasics.tech + +enum class TechEra{ + Ancient, + Classical, + Medieval, + Renaissance, + Industrial, + Modern, + Information, + Future +} \ No newline at end of file diff --git a/core/src/com/unciv/models/gamebasics/Technology.kt b/core/src/com/unciv/models/gamebasics/tech/Technology.kt similarity index 95% rename from core/src/com/unciv/models/gamebasics/Technology.kt rename to core/src/com/unciv/models/gamebasics/tech/Technology.kt index f6a1fe88..f267d5f6 100644 --- a/core/src/com/unciv/models/gamebasics/Technology.kt +++ b/core/src/com/unciv/models/gamebasics/tech/Technology.kt @@ -1,6 +1,8 @@ -package com.unciv.models.gamebasics +package com.unciv.models.gamebasics.tech import com.unciv.UnCivGame +import com.unciv.models.gamebasics.GameBasics +import com.unciv.models.gamebasics.ICivilopedia import com.unciv.ui.utils.tr import java.util.* diff --git a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt index 85b106ff..4258304e 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt @@ -6,7 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.civilization.TechManager import com.unciv.models.gamebasics.GameBasics -import com.unciv.models.gamebasics.Technology +import com.unciv.models.gamebasics.tech.Technology import com.unciv.ui.utils.CameraStageBaseScreen import com.unciv.ui.utils.addClickListener import com.unciv.ui.utils.disable @@ -60,7 +60,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen() selectTechnology(tech) } topTable.add(TB) - if(eras[j].text.toString()=="") eras[j].setText(tech.era().toString()) + if(eras[j].text.toString()=="") eras[j].setText(tech.era().toString().tr()) } } }