mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 12:48:56 +07:00
Added deprecations to deprecated choice fields
This commit is contained in:
@ -41,10 +41,14 @@ class EventChoice : ICivilopediaText, RulesetObject() {
|
||||
/** Keyboard support - not user-rebindable, mod control only. Will be [parsed][KeyCharAndCode.parse], so Gdx key names will work. */
|
||||
val keyShortcut = ""
|
||||
|
||||
@Deprecated("as of 4.13.4", ReplaceWith("uniques"))
|
||||
var triggeredUniques = ArrayList<String>()
|
||||
@Deprecated("as of 4.13.4", ReplaceWith("uniqueObjects"))
|
||||
val triggeredUniqueObjects by lazy { triggeredUniques.map { Unique(it) } }
|
||||
|
||||
@Deprecated("as of 4.13.4", ReplaceWith("uniques"))
|
||||
var conditions = ArrayList<String>()
|
||||
@Deprecated("as of 4.13.4", ReplaceWith("uniqueObjects"))
|
||||
val conditionObjects by lazy { conditions.map { Unique(it) } }
|
||||
|
||||
fun matchesConditions(stateForConditionals: StateForConditionals): Boolean {
|
||||
|
@ -70,8 +70,11 @@ class RenderEvent(
|
||||
val lines = (
|
||||
choice.civilopediaText.asSequence()
|
||||
+ choice.triggeredUniqueObjects.asSequence()
|
||||
.filterNot { it.isHiddenToUsers() }
|
||||
.map { FormattedLine(it) }
|
||||
.filterNot { it.isHiddenToUsers() }
|
||||
.map { FormattedLine(it) }
|
||||
+ choice.uniqueObjects.filter { it.isTriggerable }
|
||||
.filterNot { it.isHiddenToUsers() }
|
||||
.map { FormattedLine(it) }
|
||||
).asIterable()
|
||||
add(MarkupRenderer.render(lines, stageWidth * 0.5f, linkAction = ::openCivilopedia)).row()
|
||||
}
|
||||
|
Reference in New Issue
Block a user