mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Techs from ancient ruins now added properly
This commit is contained in:
parent
4c5753c41f
commit
dd63491c03
@ -92,6 +92,8 @@ class GameInfo {
|
|||||||
tile = viableTiles.getRandom()
|
tile = viableTiles.getRandom()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we don't make this into a separate list then the retain() will happen on the Tech keys,
|
||||||
|
// which effectively removes those techs from the game and causes all sorts of problems
|
||||||
val allResearchedTechs = GameBasics.Technologies.keys.toMutableList()
|
val allResearchedTechs = GameBasics.Technologies.keys.toMutableList()
|
||||||
for (civ in civilizations.filter { !it.isBarbarianCivilization() && !it.isDefeated() }) {
|
for (civ in civilizations.filter { !it.isBarbarianCivilization() && !it.isDefeated() }) {
|
||||||
allResearchedTechs.retainAll(civ.tech.techsResearched)
|
allResearchedTechs.retainAll(civ.tech.techsResearched)
|
||||||
|
@ -70,7 +70,7 @@ class CivilizationInfo {
|
|||||||
|
|
||||||
constructor(civName: String) {
|
constructor(civName: String) {
|
||||||
this.civName = civName
|
this.civName = civName
|
||||||
tech.techsResearched.add("Agriculture")
|
tech.addTechnology("Agriculture")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clone(): CivilizationInfo {
|
fun clone(): CivilizationInfo {
|
||||||
|
@ -416,8 +416,7 @@ class MapUnit {
|
|||||||
if(researchableAncientEraTechs.isNotEmpty())
|
if(researchableAncientEraTechs.isNotEmpty())
|
||||||
actions.add {
|
actions.add {
|
||||||
val tech = researchableAncientEraTechs.getRandom().name
|
val tech = researchableAncientEraTechs.getRandom().name
|
||||||
civInfo.tech.techsResearched.add(tech)
|
civInfo.tech.addTechnology(tech)
|
||||||
if(civInfo.tech.techsToResearch.contains(tech)) civInfo.tech.techsToResearch.remove(tech)
|
|
||||||
civInfo.addNotification("We have discovered the lost technology of [$tech] in the ruins!",currentTile.position, Color.BLUE)
|
civInfo.addNotification("We have discovered the lost technology of [$tech] in the ruins!",currentTile.position, Color.BLUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@ class LoadScreen : PickerScreen() {
|
|||||||
UnCivGame.Current.loadGame(selectedSave)
|
UnCivGame.Current.loadGame(selectedSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user