mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:54:44 +07:00
perf(memory): Single-init strings for CapitalConnectionsFinder
Some checks failed
Build and test / Check code and run unit tests (push) Failing after 5m33s
Conflict marking / main (push) Failing after 4s
Detekt / detekt (ubuntu-latest) (push) Failing after 18s
Generate mkdocs from docs folder / deploy (push) Failing after 22s
Docker / build (push) Failing after 1m2s
Close stale issues and PRs / stale (push) Successful in -2s
Some checks failed
Build and test / Check code and run unit tests (push) Failing after 5m33s
Conflict marking / main (push) Failing after 4s
Detekt / detekt (ubuntu-latest) (push) Failing after 18s
Generate mkdocs from docs folder / deploy (push) Failing after 22s
Docker / build (push) Failing after 1m2s
Close stale issues and PRs / stale (push) Successful in -2s
This commit is contained in:
parent
ef78cd95f9
commit
bda9524f2c
@ -16,11 +16,13 @@ class CapitalConnectionsFinder(private val civInfo: Civilization) {
|
||||
|
||||
private val openBordersCivCities = civInfo.gameInfo.getCities().filter { canEnterBordersOf(it.civ) }
|
||||
|
||||
private val harbor = "Harbor" // hardcoding at least centralized for this class for now
|
||||
private val road = RoadStatus.Road.name
|
||||
private val railroad = RoadStatus.Railroad.name
|
||||
private val harborFromRoad = "$harbor-$road"
|
||||
private val harborFromRailroad = "$harbor-$railroad"
|
||||
companion object {
|
||||
private val harbor = "Harbor" // hardcoding at least centralized for this class for now
|
||||
private val road = RoadStatus.Road.name
|
||||
private val railroad = RoadStatus.Railroad.name
|
||||
private val harborFromRoad = "$harbor-$road"
|
||||
private val harborFromRailroad = "$harbor-$railroad"
|
||||
}
|
||||
|
||||
private val ruleset = civInfo.gameInfo.ruleset
|
||||
private val roadIsResearched = ruleset.tileImprovements[road].let {
|
||||
|
Loading…
Reference in New Issue
Block a user