mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -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")
|
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 */
|
/** Used only by NewGame Nation picker */
|
||||||
|
@ -308,6 +308,12 @@ class Ruleset {
|
|||||||
lines += "${building.name} must either have an explicit cost or reference an existing tech!"
|
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)
|
if (!modOptions.isBaseRuleset) return CheckModLinksResult(warningCount, lines)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user