diff --git a/android/assets/jsons/Tutorials/Tutorials_Simplified_Chinese.json b/android/assets/jsons/Tutorials/Tutorials_Simplified_Chinese.json index af1ca562ce..e6633d718c 100644 --- a/android/assets/jsons/Tutorials/Tutorials_Simplified_Chinese.json +++ b/android/assets/jsons/Tutorials/Tutorials_Simplified_Chinese.json @@ -4,31 +4,13 @@ Introduction: [ [ - "Welcome to Unciv!", - "Because this is a complex game, there are basic tasks to help familiarize you with the game.", - "These are completely optional, and you're welcome to explore the game on your own!" - ] - ], - Culture_and_Policies: [ - [ - "文化可以通过建设文化建筑或奇观、推行社会政策等积累。", - "当您有足够的文化时, 可以推行一项社会政策,", - "每项社会政策都给您一定的奖励。" - ], - [ - "社会政策被划分成几个分支,每个分支都有自己的子政策,", - "当一个分支社会政策的所有子政策都被推行,", - "会有一个额外的奖励。" - ], - [ - "随着每项社会政策的推行,每座城市的建立,", - "推行新的社会政策时的文化花费会随之提升--所以要明智地选择!" + "您好,欢迎来到绚丽多彩的UnCiv游戏世界!", + "文明游戏是复杂的,让我们通过一些简单的任务来熟悉它吧。", + "这些任务是可选的,当然您也可以自己探索游戏世界!" ] ], New_Game: [ [ - "您好,欢迎来到绚丽多彩的UnCiv游戏世界!", - "文明游戏是复杂的,让我们通过教程来引导您开始一段奇妙的旅程。", "您的第一个任务是建立首都,", "这个任务是非常重要的,因为通常情况下首都会成为你的文明最繁荣的城市。", "游戏中解锁政策、科技等带来的很多增益往往只对首都有效,所以首都的发展代表了您的文明的发达程度。" @@ -47,6 +29,39 @@ "随着城市的不断繁荣发展和边界的扩张,城市将慢慢靠近该资源直至获得它。", "如果需要马上获得所需的战略资源你可以选择建城在靠近资源的位置--", "有时候这样做可能对游戏的胜利更有利,但通常情况下您都有充裕的时间选择更加合理的建立点。" + ], + [ + "您的城市第一个组建的单位应当是勇士或斥候。", + "我非常喜欢勇士,因为他可以用于防守,", + "同时在研发“铁器”科技后只需花少量的金钱就可以把他升级为剑士。", + "当您的城市位于大片森林或丘陵间时斥候是非常有效的选择,", + "因为他在这些地形移动时没有移动力惩罚。", + "如果您是4x游戏的行家里手,紧随第一个勇士或斥候的单位应该是移民。", + "请记住:快速扩张永远是获取胜利的不二法门!" + ] + ], + _Slow_Start: [ + [ + "在游戏开始的最初几回合,", + "您只需进行很少的操作。", + "但随着您的文明的发展,", + "很多事情必须面面俱到。" + ] + ], + Culture_and_Policies: [ + [ + "文化可以通过建设文化建筑或奇观、推行社会政策等积累。", + "当您有足够的文化时, 可以推行一项社会政策,", + "每项社会政策都给您一定的奖励。" + ], + [ + "社会政策被划分成几个分支,每个分支都有自己的子政策,", + "当一个分支社会政策的所有子政策都被推行,", + "会有一个额外的奖励。" + ], + [ + "随着每项社会政策的推行,每座城市的建立,", + "推行新的社会政策时的文化花费会随之提升--所以要明智地选择!" ] ], Happiness: [ @@ -69,34 +84,6 @@ "只有当您在寻找到一个合适的位置后再来建立新的城市吧。" ] ], - _Slow_Start: [ - [ - "在游戏开始的最初几回合,", - "您只需进行很少的操作。", - "但随着您的文明的发展,", - "很多事情必须面面俱到。" - ] - ], - Contact_Me: [ - [ - "您好!玩到这里,您已经熟悉了游戏的全部内容,", - "您会发现游戏目前是不完整的,它还处于开发状态。", - "不过UnCiv将永远是开源和免费的,", - "这意味着您无须担心广告或付费问题。" - ], - [ - "您的支持将激励着我进一步完善它,", - "我一定会竭尽全力、精益求精。", - "感谢玩家们的支持--您们是最棒的!" - ], - [ - "如果喜欢它,请到Play Store对它进行评价。", - "如果您发现了游戏存在的问题或有什么好的意见和建议,", - "请联系我!", - "我的email地址:yairm210@hotmail.com,", - "GitHub项目页面:https://github.com/yairm210/UnCiv。" - ] - ], Unhappiness: [ [ "看来您的市民不太高兴!", @@ -138,9 +125,9 @@ ], [ "在Unciv游戏中,有三种赢得胜利的方式。分别是:", - "文化胜利---完成4个社会政策分支;", - "征服胜利---通过消灭其他文明成为世界上唯一的存在;", - "科技胜利---成为第一个建造太空飞船飞向遥远的半人马阿尔法星的文明。" + "文化胜利--完成4个社会政策分支;", + "征服胜利--消灭其他文明成为世界上唯一的存在;", + "科技胜利--成为第一个建造太空飞船飞向遥远的半人马阿尔法星的文明。" ], [ "小心谋划、认真算计、稳扎稳打、步步为营,这是游玩Unciv游戏的基本法则。", @@ -263,6 +250,26 @@ "如果想完全禁用“下个闲置单位”按钮,请进入“设置”菜单并将“回合结束前查看闲置单位”设置为“否”。" ] ], + Contact_Me: [ + [ + "您好!玩到这里,您已经熟悉了游戏的全部内容,", + "您会发现游戏目前是不完整的,它还处于开发状态。", + "不过UnCiv将永远是开源和免费的,", + "这意味着您无须担心广告或付费问题。" + ], + [ + "您的支持将激励着我进一步完善它,", + "我一定会竭尽全力、精益求精。", + "感谢玩家们的支持--您们是最棒的!" + ], + [ + "如果喜欢它,请到Play Store对它进行评价。", + "如果您发现了游戏存在的问题或有什么好的意见和建议,", + "请联系我!", + "我的email地址:yairm210@hotmail.com,", + "GitHub项目页面:https://github.com/yairm210/UnCiv。" + ] + ], _Pillaging: [ [ "军事单位可以劫掠地块设施,“劫掠”可以回复单位25点生命值同时将设施化为废墟。", diff --git a/android/assets/jsons/Tutorials/Tutorials_Traditional_Chinese.json b/android/assets/jsons/Tutorials/Tutorials_Traditional_Chinese.json index 9f414119d6..988414d3d7 100644 --- a/android/assets/jsons/Tutorials/Tutorials_Traditional_Chinese.json +++ b/android/assets/jsons/Tutorials/Tutorials_Traditional_Chinese.json @@ -4,31 +4,13 @@ Introduction: [ [ - "Welcome to Unciv!", - "Because this is a complex game, there are basic tasks to help familiarize you with the game.", - "These are completely optional, and you're welcome to explore the game on your own!" - ] - ], - Culture_and_Policies: [ - [ - "文化可以通過建設文化建築或奇觀、推行社會政策等累積。", - "當您有足夠的文化點數時, 可以推行一項社會政策,", - "每項社會政策都會給您一定的獎勵。" - ], - [ - "社會政策被話分成幾個分支,每個分支都有自己的子政策,", - "當一個分支社會政策的所有子政策都被推行,", - "會有一個額外的獎勵。" - ], - [ - "隨著每項社會政策的推行,每座城市的建立,", - "推行新的社會政策時的文化花費會隨之提升--所以要明智地選擇!" + "您好,歡迎來到絢麗多彩的UnCiv遊戲世界!", + "文明遊戲是復雜的,讓我們通過一些簡單的任務來熟悉它吧。", + "這些任務是可選的,當然您也可以自己探索遊戲世界!" ] ], New_Game: [ [ - "您好,欢迎来到绚丽多彩的UnCiv游戏世界!", - "文明游戏是复杂的,让我们通过教程来引导您开始一段奇妙的旅程。", "您的第一个任务是建立首都,", "这个任务是非常重要的,因为通常情况下首都会成为你的文明最繁荣的城市。", "游戏中解锁政策、科技等带来的很多增益往往只对首都有效,所以首都的发展代表了您的文明的发达程度。" @@ -47,6 +29,39 @@ "随着城市的不断繁荣发展和边界的扩张,城市将慢慢靠近该资源直至获得它。", "如果需要马上获得所需的战略资源你可以选择建城在靠近资源的位置--", "有时候这样做可能对游戏的胜利更有利,但通常情况下您都有充裕的时间选择更加合理的建立点。" + ], + [ + "您的城市第一個組建的單位應當是勇士或斥候。", + "我非常喜歡勇士,因為他可以用於防守,", + "同時在研發“鐵器”科技後只需花少量的金錢就可以把他升級為劍士。", + "當您的城市位於大片森林或丘陵間時斥候是非常有效的選擇,", + "因為他在這些地形移動時沒有移動力懲罰。", + "如果您是4x遊戲的行家裏手,緊隨第一個勇士或斥候的單位應該是移民。", + "請記住:快速擴張永遠是獲取勝利的不二法門!" + ] + ], + _Slow_Start: [ + [ + "在游戏开始的最初几回合,", + "您只需进行很少的操作。", + "但随着您的文明的发展,", + "很多事情必须面面俱到。" + ] + ], + Culture_and_Policies: [ + [ + "文化可以通過建設文化建築或奇觀、推行社會政策等累積。", + "當您有足夠的文化點數時, 可以推行一項社會政策,", + "每項社會政策都會給您一定的獎勵。" + ], + [ + "社會政策被話分成幾個分支,每個分支都有自己的子政策,", + "當一個分支社會政策的所有子政策都被推行,", + "會有一個額外的獎勵。" + ], + [ + "隨著每項社會政策的推行,每座城市的建立,", + "推行新的社會政策時的文化花費會隨之提升--所以要明智地選擇!" ] ], Happiness: [ @@ -69,34 +84,6 @@ "只有当您在寻找到一个合适的位置后再来建立新的城市吧。" ] ], - _Slow_Start: [ - [ - "在游戏开始的最初几回合,", - "您只需进行很少的操作。", - "但随着您的文明的发展,", - "很多事情必须面面俱到。" - ] - ], - Contact_Me: [ - [ - "您好!玩到这里,您已经熟悉了游戏的全部内容,", - "您会发现游戏目前是不完整的,它还处于开发状态。", - "不过UnCiv将永远是开源和免费的,", - "这意味着您无须担心广告或付费问题。" - ], - [ - "您的支持将激励着我进一步完善它,", - "我一定会竭尽全力、精益求精。", - "感谢玩家们的支持--您们是最棒的!" - ], - [ - "如果喜欢它,请到Play Store对它进行评价。", - "如果您发现了游戏存在的问题或有什么好的意见和建议,", - "请联系我!", - "我的email地址:yairm210@hotmail.com,", - "GitHub项目页面:https://github.com/yairm210/UnCiv。" - ] - ], Unhappiness: [ [ "看来您的市民不太高兴!", @@ -138,9 +125,9 @@ ], [ "在Unciv游戏中,有三种赢得胜利的方式。分别是:", - "文化胜利---完成4个社会政策分支;", - "征服胜利---通过消灭其他文明成为世界上唯一的存在;", - "科技胜利---成为第一个建造太空飞船飞向遥远的半人马阿尔法星的文明。" + "文化胜利--完成4个社会政策分支;", + "征服胜利--消灭其他文明成为世界上唯一的存在;", + "科技胜利--成为第一个建造太空飞船飞向遥远的半人马阿尔法星的文明。" ], [ "小心谋划、认真算计、稳扎稳打、步步为营,这是游玩Unciv游戏的基本法则。", @@ -263,6 +250,26 @@ "如果想完全禁用“下个闲置单位”按钮,请进入“设置”菜单并将“回合结束前查看闲置单位”设置为“否”。" ] ], + Contact_Me: [ + [ + "您好!玩到这里,您已经熟悉了游戏的全部内容,", + "您会发现游戏目前是不完整的,它还处于开发状态。", + "不过UnCiv将永远是开源和免费的,", + "这意味着您无须担心广告或付费问题。" + ], + [ + "您的支持将激励着我进一步完善它,", + "我一定会竭尽全力、精益求精。", + "感谢玩家们的支持--您们是最棒的!" + ], + [ + "如果喜欢它,请到Play Store对它进行评价。", + "如果您发现了游戏存在的问题或有什么好的意见和建议,", + "请联系我!", + "我的email地址:yairm210@hotmail.com,", + "GitHub项目页面:https://github.com/yairm210/UnCiv。" + ] + ], _Pillaging: [ [ "军事单位可以劫掠地块设施,“劫掠”可以回复单位25点生命值同时将设施化为废墟。", diff --git a/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties b/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties index 4bf3e19bc4..461169fd76 100644 --- a/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties +++ b/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties @@ -1010,22 +1010,22 @@ Brush Size = 笔刷大小 # Civilopedia Tutorials names -After Conquering = 征服之后 -City Range = 城市范围 -Contact Me = 联系我 +After Conquering = 占领城市的处理 +City Range = 城市工作范围 +Contact Me = 联系我吧! Culture and Policies = 文化与政策 -Embarking = 登船 -Enemy City = 敌方城邦 +Embarking = 陆军单位的船运 +Enemy City = 敌方城市 Idle Units = 空闲单位 Injured Units = 受伤单位 -Introduction = 导言 -Luxury Resource = 奢侈品 -New Game = 新游戏 -Roads and Railroads = 公路及铁路 +Introduction = 游戏介绍 +Luxury Resource = 奢侈资源 +New Game = 开始新游戏 +Roads and Railroads = 道路与铁路 Siege Units = 攻城单位 Strategic Resource = 战略资源 -Unhappiness = 不快乐 -Victory Types = 胜利类型 +Unhappiness = 不满与快乐值 +Victory Types = 获取胜利的方法 Workers = 工人 # Other civilopedia things diff --git a/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties b/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties index d53035a150..6e2b581741 100644 --- a/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties +++ b/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties @@ -783,7 +783,7 @@ Start Golden Age = 開啟黃金時代 Yes = 是 No = 否 Acquire = 變更為本城市所屬 -Gold = 金錢 +Gold = Gold Science = 科學 Happiness = 快樂 Production = 產能 @@ -1010,22 +1010,22 @@ Brush Size = 筆刷大小 # Civilopedia Tutorials names -After Conquering = 佔領城市的後事 +After Conquering = 佔領城市的處理 City Range = 城市工作範圍 Contact Me = 聯絡我吧! Culture and Policies = 文化與政策 -Embarking = 陸地單位的船運 -Enemy City = 敵對城市 +Embarking = 陸軍單位的船運 +Enemy City = 敵方城市 Idle Units = 閒置單位 -Injured Units = 傷兵 +Injured Units = 受傷單位 Introduction = 遊戲介紹 Luxury Resource = 奢侈資源 -New Game = 新遊戲 +New Game = 開始新遊戲 Roads and Railroads = 道路與鐵路 Siege Units = 攻城單位 Strategic Resource = 策略資源 Unhappiness = 不滿與快樂值 -Victory Types = 勝利條件 +Victory Types = 獲取勝利的方法 Workers = 工人 # Other civilopedia things diff --git a/core/src/com/unciv/logic/HexMath.kt b/core/src/com/unciv/logic/HexMath.kt index 392e121588..7fb67e1847 100644 --- a/core/src/com/unciv/logic/HexMath.kt +++ b/core/src/com/unciv/logic/HexMath.kt @@ -7,7 +7,7 @@ import kotlin.math.* object HexMath { fun getVectorForAngle(angle: Float): Vector2 { - return Vector2(Math.sin(angle.toDouble()).toFloat(), Math.cos(angle.toDouble()).toFloat()) + return Vector2(sin(angle.toDouble()).toFloat(), cos(angle.toDouble()).toFloat()) } private fun getVectorByClockHour(hour: Int): Vector2 { diff --git a/core/src/com/unciv/ui/map/TileGroupMap.kt b/core/src/com/unciv/ui/map/TileGroupMap.kt index 1d13845540..6a6a85d274 100644 --- a/core/src/com/unciv/ui/map/TileGroupMap.kt +++ b/core/src/com/unciv/ui/map/TileGroupMap.kt @@ -4,6 +4,8 @@ import com.badlogic.gdx.math.Vector2 import com.badlogic.gdx.scenes.scene2d.Group import com.unciv.logic.HexMath import com.unciv.ui.tilegroups.TileGroup +import kotlin.math.max +import kotlin.math.min class TileGroupMap(val tileGroups: Collection, val padding: Float): Group(){ var topX = -Float.MAX_VALUE @@ -18,10 +20,10 @@ class TileGroupMap(val tileGroups: Collection, val padding: Flo tileGroup.setPosition(positionalVector.x * 0.8f * groupSize.toFloat(), positionalVector.y * 0.8f * groupSize.toFloat()) - topX = Math.max(topX, tileGroup.x + groupSize) - topY = Math.max(topY, tileGroup.y + groupSize) - bottomX = Math.min(bottomX, tileGroup.x) - bottomY = Math.min(bottomY, tileGroup.y) + topX = max(topX, tileGroup.x + groupSize) + topY = max(topY, tileGroup.y + groupSize) + bottomX = min(bottomX, tileGroup.x) + bottomY = min(bottomY, tileGroup.y) } for (group in tileGroups) { diff --git a/core/src/com/unciv/ui/worldscreen/Minimap.kt b/core/src/com/unciv/ui/worldscreen/Minimap.kt index be3a626ebe..6b0e797b88 100644 --- a/core/src/com/unciv/ui/worldscreen/Minimap.kt +++ b/core/src/com/unciv/ui/worldscreen/Minimap.kt @@ -13,8 +13,11 @@ import com.unciv.logic.HexMath import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.TileInfo import com.unciv.ui.utils.ImageGetter +import com.unciv.ui.utils.center import com.unciv.ui.utils.onClick import com.unciv.ui.utils.surroundWithCircle +import kotlin.math.max +import kotlin.math.min class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ val allTiles = Group() @@ -27,6 +30,7 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ } init{ + setScrollingDisabled(true,true) var topX = 0f var topY = 0f var bottomX = 0f @@ -36,7 +40,7 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ val hex = ImageGetter.getImage("OtherIcons/Hexagon") val positionalVector = HexMath.hex2WorldCoords(tileInfo.position) - val groupSize = 10f + val groupSize = mapHolder.worldScreen.stage.height / 8f / mapHolder.tileMap.mapParameters.size.radius hex.setSize(groupSize,groupSize) hex.setPosition(positionalVector.x * 0.5f * groupSize, positionalVector.y * 0.5f * groupSize) @@ -47,10 +51,10 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ allTiles.addActor(hex) tileImages[tileInfo] = hex - topX = Math.max(topX, hex.x + groupSize) - topY = Math.max(topY, hex.y + groupSize) - bottomX = Math.min(bottomX, hex.x) - bottomY = Math.min(bottomY, hex.y) + topX = max(topX, hex.x + groupSize) + topY = max(topY, hex.y + groupSize) + bottomX = min(bottomX, hex.x) + bottomY = min(bottomY, hex.y) } for (group in allTiles.children) { @@ -59,7 +63,7 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ // there are tiles "below the zero", // so we zero out the starting position of the whole board so they will be displayed as well - allTiles.setSize(10 + topX - bottomX, 10 + topY - bottomY) + allTiles.setSize(topX - bottomX, topY - bottomY) actor = allTiles layout() @@ -82,6 +86,15 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){ else if (tileInfo.getCity() != null && !tileInfo.isWater) hex.color = tileInfo.getOwner()!!.nation.getOuterColor() else hex.color = tileInfo.getBaseTerrain().getColor().lerp(Color.GRAY, 0.5f) + if (tileInfo.isCityCenter() && tileInfo.owningCity!!.getTiles().any { cloneCivilization.exploredTiles.contains(it.position) }) { + val nationIcon= ImageGetter.getNationIndicator(tileInfo.owningCity!!.civInfo.nation,hex.width * 3) + nationIcon.setPosition(hex.x - nationIcon.width/3,hex.y - nationIcon.height/3) + nationIcon.onClick { + mapHolder.setCenterPosition(tileInfo.position) + setScrollTomapHolder() + } + allTiles.addActor(nationIcon) + } } } } @@ -98,7 +111,7 @@ class MinimapHolder(mapHolder: WorldMapHolder): Table(){ fun getWrappedMinimap(): Table { val internalMinimapWrapper = Table() - internalMinimapWrapper.add(minimap).size(worldScreen.stage.width/5,worldScreen.stage.height/5) + internalMinimapWrapper.add(minimap) internalMinimapWrapper.background=ImageGetter.getBackground(Color.GRAY) internalMinimapWrapper.pack()