Organized files
This commit is contained in:
parent
805fc5c739
commit
23f9d157a4
17 changed files with 35 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.ui
|
||||
package com.unciv
|
||||
|
||||
class GameSettings : LinkedHashMap<String, String>() {
|
||||
|
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -153,5 +153,4 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
|
|||
capturedUnit.civInfo = attacker.getCivilization()
|
||||
capturedUnit.owner = capturedUnit.civInfo.civName
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.logic.civilization
|
||||
|
||||
import com.unciv.models.linq.Counter
|
||||
import com.unciv.models.Counter
|
||||
|
||||
class ScienceVictoryManager {
|
||||
|
||||
|
|
|
@ -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.*
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.linq;
|
||||
package com.unciv.models;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.unciv.models.gamebasics
|
||||
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
|
||||
class PolicyBranch : Policy() {
|
||||
var policies: ArrayList<Policy> = arrayListOf()
|
||||
lateinit var era:TechEra
|
||||
lateinit var era: TechEra
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
12
core/src/com/unciv/models/gamebasics/tech/TechEra.kt
Normal file
12
core/src/com/unciv/models/gamebasics/tech/TechEra.kt
Normal file
|
@ -0,0 +1,12 @@
|
|||
package com.unciv.models.gamebasics.tech
|
||||
|
||||
enum class TechEra{
|
||||
Ancient,
|
||||
Classical,
|
||||
Medieval,
|
||||
Renaissance,
|
||||
Industrial,
|
||||
Modern,
|
||||
Information,
|
||||
Future
|
||||
}
|
|
@ -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.*
|
||||
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue