Display forward slash when research is already blocked by another research
This commit is contained in:
parent
4ed4ded681
commit
ec886bf6ba
@ -69,14 +69,26 @@ abstract class AndroidResearch(val type: AndroidResearchType<*>, val capability:
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for (research in prerequisites) {
|
if (!allPrerequisitesResearched || anyBlockerResearched) {
|
||||||
if (!capability.getResearch(research).isResearched) {
|
return false
|
||||||
return false
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
val anyBlockerResearched: Boolean get() {
|
||||||
|
for (research in blockedBy) {
|
||||||
|
if (capability.getResearch(research).isResearched) {
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (research in blockedBy) {
|
return false
|
||||||
if (capability.getResearch(research).isResearched) {
|
}
|
||||||
|
|
||||||
|
val allPrerequisitesResearched: Boolean get() {
|
||||||
|
for (research in prerequisites) {
|
||||||
|
if (!capability.getResearch(research).isResearched) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,4 +12,5 @@ object Widgets18 {
|
|||||||
val COLON = GRID.next()
|
val COLON = GRID.next()
|
||||||
val C = GRID.next()
|
val C = GRID.next()
|
||||||
val CROSS = GRID.next()
|
val CROSS = GRID.next()
|
||||||
|
val FORWARD_SLASH = GRID.next()
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ private fun isTree(root: AndroidResearchType<*>): Boolean {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
typealias LinePos = Pair<Pair<Float, Float>, Pair<Float, Float>>
|
private typealias LinePos = Pair<Pair<Float, Float>, Pair<Float, Float>>
|
||||||
|
|
||||||
private class Tree(val node: AndroidResearchType<*>) : Iterable<Tree> {
|
private class Tree(val node: AndroidResearchType<*>) : Iterable<Tree> {
|
||||||
val subtrees = ArrayList<Tree>()
|
val subtrees = ArrayList<Tree>()
|
||||||
@ -309,6 +309,10 @@ private open class AndroidResearchButton(
|
|||||||
RGBAColor.RED.setSystemColor()
|
RGBAColor.RED.setSystemColor()
|
||||||
|
|
||||||
Widgets18.CROSS.render(stack)
|
Widgets18.CROSS.render(stack)
|
||||||
|
} else if (node.anyBlockerResearched) {
|
||||||
|
RGBAColor.RED.setSystemColor()
|
||||||
|
|
||||||
|
Widgets18.FORWARD_SLASH.render(stack)
|
||||||
}
|
}
|
||||||
|
|
||||||
val text = node.iconText
|
val text = node.iconText
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/resources/assets/overdrive_that_matters/textures/gui/widgets_18.xcf
(Stored with Git LFS)
BIN
src/main/resources/assets/overdrive_that_matters/textures/gui/widgets_18.xcf
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user