mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -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()
|
||||
}
|
||||
|
||||
// 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()
|
||||
for (civ in civilizations.filter { !it.isBarbarianCivilization() && !it.isDefeated() }) {
|
||||
allResearchedTechs.retainAll(civ.tech.techsResearched)
|
||||
|
@ -70,7 +70,7 @@ class CivilizationInfo {
|
||||
|
||||
constructor(civName: String) {
|
||||
this.civName = civName
|
||||
tech.techsResearched.add("Agriculture")
|
||||
tech.addTechnology("Agriculture")
|
||||
}
|
||||
|
||||
fun clone(): CivilizationInfo {
|
||||
|
@ -416,8 +416,7 @@ class MapUnit {
|
||||
if(researchableAncientEraTechs.isNotEmpty())
|
||||
actions.add {
|
||||
val tech = researchableAncientEraTechs.getRandom().name
|
||||
civInfo.tech.techsResearched.add(tech)
|
||||
if(civInfo.tech.techsToResearch.contains(tech)) civInfo.tech.techsToResearch.remove(tech)
|
||||
civInfo.tech.addTechnology(tech)
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user