From 77a1f4a6c1b762ebf97fee62aa53918156fdd94a Mon Sep 17 00:00:00 2001 From: nacro711072 Date: Thu, 22 Sep 2022 17:48:18 +0800 Subject: [PATCH] fix: display "null" text on battleTable if the policy branch autocracy completely (#7843) --- core/src/com/unciv/models/ruleset/unique/Unique.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/models/ruleset/unique/Unique.kt b/core/src/com/unciv/models/ruleset/unique/Unique.kt index 10a8c5fb40..f59e06294f 100644 --- a/core/src/com/unciv/models/ruleset/unique/Unique.kt +++ b/core/src/com/unciv/models/ruleset/unique/Unique.kt @@ -314,13 +314,18 @@ class TemporaryUnique() : IsPartOfGameInfoSerialization { constructor(uniqueObject: Unique, turns: Int) : this() { unique = uniqueObject.text + sourceObjectType = uniqueObject.sourceObjectType + sourceObjectName = uniqueObject.sourceObjectName turnsLeft = turns } var unique: String = "" + var sourceObjectType: UniqueTarget? = null + var sourceObjectName: String? = null + @delegate:Transient - val uniqueObject: Unique by lazy { Unique(unique) } + val uniqueObject: Unique by lazy { Unique(unique, sourceObjectType, sourceObjectName) } var turnsLeft: Int = 0 }