mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 09:18:43 +07:00
Added Missions, to replace wall-of-text tutorials in bite-sized pieces! Very pleased with this =D
This commit is contained in:
@ -2,11 +2,9 @@
|
|||||||
// Each entry s a tutorial, but the tutorial may be spread over separate paragraphs.
|
// Each entry s a tutorial, but the tutorial may be spread over separate paragraphs.
|
||||||
// Entries starting with a _ will NOT be shown in Civilopedia.
|
// Entries starting with a _ will NOT be shown in Civilopedia.
|
||||||
|
|
||||||
|
// Civilopedia only, because players said this was too wall-of-text
|
||||||
New_Game: [
|
New_Game: [
|
||||||
[
|
[
|
||||||
"Hello, and welcome to Unciv!",
|
|
||||||
"Civilization games can be complex, so we'll be guiding you step-by-step.",
|
|
||||||
"Your first mission is to found your capital city.",
|
"Your first mission is to found your capital city.",
|
||||||
"This is actually an important task because your capital city will probably be your most prosperous.",
|
"This is actually an important task because your capital city will probably be your most prosperous.",
|
||||||
"Many game bonuses apply only to your capital city and it will probably be the center of your empire."
|
"Many game bonuses apply only to your capital city and it will probably be the center of your empire."
|
||||||
@ -26,27 +24,6 @@
|
|||||||
"You only need to settle right next to resources if you need them immediately – ",
|
"You only need to settle right next to resources if you need them immediately – ",
|
||||||
" which might be the case now and then, but you’ll usually have the luxury of time."
|
" which might be the case now and then, but you’ll usually have the luxury of time."
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
_City_Founded : [
|
|
||||||
[
|
|
||||||
"You have founded a city!",
|
|
||||||
"Cities are the lifeblood of your empire, providing gold and science empire-wide,",
|
|
||||||
" which are displayed on the top bar.",
|
|
||||||
"You can click the city name to enter the city screen to assign population,",
|
|
||||||
" choose production, and see information on the city"
|
|
||||||
],
|
|
||||||
]
|
|
||||||
|
|
||||||
First_Steps : [
|
|
||||||
[
|
|
||||||
"Once you have your first city up and running you’ll be able to start production of a new unit",
|
|
||||||
" and you’ll be able to begin your research.",
|
|
||||||
"I’m not going to delve too deeply into the research element of the game yet – that will be handled later in the guide –",
|
|
||||||
" so let’s just talk about production."
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"The first thing coming out of your city should be either a Scout or Warrior."
|
"The first thing coming out of your city should be either a Scout or Warrior."
|
||||||
"I generally prefer the Warrior because it can be used for defense and because it can be upgraded",
|
"I generally prefer the Warrior because it can be used for defense and because it can be upgraded",
|
||||||
@ -56,21 +33,10 @@
|
|||||||
"If you’re a veteran of the 4x strategy genre your first Warrior or Scout will be followed by a Settler.",
|
"If you’re a veteran of the 4x strategy genre your first Warrior or Scout will be followed by a Settler.",
|
||||||
"Fast expanding is absolutely critical in most games of this type.",
|
"Fast expanding is absolutely critical in most games of this type.",
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
Next_Turn : [
|
|
||||||
[
|
|
||||||
"Once you've done everything you can in this turn, ",
|
|
||||||
" click the next turn button on the top right to continue."
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Each turn, science, culture and gold are added",
|
|
||||||
" to your civilization, your cities' construction",
|
|
||||||
" continues, and they may grow in population or area."
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
Slow_Start: [
|
Slow_Start: [
|
||||||
[
|
[
|
||||||
"In your first couple of turns,",
|
"In your first couple of turns,",
|
||||||
@ -117,19 +83,6 @@
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
Technology: [
|
|
||||||
[
|
|
||||||
"Technology is central to your civilization,",
|
|
||||||
" as technological progress brings with it",
|
|
||||||
" more construction options, improvements, and abilities"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"Most technologies are dependent on other technologies being researched - ",
|
|
||||||
" but you can choose a technology to aspire to,",
|
|
||||||
" and your civilization will research the necessary technologies to get there"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -155,32 +108,6 @@
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
World_Map: [
|
|
||||||
[
|
|
||||||
"The world map is made up of multiple tiles.",
|
|
||||||
"Each tile can contain units, resources and improvements, which we'll get to later.",
|
|
||||||
"The position of the icon tells you what it signifies.",
|
|
||||||
"For more details, you can click on the tile and see the tile information."
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
Tile_Clicked : [
|
|
||||||
[
|
|
||||||
"Clicking on a tile selects that tile,",
|
|
||||||
" and displays information on that tile on the bottom-right.",
|
|
||||||
"If the tile contains a unit, that will become the selected unit,"
|
|
||||||
" and its info and actions will be displayed on the bottom left."
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
Unit_Selected : [
|
|
||||||
[
|
|
||||||
"When a unit is selected, its information will be displayed on the bottom-left corner.",
|
|
||||||
"The available actions of that unit will appear above the tile information."
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
Unhappiness: [
|
Unhappiness: [
|
||||||
[
|
[
|
||||||
|
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 339
|
versionCode 340
|
||||||
versionName "3.3.7"
|
versionName "3.3.7-patch1"
|
||||||
|
|
||||||
archivesBaseName = "Unciv"
|
archivesBaseName = "Unciv"
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,8 @@ class UncivGame(val version: String) : Game() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
GameSaver().autoSave(gameInfo)
|
if(::gameInfo.isInitialized)
|
||||||
|
GameSaver().autoSave(gameInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -254,6 +254,8 @@ class CivilizationInfo {
|
|||||||
.apply { diplomaticStatus = DiplomaticStatus.Peace }
|
.apply { diplomaticStatus = DiplomaticStatus.Peace }
|
||||||
|
|
||||||
popupAlerts.add(PopupAlert(AlertType.FirstContact,otherCiv.civName))
|
popupAlerts.add(PopupAlert(AlertType.FirstContact,otherCiv.civName))
|
||||||
|
if(isCurrentPlayer() || otherCiv.isCurrentPlayer())
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Meet another civilization")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {return civName} // for debug
|
override fun toString(): String {return civName} // for debug
|
||||||
|
@ -3,6 +3,7 @@ package com.unciv.logic.map
|
|||||||
import com.badlogic.gdx.graphics.Color
|
import com.badlogic.gdx.graphics.Color
|
||||||
import com.badlogic.gdx.math.Vector2
|
import com.badlogic.gdx.math.Vector2
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
|
import com.unciv.UncivGame
|
||||||
import com.unciv.logic.automation.UnitAutomation
|
import com.unciv.logic.automation.UnitAutomation
|
||||||
import com.unciv.logic.automation.WorkerAutomation
|
import com.unciv.logic.automation.WorkerAutomation
|
||||||
import com.unciv.logic.civilization.CivilizationInfo
|
import com.unciv.logic.civilization.CivilizationInfo
|
||||||
@ -324,6 +325,9 @@ class MapUnit {
|
|||||||
val tile=getTile()
|
val tile=getTile()
|
||||||
tile.turnsToImprovement -= 1
|
tile.turnsToImprovement -= 1
|
||||||
if (tile.turnsToImprovement != 0) return
|
if (tile.turnsToImprovement != 0) return
|
||||||
|
|
||||||
|
if(civInfo.isCurrentPlayer())
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Construct an improvement")
|
||||||
when {
|
when {
|
||||||
tile.improvementInProgress!!.startsWith("Remove") -> {
|
tile.improvementInProgress!!.startsWith("Remove") -> {
|
||||||
val tileImprovement = tile.getTileImprovement()
|
val tileImprovement = tile.getTileImprovement()
|
||||||
|
@ -10,6 +10,7 @@ class GameSettings {
|
|||||||
var language: String = "English"
|
var language: String = "English"
|
||||||
var resolution: String = "900x600"
|
var resolution: String = "900x600"
|
||||||
var tutorialsShown = ArrayList<String>()
|
var tutorialsShown = ArrayList<String>()
|
||||||
|
var missionsCompleted = ArrayList<String>()
|
||||||
var hasCrashedRecently = false
|
var hasCrashedRecently = false
|
||||||
var soundEffectsVolume = 0.5f
|
var soundEffectsVolume = 0.5f
|
||||||
var musicVolume = 0.5f
|
var musicVolume = 0.5f
|
||||||
@ -28,4 +29,9 @@ class GameSettings {
|
|||||||
fun save(){
|
fun save(){
|
||||||
GameSaver().setGeneralSettings(this)
|
GameSaver().setGeneralSettings(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addMissionCompleted(mission:String){
|
||||||
|
missionsCompleted.add(mission)
|
||||||
|
save()
|
||||||
|
}
|
||||||
}
|
}
|
@ -423,7 +423,7 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||||||
labelText = "???"
|
labelText = "???"
|
||||||
}
|
}
|
||||||
|
|
||||||
civGroup.background = ImageGetter.getTableBackground(backgroundColor)
|
civGroup.background = ImageGetter.getRoundedEdgeTableBackground(backgroundColor)
|
||||||
val label = labelText.toLabel(labelColor)
|
val label = labelText.toLabel(labelColor)
|
||||||
label.setAlignment(Align.center)
|
label.setAlignment(Align.center)
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
|||||||
init {
|
init {
|
||||||
onBackButtonClicked { game.setWorldScreen() }
|
onBackButtonClicked { game.setWorldScreen() }
|
||||||
addTiles()
|
addTiles()
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Enter city screen")
|
||||||
|
|
||||||
val tableBackgroundColor = ImageGetter.getBlue().lerp(Color.BLACK,0.5f)
|
val tableBackgroundColor = ImageGetter.getBlue().lerp(Color.BLACK,0.5f)
|
||||||
|
|
||||||
@ -214,8 +215,10 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
|||||||
if (!city.isPuppet) {
|
if (!city.isPuppet) {
|
||||||
selectedTile = tileInfo
|
selectedTile = tileInfo
|
||||||
if (tileGroup.isWorkable && UncivGame.Current.worldScreen.isPlayersTurn) {
|
if (tileGroup.isWorkable && UncivGame.Current.worldScreen.isPlayersTurn) {
|
||||||
if (!tileInfo.isWorked() && city.population.getFreePopulation() > 0)
|
if (!tileInfo.isWorked() && city.population.getFreePopulation() > 0) {
|
||||||
city.workedTiles.add(tileInfo.position)
|
city.workedTiles.add(tileInfo.position)
|
||||||
|
game.settings.addMissionCompleted("Reassign worked tiles")
|
||||||
|
}
|
||||||
else if (tileInfo.isWorked()) city.workedTiles.remove(tileInfo.position)
|
else if (tileInfo.isWorked()) city.workedTiles.remove(tileInfo.position)
|
||||||
city.cityStats.update()
|
city.cityStats.update()
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre
|
|||||||
cityScreen.city.cityConstructions.currentConstructionIsUserSet = true
|
cityScreen.city.cityConstructions.currentConstructionIsUserSet = true
|
||||||
cityScreen.city.cityStats.update()
|
cityScreen.city.cityStats.update()
|
||||||
cityScreen.update()
|
cityScreen.update()
|
||||||
|
cityScreen.game.settings.addMissionCompleted("Pick construction")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.unciv.ui.newgamescreen
|
package com.unciv.ui.newgamescreen
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx
|
import com.badlogic.gdx.Gdx
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.SelectBox
|
import com.badlogic.gdx.scenes.scene2d.ui.SelectBox
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Skin
|
import com.badlogic.gdx.scenes.scene2d.ui.Skin
|
||||||
import com.badlogic.gdx.utils.Array
|
import com.badlogic.gdx.utils.Array
|
||||||
@ -31,7 +32,8 @@ class NewGameScreen: PickerScreen(){
|
|||||||
setDefaultCloseAction()
|
setDefaultCloseAction()
|
||||||
|
|
||||||
val playerPickerTable = PlayerPickerTable(this, newGameParameters)
|
val playerPickerTable = PlayerPickerTable(this, newGameParameters)
|
||||||
topTable.add(NewGameScreenOptionsTable(this) { playerPickerTable.update() })
|
val newGameScreenOptionsTable = NewGameScreenOptionsTable(this) { playerPickerTable.update() }
|
||||||
|
topTable.add(ScrollPane(newGameScreenOptionsTable)).height(topTable.parent.height)
|
||||||
topTable.add(playerPickerTable).pad(10f)
|
topTable.add(playerPickerTable).pad(10f)
|
||||||
topTable.pack()
|
topTable.pack()
|
||||||
topTable.setFillParent(true)
|
topTable.setFillParent(true)
|
||||||
|
@ -23,7 +23,7 @@ class NewGameScreenOptionsTable(val newGameScreen: NewGameScreen, val onMultipla
|
|||||||
val ruleset = newGameScreen.ruleSet
|
val ruleset = newGameScreen.ruleSet
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
pad(10f)
|
||||||
add("Map options".toLabel(fontSize = 24)).colspan(2).row()
|
add("Map options".toLabel(fontSize = 24)).colspan(2).row()
|
||||||
addMapTypeSelection()
|
addMapTypeSelection()
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class TechButton(techName:String, val techManager: TechManager, isWorldScreen: B
|
|||||||
init {
|
init {
|
||||||
touchable = Touchable.enabled
|
touchable = Touchable.enabled
|
||||||
defaults().pad(10f)
|
defaults().pad(10f)
|
||||||
background = ImageGetter.getTableBackground()
|
background = ImageGetter.getRoundedEdgeTableBackground()
|
||||||
if (ImageGetter.techIconExists(techName))
|
if (ImageGetter.techIconExists(techName))
|
||||||
add(ImageGetter.getTechIconGroup(techName, 60f))
|
add(ImageGetter.getTechIconGroup(techName, 60f))
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
|||||||
setButtonsInfo()
|
setButtonsInfo()
|
||||||
rightSideButton.setText("Pick a tech".tr())
|
rightSideButton.setText("Pick a tech".tr())
|
||||||
rightSideButton.onClick("paper") {
|
rightSideButton.onClick("paper") {
|
||||||
|
game.settings.addMissionCompleted("Pick technology")
|
||||||
if (isFreeTechPick) civTech.getFreeTechnology(selectedTech!!.name)
|
if (isFreeTechPick) civTech.getFreeTechnology(selectedTech!!.name)
|
||||||
else civTech.techsToResearch = tempTechsToResearch
|
else civTech.techsToResearch = tempTechsToResearch
|
||||||
|
|
||||||
@ -59,7 +60,6 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
|||||||
dispose()
|
dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
displayTutorials("Technology")
|
|
||||||
|
|
||||||
// per default show current/recent technology,
|
// per default show current/recent technology,
|
||||||
// and possibly select it to show description,
|
// and possibly select it to show description,
|
||||||
|
@ -47,7 +47,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||||||
if (tileGroup.tileInfo.airUnits.isEmpty()) return
|
if (tileGroup.tileInfo.airUnits.isEmpty()) return
|
||||||
val secondarycolor = city.civInfo.nation.getInnerColor()
|
val secondarycolor = city.civInfo.nation.getInnerColor()
|
||||||
val airUnitTable = Table().apply { defaults().pad(5f) }
|
val airUnitTable = Table().apply { defaults().pad(5f) }
|
||||||
airUnitTable.background = ImageGetter.getTableBackground(city.civInfo.nation.getOuterColor())
|
airUnitTable.background = ImageGetter.getRoundedEdgeTableBackground(city.civInfo.nation.getOuterColor())
|
||||||
val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft")
|
val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft")
|
||||||
aircraftImage.color = secondarycolor
|
aircraftImage.color = secondarycolor
|
||||||
airUnitTable.add(aircraftImage).size(15f)
|
airUnitTable.add(aircraftImage).size(15f)
|
||||||
@ -92,7 +92,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||||||
val secondaryColor = city.civInfo.nation.getInnerColor()
|
val secondaryColor = city.civInfo.nation.getInnerColor()
|
||||||
val iconTable = Table()
|
val iconTable = Table()
|
||||||
iconTable.touchable=Touchable.enabled
|
iconTable.touchable=Touchable.enabled
|
||||||
iconTable.background = ImageGetter.getTableBackground(city.civInfo.nation.getOuterColor())
|
iconTable.background = ImageGetter.getRoundedEdgeTableBackground(city.civInfo.nation.getOuterColor())
|
||||||
|
|
||||||
if (city.resistanceCounter > 0) {
|
if (city.resistanceCounter > 0) {
|
||||||
val resistanceImage = ImageGetter.getImage("StatIcons/Resistance")
|
val resistanceImage = ImageGetter.getImage("StatIcons/Resistance")
|
||||||
|
@ -65,7 +65,7 @@ object ImageGetter {
|
|||||||
else return textureRegionDrawables[whiteDotLocation]!!
|
else return textureRegionDrawables[whiteDotLocation]!!
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getTableBackground(tintColor: Color?=null): Drawable? {
|
fun getRoundedEdgeTableBackground(tintColor: Color?=null): Drawable? {
|
||||||
val drawable = getDrawable("OtherIcons/civTableBackground")
|
val drawable = getDrawable("OtherIcons/civTableBackground")
|
||||||
drawable.minHeight=0f
|
drawable.minHeight=0f
|
||||||
drawable.minWidth=0f
|
drawable.minWidth=0f
|
||||||
|
@ -35,7 +35,7 @@ class NotificationsScroll(internal val worldScreen: WorldScreen) : ScrollPane(nu
|
|||||||
|
|
||||||
listItem.add(ImageGetter.getCircle()
|
listItem.add(ImageGetter.getCircle()
|
||||||
.apply { color=notification.color }).size(10f).pad(5f)
|
.apply { color=notification.color }).size(10f).pad(5f)
|
||||||
listItem.background = ImageGetter.getTableBackground()
|
listItem.background = ImageGetter.getRoundedEdgeTableBackground()
|
||||||
listItem.add(label).pad(5f).padRight(10f)
|
listItem.add(label).pad(5f).padRight(10f)
|
||||||
|
|
||||||
// using a large click area with no gap in between each message item.
|
// using a large click area with no gap in between each message item.
|
||||||
|
@ -205,6 +205,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
|||||||
|
|
||||||
if (dto.unit.currentMovement > 0)
|
if (dto.unit.currentMovement > 0)
|
||||||
moveHereButton.onClick(""){
|
moveHereButton.onClick(""){
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Move unit")
|
||||||
UnitContextMenu(this, dto.unit, dto.tileInfo).onMoveButtonClick()
|
UnitContextMenu(this, dto.unit, dto.tileInfo).onMoveButtonClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.actions.Actions
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button
|
import com.badlogic.gdx.scenes.scene2d.ui.Button
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||||
|
import com.badlogic.gdx.utils.Align
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
import com.unciv.logic.GameSaver
|
import com.unciv.logic.GameSaver
|
||||||
@ -50,6 +51,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
private val techButtonHolder = Table()
|
private val techButtonHolder = Table()
|
||||||
private val diplomacyButtonWrapper = Table()
|
private val diplomacyButtonWrapper = Table()
|
||||||
private val nextTurnButton = createNextTurnButton()
|
private val nextTurnButton = createNextTurnButton()
|
||||||
|
private val missionTable=Table().apply { background=ImageGetter.getBackground(ImageGetter.getBlue().lerp(Color.BLACK, 0.5f)) }
|
||||||
|
|
||||||
private val notificationsScroll: NotificationsScroll
|
private val notificationsScroll: NotificationsScroll
|
||||||
var alertPopupIsOpen = false // if we have an alert popup and then we changed screens, the old one shouldn't affect us
|
var alertPopupIsOpen = false // if we have an alert popup and then we changed screens, the old one shouldn't affect us
|
||||||
@ -87,6 +89,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
stage.addActor(nextTurnButton)
|
stage.addActor(nextTurnButton)
|
||||||
stage.addActor(techPolicyandVictoryHolder)
|
stage.addActor(techPolicyandVictoryHolder)
|
||||||
stage.addActor(notificationsScroll)
|
stage.addActor(notificationsScroll)
|
||||||
|
stage.addActor(missionTable)
|
||||||
|
|
||||||
|
|
||||||
diplomacyButtonWrapper.defaults().pad(5f)
|
diplomacyButtonWrapper.defaults().pad(5f)
|
||||||
@ -99,8 +102,8 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
stage.addActor(unitActionsTable)
|
stage.addActor(unitActionsTable)
|
||||||
|
|
||||||
displayTutorials("New_Game")
|
// displayTutorials("New_Game")
|
||||||
displayTutorials("World_Map")
|
// displayTutorials("World_Map")
|
||||||
|
|
||||||
createNextTurnButton() // needs civ table to be positioned
|
createNextTurnButton() // needs civ table to be positioned
|
||||||
|
|
||||||
@ -165,6 +168,17 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
bottomTileInfoTable.y=if(UncivGame.Current.settings.showMinimap)minimapWrapper.height else 0f
|
bottomTileInfoTable.y=if(UncivGame.Current.settings.showMinimap)minimapWrapper.height else 0f
|
||||||
battleTable.update()
|
battleTable.update()
|
||||||
|
|
||||||
|
missionTable.clear()
|
||||||
|
val mission =getCurrentMission()
|
||||||
|
if(mission==""){missionTable.isVisible=false}
|
||||||
|
else {
|
||||||
|
missionTable.add(mission.toLabel()
|
||||||
|
.apply { setAlignment(Align.center) }).pad(10f)
|
||||||
|
missionTable.pack()
|
||||||
|
missionTable.centerX(stage)
|
||||||
|
missionTable.y = topBar.y - missionTable.height
|
||||||
|
}
|
||||||
|
|
||||||
minimapWrapper.update(viewingCiv)
|
minimapWrapper.update(viewingCiv)
|
||||||
unitActionsTable.update(bottomUnitTable.selectedUnit)
|
unitActionsTable.update(bottomUnitTable.selectedUnit)
|
||||||
unitActionsTable.y = bottomUnitTable.height
|
unitActionsTable.y = bottomUnitTable.height
|
||||||
@ -200,6 +214,35 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getCurrentMission(): String {
|
||||||
|
val completedMissions = game.settings.missionsCompleted
|
||||||
|
if(!completedMissions.contains("Move unit"))
|
||||||
|
return "Move a unit!\nClick on a unit > Click on a destination > Click the arrow popup"
|
||||||
|
if(!completedMissions.contains("Found city"))
|
||||||
|
return "Found a city!\nSelect the Settler (flag unit) > Click on 'Found city' (bottom-left corner)"
|
||||||
|
if(!completedMissions.contains("Enter city screen"))
|
||||||
|
return "Enter the city screen!\nClick the city button twice"
|
||||||
|
if(!completedMissions.contains("Pick technology"))
|
||||||
|
return "Pick a technology to research!\nClick on the tech button (greenish, top left) > \n select technology > click 'Research' (bottom right)"
|
||||||
|
if(!completedMissions.contains("Pick construction"))
|
||||||
|
return "Pick a construction!\nEnter city screen > Click on a unit or building (left side)"
|
||||||
|
if(!completedMissions.contains("Pass a turn"))
|
||||||
|
return "Pass a turn!\nCycle through units with 'Next unit' > Click 'Next turn'"
|
||||||
|
if(!completedMissions.contains("Reassign worked tiles"))
|
||||||
|
return "Reassign worked tiles!\nEnter city screen > click the assigned (green) tile to unassign > " +
|
||||||
|
"\n click an unassigned tile to assign population"
|
||||||
|
if(!completedMissions.contains("Meet another civilization"))
|
||||||
|
return "Meet another civilization!\nExplore the map until you encounter another civilization!"
|
||||||
|
if(!completedMissions.contains("Open the options table"))
|
||||||
|
return "Open the options table!\nClick the menu button (top left) > click 'Options'"
|
||||||
|
if(!completedMissions.contains("Construct an improvement"))
|
||||||
|
return "Construct an improvement!\nConstruct a Worker unit > Move to a Plains or Grassland tile > " +
|
||||||
|
"\n Choose 'Create improvement' > Choose the farm > " +
|
||||||
|
"\n Leave the worker there until it's finished"
|
||||||
|
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
private fun displayTutorialsOnUpdate() {
|
private fun displayTutorialsOnUpdate() {
|
||||||
if (UncivGame.Current.settings.hasCrashedRecently) {
|
if (UncivGame.Current.settings.hasCrashedRecently) {
|
||||||
displayTutorials("_GameCrashed")
|
displayTutorials("_GameCrashed")
|
||||||
@ -208,13 +251,6 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
UncivGame.Current.settings.save()
|
UncivGame.Current.settings.save()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bottomUnitTable.selectedUnit != null) displayTutorials("Unit_Selected")
|
|
||||||
if (viewingCiv.cities.isNotEmpty()){
|
|
||||||
displayTutorials("_City_Founded")
|
|
||||||
displayTutorials("First_Steps")
|
|
||||||
}
|
|
||||||
if (UncivGame.Current.settings.tutorialsShown.contains("Cities")) displayTutorials("Next_Turn")
|
|
||||||
|
|
||||||
|
|
||||||
if (!UncivGame.Current.settings.tutorialsShown.contains("_EnemyCityNeedsConqueringWithMeleeUnit")) {
|
if (!UncivGame.Current.settings.tutorialsShown.contains("_EnemyCityNeedsConqueringWithMeleeUnit")) {
|
||||||
for (enemyCity in viewingCiv.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War }
|
for (enemyCity in viewingCiv.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War }
|
||||||
@ -260,7 +296,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
if (viewingCiv.tech.currentTechnology() == null) {
|
if (viewingCiv.tech.currentTechnology() == null) {
|
||||||
val buttonPic = Table()
|
val buttonPic = Table()
|
||||||
buttonPic.background = ImageGetter.getTableBackground(colorFromRGB(7, 46, 43))
|
buttonPic.background = ImageGetter.getRoundedEdgeTableBackground(colorFromRGB(7, 46, 43))
|
||||||
buttonPic.defaults().pad(20f)
|
buttonPic.defaults().pad(20f)
|
||||||
buttonPic.add("{Pick a tech}!".toLabel(Color.WHITE,30))
|
buttonPic.add("{Pick a tech}!".toLabel(Color.WHITE,30))
|
||||||
techButtonHolder.add(buttonPic)
|
techButtonHolder.add(buttonPic)
|
||||||
@ -312,6 +348,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
return@onClick
|
return@onClick
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.settings.addMissionCompleted("Pass a turn")
|
||||||
nextTurn() // If none of the above
|
nextTurn() // If none of the above
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
|
|||||||
var selectedLanguage: String = "English"
|
var selectedLanguage: String = "English"
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Open the options table")
|
||||||
update()
|
update()
|
||||||
open()
|
open()
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,7 @@ class UnitActions {
|
|||||||
unit.currentMovement >0 &&
|
unit.currentMovement >0 &&
|
||||||
!tile.getTilesInDistance(3).any { it.isCityCenter() })
|
!tile.getTilesInDistance(3).any { it.isCityCenter() })
|
||||||
{
|
{
|
||||||
|
UncivGame.Current.settings.addMissionCompleted("Found city")
|
||||||
unit.civInfo.addCity(tile.position)
|
unit.civInfo.addCity(tile.position)
|
||||||
tile.improvement = null
|
tile.improvement = null
|
||||||
unit.destroy()
|
unit.destroy()
|
||||||
|
Reference in New Issue
Block a user