From 3a671aa918f12fd825b26b06da1aca194be4520a Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Mon, 21 Jul 2025 06:28:12 -0400 Subject: [PATCH] Fix readonly calls to getDifficulty() (#13659) --- core/src/com/unciv/logic/GameInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index 427acf6dad..68e51c9c32 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -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