mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Can now create as many tech rows as you wish in mods :)
This commit is contained in:
parent
105d9690ff
commit
5fa08d9f2d
@ -93,8 +93,9 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec
|
||||
|
||||
private fun createTechTable() {
|
||||
val allTechs = civInfo.gameInfo.ruleSet.technologies.values
|
||||
val columns = allTechs.map { it.column!!.columnNumber }.max()!! + 1
|
||||
val techMatrix = Array<Array<Technology?>>(columns) { arrayOfNulls(10) } // Divided into columns, then rows
|
||||
val columns = allTechs.map { it.column!!.columnNumber }.maxOrNull()!! + 1
|
||||
val rows = allTechs.map { it.row }.maxOrNull()!! + 1
|
||||
val techMatrix = Array<Array<Technology?>>(columns) { arrayOfNulls(rows) } // Divided into columns, then rows
|
||||
|
||||
for (technology in allTechs) {
|
||||
techMatrix[technology.column!!.columnNumber][technology.row - 1] = technology
|
||||
|
Loading…
x
Reference in New Issue
Block a user