mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-19 16:57:38 +07:00
Patch fix for crash, from Discord - @WhoIsJohannes
This commit is contained in:
parent
4eea7984f7
commit
958318e53b
@ -334,8 +334,7 @@ object UnitAutomation {
|
||||
}
|
||||
|
||||
private fun startGoldenAgeIfHasAbility(unit: MapUnit) {
|
||||
UnitActions.getUnitActions(unit).filter { it.type == UnitActionType.StartGoldenAge }
|
||||
.firstOrNull()?.action!!.invoke()
|
||||
UnitActions.getUnitActions(unit).firstOrNull { it.type == UnitActionType.StartGoldenAge }?.action?.invoke()
|
||||
}
|
||||
|
||||
/** @return true only if the unit has 0 movement left */
|
||||
|
Loading…
Reference in New Issue
Block a user