mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 05:09:25 +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. */
|
/** Keyboard support - not user-rebindable, mod control only. Will be [parsed][KeyCharAndCode.parse], so Gdx key names will work. */
|
||||||
val keyShortcut = ""
|
val keyShortcut = ""
|
||||||
|
|
||||||
|
@Deprecated("as of 4.13.4", ReplaceWith("uniques"))
|
||||||
var triggeredUniques = ArrayList<String>()
|
var triggeredUniques = ArrayList<String>()
|
||||||
|
@Deprecated("as of 4.13.4", ReplaceWith("uniqueObjects"))
|
||||||
val triggeredUniqueObjects by lazy { triggeredUniques.map { Unique(it) } }
|
val triggeredUniqueObjects by lazy { triggeredUniques.map { Unique(it) } }
|
||||||
|
|
||||||
|
@Deprecated("as of 4.13.4", ReplaceWith("uniques"))
|
||||||
var conditions = ArrayList<String>()
|
var conditions = ArrayList<String>()
|
||||||
|
@Deprecated("as of 4.13.4", ReplaceWith("uniqueObjects"))
|
||||||
val conditionObjects by lazy { conditions.map { Unique(it) } }
|
val conditionObjects by lazy { conditions.map { Unique(it) } }
|
||||||
|
|
||||||
fun matchesConditions(stateForConditionals: StateForConditionals): Boolean {
|
fun matchesConditions(stateForConditionals: StateForConditionals): Boolean {
|
||||||
|
@ -70,8 +70,11 @@ class RenderEvent(
|
|||||||
val lines = (
|
val lines = (
|
||||||
choice.civilopediaText.asSequence()
|
choice.civilopediaText.asSequence()
|
||||||
+ choice.triggeredUniqueObjects.asSequence()
|
+ choice.triggeredUniqueObjects.asSequence()
|
||||||
.filterNot { it.isHiddenToUsers() }
|
.filterNot { it.isHiddenToUsers() }
|
||||||
.map { FormattedLine(it) }
|
.map { FormattedLine(it) }
|
||||||
|
+ choice.uniqueObjects.filter { it.isTriggerable }
|
||||||
|
.filterNot { it.isHiddenToUsers() }
|
||||||
|
.map { FormattedLine(it) }
|
||||||
).asIterable()
|
).asIterable()
|
||||||
add(MarkupRenderer.render(lines, stageWidth * 0.5f, linkAction = ::openCivilopedia)).row()
|
add(MarkupRenderer.render(lines, stageWidth * 0.5f, linkAction = ::openCivilopedia)).row()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user