mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Merge pull request #326 from ninjatao/fix_free_tech
Fix research queue when getting free tech.
This commit is contained in:
@ -183,6 +183,9 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
||||
}
|
||||
if (offer.type == TradeType.Technology) {
|
||||
to.tech.techsResearched.add(offer.name)
|
||||
if (to.tech.techsToResearch.contains(offer.name)) {
|
||||
to.tech.techsToResearch.remove(offer.name)
|
||||
}
|
||||
}
|
||||
if(offer.type== TradeType.City){
|
||||
val city = from.cities.first { it.name==offer.name }
|
||||
|
@ -79,9 +79,10 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen()
|
||||
rightSideButton.onClick {
|
||||
if (isFreeTechPick) {
|
||||
civTech.techsResearched.add(selectedTech!!.name)
|
||||
civTech.freeTechs -= 1
|
||||
if (selectedTech!!.name == civTech.currentTechnology())
|
||||
if (civTech.techsToResearch.contains(selectedTech!!.name)) {
|
||||
civTech.techsToResearch.remove(selectedTech!!.name)
|
||||
}
|
||||
civTech.freeTechs -= 1
|
||||
} else
|
||||
civTech.techsToResearch = techsToResearch
|
||||
game.setWorldScreen()
|
||||
|
Reference in New Issue
Block a user