mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Fixed crash when borrowing names (#4800)
* Fixed crash when borrowing names * Fix potential mod error allowed by the previous fix
This commit is contained in:
parent
9a24f04d56
commit
0c1a21f6ae
@ -94,7 +94,7 @@ class Nation : INamed, ICivilopediaText {
|
||||
disembarkCosts1 = uniques.contains("Units pay only 1 movement point to disembark")
|
||||
}
|
||||
|
||||
lateinit var cities: ArrayList<String>
|
||||
var cities: ArrayList<String> = arrayListOf()
|
||||
|
||||
|
||||
/** Used only by NewGame Nation picker */
|
||||
|
@ -307,6 +307,12 @@ class Ruleset {
|
||||
if (building.requiredTech == null && building.cost == 0)
|
||||
lines += "${building.name} must either have an explicit cost or reference an existing tech!"
|
||||
}
|
||||
|
||||
for (nation in nations.values) {
|
||||
if (nation.cities.isEmpty() && !nation.isSpectator() && !nation.isBarbarian()) {
|
||||
lines += "${nation.name} can settle cities, but has no city names!"
|
||||
}
|
||||
}
|
||||
|
||||
if (!modOptions.isBaseRuleset) return CheckModLinksResult(warningCount, lines)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user