mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-19 08:47:57 +07:00
Resolved #9501 - badly configured era conditional no longer causes crashes
This commit is contained in:
parent
b3e2faed71
commit
9bbd3b416e
@ -176,11 +176,14 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
|
||||
UniqueType.ConditionalWLTKD ->
|
||||
state.city != null && state.city.isWeLoveTheKingDayActive()
|
||||
UniqueType.ConditionalBeforeEra ->
|
||||
state.civInfo != null && state.civInfo.getEraNumber() < ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
state.civInfo != null && ruleset().eras.containsKey(condition.params[0])
|
||||
&& state.civInfo.getEraNumber() < ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
UniqueType.ConditionalStartingFromEra ->
|
||||
state.civInfo != null && state.civInfo.getEraNumber() >= ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
state.civInfo != null && ruleset().eras.containsKey(condition.params[0])
|
||||
&& state.civInfo.getEraNumber() >= ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
UniqueType.ConditionalDuringEra ->
|
||||
state.civInfo != null && state.civInfo.getEraNumber() == ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
state.civInfo != null && ruleset().eras.containsKey(condition.params[0])
|
||||
&& state.civInfo.getEraNumber() == ruleset().eras[condition.params[0]]!!.eraNumber
|
||||
UniqueType.ConditionalIfStartingInEra ->
|
||||
state.civInfo != null && state.civInfo.gameInfo.gameParameters.startingEra == condition.params[0]
|
||||
UniqueType.ConditionalTech ->
|
||||
|
Loading…
Reference in New Issue
Block a user