Skip to content

Commit 0bcf7f9

Browse files
committed
Resolved #13172 - City states don't get continually researchable techs automatically
1 parent 0c23171 commit 0bcf7f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,12 @@ class CityStateFunctions(val civInfo: Civilization) {
549549

550550
fun getFreeTechForCityState() {
551551
// City-States automatically get all techs that at least half of the major civs know
552-
val researchableTechs = civInfo.gameInfo.ruleset.technologies.keys
553-
.filter { civInfo.tech.canBeResearched(it) }
552+
val researchableTechs = civInfo.gameInfo.ruleset.technologies.values
553+
.filter { !it.hasUnique(UniqueType.ResearchableMultipleTimes) && civInfo.tech.canBeResearched(it.name) }
554554
for (tech in researchableTechs) {
555555
val aliveMajorCivs = civInfo.gameInfo.getAliveMajorCivs()
556-
if (aliveMajorCivs.count { it.tech.isResearched(tech) } >= aliveMajorCivs.size / 2)
557-
civInfo.tech.addTechnology(tech)
556+
if (aliveMajorCivs.count { it.tech.isResearched(tech.name) } >= aliveMajorCivs.size / 2)
557+
civInfo.tech.addTechnology(tech.name)
558558
}
559559
return
560560
}

0 commit comments

Comments
 (0)