mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 09:18:43 +07:00
Buying techs now enables their uniques immediately - kudos ingvart!
This commit is contained in:
@ -31,7 +31,8 @@ class GameStarter{
|
||||
for (nationName in GameBasics.Nations.keys.filterNot { it=="Barbarians" || it==newGameParameters.nation }.shuffled()
|
||||
.take(newGameParameters.numberOfEnemies)) {
|
||||
val civ = CivilizationInfo(nationName)
|
||||
civ.tech.techsResearched.addAll(gameInfo.getDifficulty().aiFreeTechs)
|
||||
for (tech in gameInfo.getDifficulty().aiFreeTechs)
|
||||
civ.tech.addTechnology(tech)
|
||||
gameInfo.civilizations.add(civ)
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ class TechManager {
|
||||
addTechnology(techName)
|
||||
}
|
||||
|
||||
private fun addTechnology(techName:String) {
|
||||
fun addTechnology(techName:String) {
|
||||
if(techName!="Future Tech")
|
||||
techsToResearch.remove(techName)
|
||||
|
||||
|
@ -182,10 +182,7 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
||||
from.gold -= offer.amount
|
||||
}
|
||||
if (offer.type == TradeType.Technology) {
|
||||
to.tech.techsResearched.add(offer.name)
|
||||
if (to.tech.techsToResearch.contains(offer.name)) {
|
||||
to.tech.techsToResearch.remove(offer.name)
|
||||
}
|
||||
to.tech.addTechnology(offer.name)
|
||||
}
|
||||
if(offer.type== TradeType.City){
|
||||
val city = from.cities.first { it.name==offer.name }
|
||||
|
Reference in New Issue
Block a user