mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 03:18:18 +07:00
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:
parent
4e0c88cc20
commit
1f1a2fe7bc
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -188,6 +188,7 @@ object Github {
|
||||
var description = ""
|
||||
var svn_url = ""
|
||||
var stargazers_count = 0
|
||||
var default_branch = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user