Fix readonly calls to getDifficulty() (#13659)

This commit is contained in:
Rob Loach 2025-07-21 06:28:12 -04:00 committed by GitHub
parent 286aab0cf1
commit 3a671aa918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -240,7 +240,7 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion
/** Get barbarian civ
* @throws NoSuchElementException in no-barbarians games! */
@Readonly fun getBarbarianCivilization() = getCivilization(Constants.barbarians)
fun getDifficulty() = difficultyObject
@Readonly fun getDifficulty() = difficultyObject
/** Access a cached `GlobalUniques` that combines the [ruleset]'s [globalUniques][Ruleset.globalUniques]
* with the Uniques of the chosen [speed] and [difficulty][getDifficulty] */
@Readonly @Suppress("purity") // should be autorecognized