mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
More informative alert for tech modders
This commit is contained in:
parent
31226c97e8
commit
18c837a7ed
@ -8,6 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.unciv.Constants
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.PopupAlert
|
||||
import com.unciv.logic.civilization.TechManager
|
||||
import com.unciv.models.UncivSound
|
||||
import com.unciv.models.ruleset.tech.Technology
|
||||
@ -173,8 +174,10 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
||||
lines.clear()
|
||||
|
||||
for (tech in civInfo.gameInfo.ruleSet.technologies.values) {
|
||||
if (!techNameToButton.containsKey(tech.name))
|
||||
throw Exception("tech ${tech.name} not found!")
|
||||
if (!techNameToButton.containsKey(tech.name)) {
|
||||
ResponsePopup("Tech [${tech.name}] appears to be missing - perhaps two techs have the same row & column", this)
|
||||
continue
|
||||
}
|
||||
val techButton = techNameToButton[tech.name]!!
|
||||
for (prerequisite in tech.prerequisites) {
|
||||
val prerequisiteButton = techNameToButton[prerequisite]!!
|
||||
|
Loading…
x
Reference in New Issue
Block a user