Package move & civilopedia scroll fix
This commit is contained in:
parent
cc8c33c73e
commit
a13d6bc82e
115 changed files with 1595 additions and 228 deletions
1343
android/assets/jsons/Translations/Simplified_Chinese.json
Normal file
1343
android/assets/jsons/Translations/Simplified_Chinese.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -67,7 +67,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"Během prvních pár tahů,",
|
||||
" máme jen velmi málo možností na výběr,",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
],
|
||||
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"In your first couple of turns,",
|
||||
" you will have very little options,",
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"Lors de vos premiers tours,",
|
||||
" vous aurez peu de choix.",
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"Nei tuoi primi turni, avrai ben poche opzioni, ma con il crescere della tua civiltà, aumenterà anche la quantità di cose che richiedono la tua attenzione."
|
||||
]
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"이렇게 초반 몇 턴동안에는,",
|
||||
" 행동할 수 있는 선택지가 매우 적습니다.",
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"W pierwszych paru turach większość czynności będzie ograniczona,",
|
||||
"jednakże wraz z rozwojem Twojej cywilizacji ilość czynności zwiększy się",
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"В ваши первые несколько ходов",
|
||||
" у вас будет очень мало возможностей,",
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"在游戏开始的最初几回合,",
|
||||
"您只需进行很少的操作。",
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"在游戏开始的最初几回合,",
|
||||
"您只需进行很少的操作。",
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
]
|
||||
],
|
||||
|
||||
Slow_Start: [
|
||||
_Slow_Start: [
|
||||
[
|
||||
"In your first couple of turns,",
|
||||
" you will have very little options,",
|
||||
|
|
|
@ -9,9 +9,9 @@ import com.unciv.logic.GameInfo
|
|||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.logic.GameStarter
|
||||
import com.unciv.logic.map.MapParameters
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import com.unciv.models.metadata.GameSettings
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.ui.LanguagePickerScreen
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.unciv.logic.civilization.LocationAction
|
|||
import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.logic.map.TileMap
|
||||
import com.unciv.models.gamebasics.Difficulty
|
||||
import com.unciv.models.ruleset.Difficulty
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import java.util.*
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.unciv.Constants
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.*
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
|
|
@ -5,9 +5,9 @@ import com.unciv.logic.city.CityInfo
|
|||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.BFS
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import com.unciv.models.stats.Stats
|
||||
import kotlin.math.max
|
||||
import kotlin.math.sqrt
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.unciv.logic.city.CityConstructions
|
|||
import com.unciv.logic.city.SpecialConstruction
|
||||
import com.unciv.logic.civilization.CityAction
|
||||
import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.stats.Stat
|
||||
import kotlin.math.min
|
||||
import kotlin.math.sqrt
|
||||
|
|
|
@ -10,9 +10,9 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
|||
import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.trade.*
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.gamebasics.tech.Technology
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.tech.Technology
|
||||
import com.unciv.models.ruleset.tr
|
||||
import kotlin.math.min
|
||||
|
||||
class NextTurnAutomation{
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.unciv.logic.civilization.GreatPersonManager
|
|||
import com.unciv.logic.civilization.diplomacy.DiplomacyFlags
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tile.TileResource
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tile.TileResource
|
||||
import com.unciv.models.stats.Stats
|
||||
import com.unciv.ui.worldscreen.unit.UnitActions
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
|||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.PathsToTilesWithinTurn
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import com.unciv.ui.worldscreen.unit.UnitAction
|
||||
import com.unciv.ui.worldscreen.unit.UnitActions
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.unciv.logic.civilization.CivilizationInfo
|
|||
import com.unciv.logic.map.BFS
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tile.TileImprovement
|
||||
import com.unciv.models.ruleset.tile.TileImprovement
|
||||
|
||||
class WorkerAutomation(val unit: MapUnit) {
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.unciv.logic.civilization.PopupAlert
|
|||
import com.unciv.logic.civilization.diplomacy.DiplomaticModifiers
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import java.util.*
|
||||
import kotlin.math.max
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.unciv.logic.battle
|
|||
import com.unciv.Constants
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
import kotlin.collections.set
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.unciv.Constants
|
|||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.unciv.logic.battle
|
|||
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
|
||||
interface ICombatant{
|
||||
fun getName(): String
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.unciv.logic.battle
|
|||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
|
||||
class MapUnitCombatant(val unit: MapUnit) : ICombatant {
|
||||
override fun getHealth(): Int = unit.health
|
||||
|
|
|
@ -5,8 +5,8 @@ import com.unciv.Constants
|
|||
import com.unciv.logic.automation.ConstructionAutomation
|
||||
import com.unciv.logic.civilization.AlertType
|
||||
import com.unciv.logic.civilization.PopupAlert
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.Stats
|
||||
import com.unciv.ui.utils.withItem
|
||||
import com.unciv.ui.utils.withoutItem
|
||||
|
@ -33,10 +33,10 @@ class CityConstructions {
|
|||
return toReturn
|
||||
}
|
||||
|
||||
internal fun getBuildableBuildings(): List<Building> = cityInfo.getGameBasics().Buildings.values
|
||||
internal fun getBuildableBuildings(): List<Building> = cityInfo.getRuleset().Buildings.values
|
||||
.filter { it.isBuildable(this) }
|
||||
|
||||
fun getConstructableUnits() = cityInfo.getGameBasics().Units.values
|
||||
fun getConstructableUnits() = cityInfo.getRuleset().Units.values
|
||||
.filter { it.isBuildable(this) }
|
||||
|
||||
fun getStats(): Stats {
|
||||
|
@ -94,7 +94,7 @@ class CityConstructions {
|
|||
}
|
||||
|
||||
internal fun getConstruction(constructionName: String): IConstruction {
|
||||
val gameBasics = cityInfo.getGameBasics()
|
||||
val gameBasics = cityInfo.getRuleset()
|
||||
if (gameBasics.Buildings.containsKey(constructionName))
|
||||
return gameBasics.Buildings[constructionName]!!
|
||||
else if (gameBasics.Units.containsKey(constructionName))
|
||||
|
@ -155,7 +155,7 @@ class CityConstructions {
|
|||
|
||||
//region state changing functions
|
||||
fun setTransients(){
|
||||
builtBuildingObjects = ArrayList(builtBuildings.map { cityInfo.getGameBasics().Buildings[it]!! })
|
||||
builtBuildingObjects = ArrayList(builtBuildings.map { cityInfo.getRuleset().Buildings[it]!! })
|
||||
}
|
||||
|
||||
fun addProductionPoints(productionToAdd: Int) {
|
||||
|
@ -218,13 +218,13 @@ class CityConstructions {
|
|||
}
|
||||
|
||||
fun addBuilding(buildingName:String){
|
||||
val buildingObject = cityInfo.getGameBasics().Buildings[buildingName]!!
|
||||
val buildingObject = cityInfo.getRuleset().Buildings[buildingName]!!
|
||||
builtBuildingObjects = builtBuildingObjects.withItem(buildingObject)
|
||||
builtBuildings.add(buildingName)
|
||||
}
|
||||
|
||||
fun removeBuilding(buildingName:String){
|
||||
val buildingObject = cityInfo.getGameBasics().Buildings[buildingName]!!
|
||||
val buildingObject = cityInfo.getRuleset().Buildings[buildingName]!!
|
||||
builtBuildingObjects = builtBuildingObjects.withoutItem(buildingObject)
|
||||
builtBuildings.remove(buildingName)
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import com.unciv.logic.map.TileMap
|
|||
import com.unciv.logic.trade.TradeLogic
|
||||
import com.unciv.logic.trade.TradeOffer
|
||||
import com.unciv.logic.trade.TradeType
|
||||
import com.unciv.models.gamebasics.tile.ResourceSupplyList
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tile.ResourceSupplyList
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.stats.Stats
|
||||
import com.unciv.ui.utils.withoutItem
|
||||
import kotlin.math.min
|
||||
|
@ -119,7 +119,7 @@ class CityInfo {
|
|||
fun getTiles(): List<TileInfo> = tiles.map { tileMap[it] }
|
||||
fun getWorkableTiles() = getTiles().filter { it in tilesInRange }
|
||||
|
||||
fun getGameBasics() = civInfo.gameInfo.ruleSet
|
||||
fun getRuleset() = civInfo.gameInfo.ruleSet
|
||||
|
||||
fun getCityResources(): ResourceSupplyList {
|
||||
val cityResources = ResourceSupplyList()
|
||||
|
@ -134,7 +134,7 @@ class CityInfo {
|
|||
}
|
||||
|
||||
for (building in cityConstructions.getBuiltBuildings().filter { it.requiredResource != null }) {
|
||||
val resource = getGameBasics().TileResources[building.requiredResource]!!
|
||||
val resource = getRuleset().TileResources[building.requiredResource]!!
|
||||
cityResources.add(resource, -1, "Buildings")
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ class CityInfo {
|
|||
|
||||
// Even if the improvement exists (we conquered an enemy city or somesuch) or we have a city on it, we won't get the resource until the correct tech is researched
|
||||
if (resource.improvement!=null){
|
||||
val improvement = getGameBasics().TileImprovements[resource.improvement!!]!!
|
||||
val improvement = getRuleset().TileImprovements[resource.improvement!!]!!
|
||||
if(improvement.techRequired!=null && !civInfo.tech.isResearched(improvement.techRequired!!)) return 0
|
||||
}
|
||||
|
||||
|
@ -472,15 +472,15 @@ class CityInfo {
|
|||
|
||||
private fun tryUpdateRoadStatus(){
|
||||
if(getCenterTile().roadStatus==RoadStatus.None
|
||||
&& getGameBasics().TileImprovements["Road"]!!.techRequired in civInfo.tech.techsResearched)
|
||||
&& getRuleset().TileImprovements["Road"]!!.techRequired in civInfo.tech.techsResearched)
|
||||
getCenterTile().roadStatus=RoadStatus.Road
|
||||
|
||||
else if(getCenterTile().roadStatus!=RoadStatus.Railroad
|
||||
&& getGameBasics().TileImprovements["Railroad"]!!.techRequired in civInfo.tech.techsResearched)
|
||||
&& getRuleset().TileImprovements["Railroad"]!!.techRequired in civInfo.tech.techsResearched)
|
||||
getCenterTile().roadStatus=RoadStatus.Railroad
|
||||
}
|
||||
|
||||
fun getGoldForSellingBuilding(buildingName:String) = getGameBasics().Buildings[buildingName]!!.cost / 10
|
||||
fun getGoldForSellingBuilding(buildingName:String) = getRuleset().Buildings[buildingName]!!.cost / 10
|
||||
|
||||
fun sellBuilding(buildingName:String){
|
||||
cityConstructions.builtBuildings.remove(buildingName)
|
||||
|
|
|
@ -6,9 +6,9 @@ import com.unciv.logic.civilization.CityStateType
|
|||
import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
||||
import com.unciv.logic.map.BFS
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import com.unciv.models.stats.Stat
|
||||
import com.unciv.models.stats.Stats
|
||||
|
||||
|
@ -74,7 +74,7 @@ class CityStats {
|
|||
|
||||
private fun getStatPercentBonusesFromRailroad(): Stats {
|
||||
val stats = Stats()
|
||||
val techEnablingRailroad = cityInfo.getGameBasics().TileImprovements["Railroad"]!!.techRequired!!
|
||||
val techEnablingRailroad = cityInfo.getRuleset().TileImprovements["Railroad"]!!.techRequired!!
|
||||
// If we conquered enemy cities connected by railroad, but we don't yet have that tech,
|
||||
// we shouldn't get bonuses, it's as if the tracks aare layed out but we can't operate them.
|
||||
if (cityInfo.civInfo.tech.isResearched(techEnablingRailroad)
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.unciv.logic.civilization
|
|||
|
||||
import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.stats.Stat
|
||||
import com.unciv.models.stats.StatMap
|
||||
import com.unciv.models.stats.Stats
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
|||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.map.BFS
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tile.ResourceSupplyList
|
||||
import com.unciv.models.ruleset.tile.ResourceSupplyList
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
import kotlin.collections.set
|
||||
|
|
|
@ -14,10 +14,10 @@ import com.unciv.logic.map.MapUnit
|
|||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.logic.trade.TradeEvaluation
|
||||
import com.unciv.logic.trade.TradeRequest
|
||||
import com.unciv.models.gamebasics.*
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
import com.unciv.models.gamebasics.tile.ResourceSupplyList
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.*
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
import com.unciv.models.ruleset.tile.ResourceSupplyList
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.stats.Stats
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.unciv.logic.civilization
|
||||
|
||||
import com.unciv.Constants
|
||||
import com.unciv.models.gamebasics.Policy
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.ruleset.Policy
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import kotlin.math.min
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.roundToInt
|
||||
|
|
|
@ -5,8 +5,8 @@ import com.badlogic.gdx.graphics.Color
|
|||
import com.unciv.Constants
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.models.gamebasics.tech.Technology
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.tech.Technology
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.ui.utils.withItem
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
@ -43,10 +43,10 @@ class TechManager {
|
|||
return toReturn
|
||||
}
|
||||
|
||||
fun getGameBasics() = civInfo.gameInfo.ruleSet
|
||||
fun getRuleset() = civInfo.gameInfo.ruleSet
|
||||
|
||||
fun costOfTech(techName: String): Int {
|
||||
var techCost = getGameBasics().Technologies[techName]!!.cost.toFloat()
|
||||
var techCost = getRuleset().Technologies[techName]!!.cost.toFloat()
|
||||
if (civInfo.isPlayerCivilization())
|
||||
techCost *= civInfo.getDifficulty().researchCostModifier
|
||||
techCost *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
|
||||
|
@ -69,7 +69,7 @@ class TechManager {
|
|||
fun currentTechnology(): Technology? {
|
||||
val currentTechnologyName = currentTechnologyName()
|
||||
if (currentTechnologyName == null) return null
|
||||
return getGameBasics().Technologies[currentTechnologyName]
|
||||
return getRuleset().Technologies[currentTechnologyName]
|
||||
}
|
||||
|
||||
fun currentTechnologyName(): String? {
|
||||
|
@ -89,7 +89,7 @@ class TechManager {
|
|||
fun isResearched(TechName: String): Boolean = techsResearched.contains(TechName)
|
||||
|
||||
fun canBeResearched(TechName: String): Boolean {
|
||||
return getGameBasics().Technologies[TechName]!!.prerequisites.all { isResearched(it) }
|
||||
return getRuleset().Technologies[TechName]!!.prerequisites.all { isResearched(it) }
|
||||
}
|
||||
|
||||
fun getTechUniques() = researchedTechUniques
|
||||
|
@ -110,7 +110,7 @@ class TechManager {
|
|||
(isResearched(techToCheck.name) || prerequisites.contains(techToCheck)) )
|
||||
continue //no need to add or check prerequisites
|
||||
for (prerequisite in techToCheck.prerequisites)
|
||||
checkPrerequisites.add(getGameBasics().Technologies[prerequisite]!!)
|
||||
checkPrerequisites.add(getRuleset().Technologies[prerequisite]!!)
|
||||
prerequisites.add(techToCheck)
|
||||
}
|
||||
|
||||
|
@ -132,8 +132,8 @@ class TechManager {
|
|||
// We finished it!
|
||||
// http://www.civclub.net/bbs/forum.php?mod=viewthread&tid=123976
|
||||
overflowScience = techsInProgress[currentTechnology]!! - costOfTech(currentTechnology)
|
||||
if(overflowScience > max(scienceForNewTurn * 5, getGameBasics().Technologies[currentTechnology]!!.cost))
|
||||
overflowScience = max(scienceForNewTurn * 5, getGameBasics().Technologies[currentTechnology]!!.cost)
|
||||
if(overflowScience > max(scienceForNewTurn * 5, getRuleset().Technologies[currentTechnology]!!.cost))
|
||||
overflowScience = max(scienceForNewTurn * 5, getRuleset().Technologies[currentTechnology]!!.cost)
|
||||
addTechnology(currentTechnology)
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class TechManager {
|
|||
techsResearched.add(techName)
|
||||
|
||||
// this is to avoid concurrent modification problems
|
||||
val newTech = getGameBasics().Technologies[techName]!!
|
||||
val newTech = getRuleset().Technologies[techName]!!
|
||||
researchedTechnologies = researchedTechnologies.withItem(newTech)
|
||||
for(unique in newTech.uniques)
|
||||
researchedTechUniques = researchedTechUniques.withItem(unique)
|
||||
|
@ -163,11 +163,11 @@ class TechManager {
|
|||
val currentEra = civInfo.getEra()
|
||||
if (previousEra < currentEra) {
|
||||
civInfo.addNotification("You have entered the [$currentEra era]!", null, Color.GOLD)
|
||||
getGameBasics().PolicyBranches.values.filter { it.era == currentEra }
|
||||
getRuleset().PolicyBranches.values.filter { it.era == currentEra }
|
||||
.forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }
|
||||
}
|
||||
|
||||
for(revealedResource in getGameBasics().TileResources.values.filter{ techName == it.revealedBy }){
|
||||
for(revealedResource in getRuleset().TileResources.values.filter{ techName == it.revealedBy }){
|
||||
for (tileInfo in civInfo.gameInfo.tileMap.values
|
||||
.filter { it.resource == revealedResource.name && civInfo == it.getOwner() }) {
|
||||
|
||||
|
@ -181,7 +181,7 @@ class TechManager {
|
|||
}
|
||||
}
|
||||
|
||||
val obsoleteUnits = getGameBasics().Units.values.filter { it.obsoleteTech == techName }
|
||||
val obsoleteUnits = getRuleset().Units.values.filter { it.obsoleteTech == techName }
|
||||
for (city in civInfo.cities)
|
||||
if (city.cityConstructions.getCurrentConstruction() in obsoleteUnits) {
|
||||
val currentConstructionUnit = city.cityConstructions.getCurrentConstruction() as BaseUnit
|
||||
|
@ -217,7 +217,7 @@ class TechManager {
|
|||
techsToResearch = newTechToReseach
|
||||
}
|
||||
|
||||
researchedTechnologies.addAll(techsResearched.map { getGameBasics().Technologies[it]!! })
|
||||
researchedTechnologies.addAll(techsResearched.map { getRuleset().Technologies[it]!! })
|
||||
researchedTechUniques.addAll(researchedTechnologies.flatMap { it.uniques })
|
||||
updateTransientBooleans()
|
||||
}
|
||||
|
@ -235,9 +235,9 @@ class TechManager {
|
|||
}
|
||||
|
||||
fun getBestRoadAvailable(): RoadStatus {
|
||||
if (!isResearched(RoadStatus.Road.improvement(getGameBasics())!!.techRequired!!)) return RoadStatus.None
|
||||
if (!isResearched(RoadStatus.Road.improvement(getRuleset())!!.techRequired!!)) return RoadStatus.None
|
||||
|
||||
val techEnablingRailroad = RoadStatus.Railroad.improvement(getGameBasics())!!.techRequired!!
|
||||
val techEnablingRailroad = RoadStatus.Railroad.improvement(getRuleset())!!.techRequired!!
|
||||
val canBuildRailroad = isResearched(techEnablingRailroad)
|
||||
|
||||
return if (canBuildRailroad) RoadStatus.Railroad else RoadStatus.Road
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.unciv.logic.civilization
|
||||
|
||||
import com.unciv.models.Counter
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
|
||||
class VictoryManager {
|
||||
@Transient lateinit var civInfo: CivilizationInfo
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.unciv.logic.civilization.CivilizationInfo
|
|||
import com.unciv.logic.civilization.PopupAlert
|
||||
import com.unciv.logic.trade.Trade
|
||||
import com.unciv.logic.trade.TradeType
|
||||
import com.unciv.models.gamebasics.tile.ResourceSupplyList
|
||||
import com.unciv.models.ruleset.tile.ResourceSupplyList
|
||||
|
||||
enum class RelationshipLevel{
|
||||
Unforgivable,
|
||||
|
|
|
@ -4,9 +4,9 @@ import com.badlogic.gdx.math.Vector2
|
|||
import com.unciv.Constants
|
||||
import com.unciv.logic.HexMath
|
||||
import com.unciv.models.Counter
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tile.TerrainType
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tile.TerrainType
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
import kotlin.math.*
|
||||
|
|
|
@ -9,11 +9,11 @@ import com.unciv.logic.automation.WorkerAutomation
|
|||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.action.MapUnitAction
|
||||
import com.unciv.logic.map.action.StringAction
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
import com.unciv.models.gamebasics.tile.TerrainType
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
import com.unciv.models.ruleset.tile.TerrainType
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class MapUnit {
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.unciv.logic.map
|
|||
|
||||
import com.unciv.logic.map.RoadStatus.Railroad
|
||||
import com.unciv.logic.map.RoadStatus.Road
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
|
||||
/**
|
||||
* You can use RoadStatus.name to identify [Road] and [Railroad]
|
||||
|
|
|
@ -5,9 +5,9 @@ import com.unciv.Constants
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tile.*
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tile.*
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.Stats
|
||||
import kotlin.math.abs
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.unciv.Constants
|
|||
import com.unciv.logic.GameInfo
|
||||
import com.unciv.logic.HexMath
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
|
||||
class TileMap {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.unciv.logic.map
|
||||
|
||||
import com.unciv.models.gamebasics.unit.Promotion
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.Promotion
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
|
||||
class UnitPromotions{
|
||||
@Transient lateinit var unit:MapUnit
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.unciv.logic.automation.Automation
|
|||
import com.unciv.logic.automation.ThreatLevel
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import kotlin.math.min
|
||||
import kotlin.math.sqrt
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.unciv.logic.trade
|
|||
import com.unciv.Constants
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tr
|
||||
|
||||
class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: CivilizationInfo){
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.logic.trade
|
||||
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
|
||||
data class TradeOffer(var name:String, var type: TradeType,
|
||||
/** 0 for offers that are immediate (e.g. gold transfer) */ var duration:Int, var amount:Int=1) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.unciv.models.metadata
|
||||
|
||||
import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
|
||||
class GameParameters { // Default values are the default new game
|
||||
var difficulty = "Prince"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.unciv.models.stats.INamed
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.unciv.Constants
|
||||
import com.unciv.logic.city.CityConstructions
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.unciv.models.stats.INamed
|
||||
import java.util.*
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
|
||||
interface ICivilopedia {
|
|
@ -1,8 +1,7 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.unciv.logic.civilization.CityStateType
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.stats.INamed
|
||||
import com.unciv.ui.utils.colorFromRGB
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.unciv.models.stats.INamed
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
|
||||
class PolicyBranch : Policy() {
|
||||
var policies: ArrayList<Policy> = arrayListOf()
|
|
@ -1,14 +1,14 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
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
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.gamebasics.unit.Promotion
|
||||
import com.unciv.models.ruleset.tech.TechColumn
|
||||
import com.unciv.models.ruleset.tech.Technology
|
||||
import com.unciv.models.ruleset.tile.Terrain
|
||||
import com.unciv.models.ruleset.tile.TileImprovement
|
||||
import com.unciv.models.ruleset.tile.TileResource
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.unit.Promotion
|
||||
import com.unciv.models.stats.INamed
|
||||
import kotlin.collections.set
|
||||
|
||||
|
@ -118,6 +118,25 @@ class Ruleset {
|
|||
Translations.add(file.readString(Charsets.UTF_8.name()))
|
||||
}
|
||||
}
|
||||
for(language in Translations.getLanguages()){
|
||||
val translationsOfLanguage = HashMap<String,String>()
|
||||
val stringBuilder=StringBuilder()
|
||||
for(translation in Translations.values) {
|
||||
|
||||
stringBuilder.append(translation.entry)
|
||||
stringBuilder.append('=')
|
||||
|
||||
|
||||
if (translation.containsKey(language))
|
||||
stringBuilder.append(translation[language]!!)
|
||||
stringBuilder.appendln()
|
||||
}
|
||||
|
||||
val finalFile = stringBuilder.toString()
|
||||
Gdx.files.local("jsons/Translations/$language.json")
|
||||
.writeString(finalFile,false,Charsets.UTF_8.name())
|
||||
}
|
||||
|
||||
val translationFilesTime = System.currentTimeMillis() - translationStart
|
||||
println("Loading translation files - "+translationFilesTime+"ms")
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics
|
||||
package com.unciv.models.ruleset
|
||||
|
||||
import com.badlogic.gdx.utils.JsonReader
|
||||
import com.unciv.UncivGame
|
||||
|
@ -29,6 +29,8 @@ class Translations : HashMap<String, TranslationEntry>(){
|
|||
}
|
||||
currentEntry = currentEntry.next
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun get(text:String,language:String): String {
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.tech
|
||||
package com.unciv.models.ruleset.tech
|
||||
|
||||
import java.util.*
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.tech
|
||||
package com.unciv.models.ruleset.tech
|
||||
|
||||
enum class TechEra{
|
||||
Ancient,
|
|
@ -1,11 +1,11 @@
|
|||
package com.unciv.models.gamebasics.tech
|
||||
package com.unciv.models.ruleset.tech
|
||||
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import java.util.*
|
||||
|
||||
class Technology {
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.tile
|
||||
package com.unciv.models.ruleset.tile
|
||||
|
||||
enum class ResourceType {
|
||||
Luxury,
|
|
@ -1,8 +1,8 @@
|
|||
package com.unciv.models.gamebasics.tile
|
||||
package com.unciv.models.ruleset.tile
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.NamedStats
|
||||
import com.unciv.ui.utils.colorFromRGB
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.tile
|
||||
package com.unciv.models.ruleset.tile
|
||||
|
||||
enum class TerrainType {
|
||||
Land,
|
|
@ -1,8 +1,8 @@
|
|||
package com.unciv.models.gamebasics.tile
|
||||
package com.unciv.models.ruleset.tile
|
||||
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.NamedStats
|
||||
import com.unciv.models.stats.Stats
|
||||
import java.util.*
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.models.gamebasics.tile
|
||||
package com.unciv.models.ruleset.tile
|
||||
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.NamedStats
|
||||
import com.unciv.models.stats.Stats
|
||||
import java.util.*
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.unit
|
||||
package com.unciv.models.ruleset.unit
|
||||
|
||||
import com.unciv.Constants
|
||||
import com.unciv.UncivGame
|
||||
|
@ -6,9 +6,9 @@ import com.unciv.logic.city.CityConstructions
|
|||
import com.unciv.logic.city.IConstruction
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.Translations
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.Translations
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.INamed
|
||||
|
||||
// This is BaseUnit because Unit is already a base Kotlin class and to avoid mixing the two up
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.models.gamebasics.unit
|
||||
package com.unciv.models.ruleset.unit
|
||||
|
||||
import com.unciv.models.gamebasics.ICivilopedia
|
||||
import com.unciv.models.ruleset.ICivilopedia
|
||||
import com.unciv.models.stats.INamed
|
||||
|
||||
class Promotion : ICivilopedia, INamed{
|
|
@ -1,4 +1,4 @@
|
|||
package com.unciv.models.gamebasics.unit
|
||||
package com.unciv.models.ruleset.unit
|
||||
|
||||
enum class UnitType{
|
||||
City,
|
|
@ -1,6 +1,6 @@
|
|||
package com.unciv.models.stats
|
||||
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
|
||||
|
||||
open class Stats() {
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.badlogic.gdx.Gdx
|
|||
import com.badlogic.gdx.scenes.scene2d.Actor
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.*
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import java.util.*
|
||||
|
||||
|
@ -21,7 +21,7 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() {
|
|||
this.image = image
|
||||
}
|
||||
|
||||
constructor() : this("","") // Needed for GameBAsics json deserializing
|
||||
constructor() : this("","") // Needed for GameBasics json deserializing
|
||||
}
|
||||
|
||||
val categoryToEntries = LinkedHashMap<String, Collection<CivilopediaEntry>>()
|
||||
|
@ -112,7 +112,9 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() {
|
|||
sp.setupOverscroll(5f, 1f, 200f)
|
||||
entryTable.add(sp).width(Value.percentWidth(0.25f, entryTable)).height(Value.percentHeight(0.7f, entryTable))
|
||||
.pad(Value.percentWidth(0.02f, entryTable))
|
||||
entryTable.add(description).colspan(4).width(Value.percentWidth(0.65f, entryTable)).height(Value.percentHeight(0.7f, entryTable))
|
||||
entryTable.add(ScrollPane(description)).colspan(4)
|
||||
.width(Value.percentWidth(0.65f, entryTable))
|
||||
.height(Value.percentHeight(0.7f, entryTable))
|
||||
.pad(Value.percentWidth(0.02f, entryTable))
|
||||
// Simply changing these to x*width, y*height won't work
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.unciv.logic.civilization.CivilizationInfo
|
|||
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
||||
import com.unciv.logic.trade.Trade
|
||||
import com.unciv.logic.trade.TradeOffersList
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.cityscreen.CityScreen
|
||||
import com.unciv.ui.utils.*
|
||||
import java.text.DecimalFormat
|
||||
|
|
|
@ -5,8 +5,8 @@ import com.badlogic.gdx.scenes.scene2d.Touchable
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.enable
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.newgamescreen.NewGameScreen
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.pickerscreens.PolicyPickerScreen
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.badlogic.gdx.utils.Align
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.civilization.GreatPersonManager
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.Stat
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.optionstable.YesNoPopupTable
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.unciv.UncivGame
|
|||
import com.unciv.logic.HexMath
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.stats.Stat
|
||||
import com.unciv.models.stats.Stats
|
||||
import com.unciv.ui.tilegroups.TileSetStrings
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.onClick
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.disable
|
||||
|
|
|
@ -9,9 +9,9 @@ import com.badlogic.gdx.utils.Align
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.city.SpecialConstruction
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.optionstable.YesNoPopupTable
|
||||
|
||||
|
@ -94,7 +94,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre
|
|||
constructionPickerTable.background = ImageGetter.getBackground(Color.BLACK)
|
||||
|
||||
val units = ArrayList<Table>()
|
||||
for (unit in city.getGameBasics().Units.values.filter { it.shouldBeDisplayed(cityConstructions) }) {
|
||||
for (unit in city.getRuleset().Units.values.filter { it.shouldBeDisplayed(cityConstructions) }) {
|
||||
val turnsToUnit = cityConstructions.turnsToConstruction(unit.name)
|
||||
units += getProductionButton(unit.name,
|
||||
unit.name.tr() + "\r\n" + turnsToUnit + (if(turnsToUnit>1) " {turns}".tr() else " {turn}".tr()),
|
||||
|
@ -107,7 +107,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre
|
|||
val buildableNationalWonders = ArrayList<Table>()
|
||||
val buildableBuildings = ArrayList<Table>()
|
||||
|
||||
for (building in city.getGameBasics().Buildings.values) {
|
||||
for (building in city.getRuleset().Buildings.values) {
|
||||
if (!building.shouldBeDisplayed(cityConstructions) && building.name != cityConstructions.currentConstruction) continue
|
||||
val turnsToBuilding = cityConstructions.turnsToConstruction(building.name)
|
||||
val productionTextButton = getProductionButton(building.name,
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.MapSaver
|
||||
import com.unciv.logic.map.TileMap
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.saves.Gzip
|
||||
import com.unciv.ui.utils.*
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.unciv.UncivGame
|
|||
import com.unciv.logic.MapSaver
|
||||
import com.unciv.logic.map.MapType
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.saves.Gzip
|
||||
import com.unciv.ui.utils.onClick
|
||||
import com.unciv.ui.worldscreen.optionstable.DropBox
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.MapSaver
|
||||
import com.unciv.logic.map.TileMap
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.tilegroups.TileGroup
|
||||
import com.unciv.ui.tilegroups.TileSetStrings
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
|
|
|
@ -10,11 +10,11 @@ import com.unciv.Constants
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tile.Terrain
|
||||
import com.unciv.models.gamebasics.tile.TerrainType
|
||||
import com.unciv.models.gamebasics.tile.TileImprovement
|
||||
import com.unciv.models.gamebasics.tile.TileResource
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tile.Terrain
|
||||
import com.unciv.models.ruleset.tile.TerrainType
|
||||
import com.unciv.models.ruleset.tile.TileImprovement
|
||||
import com.unciv.models.ruleset.tile.TileResource
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.tilegroups.TileGroup
|
||||
import com.unciv.ui.tilegroups.TileSetStrings
|
||||
import com.unciv.ui.utils.*
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener
|
||||
import com.unciv.logic.map.MapParameters
|
||||
import com.unciv.logic.map.MapType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.toLabel
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ package com.unciv.ui.newgamescreen
|
|||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Label
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.unciv.models.gamebasics.Nation
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.Translations
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Nation
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.Translations
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.toLabel
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.unciv.logic.GameInfo
|
|||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.logic.GameStarter
|
||||
import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.utils.disable
|
||||
import com.unciv.ui.utils.enable
|
||||
|
|
|
@ -8,10 +8,10 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener
|
||||
import com.badlogic.gdx.utils.Array
|
||||
import com.unciv.logic.MapSaver
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.VictoryType
|
||||
import com.unciv.models.gamebasics.tech.TechEra
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.VictoryType
|
||||
import com.unciv.models.ruleset.tech.TechEra
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.metadata.GameSpeed
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.toLabel
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextField
|
|||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.models.gamebasics.Ruleset
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.metadata.GameParameters
|
||||
import com.unciv.models.metadata.Player
|
||||
import com.unciv.ui.utils.*
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.Button
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.GreatPersonManager
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.onClick
|
||||
import com.unciv.ui.utils.toLabel
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.tile.TileImprovement
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tile.TileImprovement
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.addSeparatorVertical
|
||||
import com.unciv.ui.utils.onClick
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.unciv.ui.pickerscreens
|
|||
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.*
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.*
|
||||
|
||||
open class PickerScreen : CameraStageBaseScreen() {
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.Policy
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.Policy
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.WorldScreen
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup
|
|||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.models.gamebasics.Translations
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.Promotion
|
||||
import com.unciv.models.ruleset.Translations
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.models.ruleset.unit.Promotion
|
||||
import com.unciv.ui.utils.*
|
||||
|
||||
class PromotionPickerScreen(val unit: MapUnit) : PickerScreen() {
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.unciv.Constants
|
|||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.TechManager
|
||||
import com.unciv.models.gamebasics.tech.Technology
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tech.Technology
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import java.util.*
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.utils.disable
|
||||
import com.unciv.ui.utils.enable
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener
|
|||
import com.badlogic.gdx.utils.Json
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.utils.enable
|
||||
import com.unciv.ui.utils.onClick
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.unciv.logic.HexMath
|
|||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.center
|
||||
import com.unciv.ui.utils.centerX
|
||||
|
|
|
@ -18,7 +18,7 @@ import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
|||
import com.unciv.logic.trade.TradeLogic
|
||||
import com.unciv.logic.trade.TradeOffer
|
||||
import com.unciv.logic.trade.TradeType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.optionstable.YesNoPopupTable
|
||||
import kotlin.math.roundToInt
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.unciv.logic.trade.TradeLogic
|
|||
import com.unciv.logic.trade.TradeOffer
|
||||
import com.unciv.logic.trade.TradeOffersList
|
||||
import com.unciv.logic.trade.TradeType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.addSeparator
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.unciv.logic.trade.TradeOffer
|
|||
import com.unciv.logic.trade.TradeOffersList
|
||||
import com.unciv.logic.trade.TradeType
|
||||
import com.unciv.logic.trade.TradeType.*
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.cityscreen.ExpanderTab
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.disable
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
|||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.trade.TradeLogic
|
||||
import com.unciv.logic.trade.TradeRequest
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.utils.CameraStageBaseScreen
|
||||
import com.unciv.ui.utils.disable
|
||||
import com.unciv.ui.utils.enable
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.*
|
|||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener
|
||||
import com.badlogic.gdx.utils.viewport.ExtendViewport
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
open class CameraStageBaseScreen : Screen {
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.badlogic.gdx.scenes.scene2d.utils.Drawable
|
|||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.Nation
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.ruleset.Nation
|
||||
import com.unciv.models.ruleset.tile.ResourceType
|
||||
|
||||
object ImageGetter {
|
||||
private const val whiteDotLocation = "OtherIcons/whiteDot"
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx
|
|||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||
import com.badlogic.gdx.utils.Array
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.ruleset.tr
|
||||
import com.unciv.ui.worldscreen.optionstable.PopupTable
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue