mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Resolved crash for victory condition not in ruleset
This commit is contained in:
parent
5b5e4137db
commit
f10bf8bfbe
@ -55,7 +55,8 @@ class VictoryManager {
|
|||||||
|
|
||||||
fun getVictoryTypeAchieved(): String? {
|
fun getVictoryTypeAchieved(): String? {
|
||||||
if (!civInfo.isMajorCiv()) return null
|
if (!civInfo.isMajorCiv()) return null
|
||||||
for (victoryName in civInfo.gameInfo.gameParameters.victoryTypes.filter { it != Constants.neutralVictoryType}) {
|
for (victoryName in civInfo.gameInfo.gameParameters.victoryTypes
|
||||||
|
.filter { it != Constants.neutralVictoryType && it in civInfo.gameInfo.ruleSet.victories}) {
|
||||||
if (getNextMilestone(victoryName) == null)
|
if (getNextMilestone(victoryName) == null)
|
||||||
return victoryName
|
return victoryName
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user