Mod repositories where the main branch is not "master" are not shown in the UI, since we can't download them

This commit is contained in:
Yair Morgenstern 2020-11-05 21:46:04 +02:00
parent 4e0c88cc20
commit 1f1a2fe7bc
3 changed files with 4 additions and 2 deletions

View File

@ -122,9 +122,9 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
.filter { it.isWater && it.hasViewableResource(civInfo) && it.improvement == null }.toList()
if (tilesThatNeedWorkboat.isEmpty()) return
// If we can't reach the tile we need to improve within 10 turns, it's probably unreachable.
// If we can't reach the tile we need to improve within 15 tiles, it's probably unreachable.
val bfs = BFS(cityInfo.getCenterTile()) { (it.isWater || it.isCityCenter()) && it.isFriendlyTerritory(civInfo) }
for (i in 1..10) {
for (i in 1..15) {
bfs.nextStep()
if (tilesThatNeedWorkboat.any { bfs.hasReachedTile(it) })
break

View File

@ -39,6 +39,7 @@ class ModManagementScreen: PickerScreen() {
Gdx.app.postRunnable {
for (repo in repoList) {
if (repo.default_branch != "master") continue
repo.name = repo.name.replace('-', ' ')
val downloadButton = repo.name.toTextButton()
downloadButton.onClick {

View File

@ -188,6 +188,7 @@ object Github {
var description = ""
var svn_url = ""
var stargazers_count = 0
var default_branch = ""
}
}