mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 15:59:33 +07:00
Simple Originating-Mod display in Civilopedia (#9850)
* Simple Originating-Mod display in Civilopedia * Simple Originating-Mod display in Civilopedia - patch
This commit is contained in:
@ -1592,6 +1592,7 @@ Domain: [param] =
|
|||||||
Toggle UI (World Screen only) =
|
Toggle UI (World Screen only) =
|
||||||
Overrides yields from underlying terrain =
|
Overrides yields from underlying terrain =
|
||||||
No yields =
|
No yields =
|
||||||
|
Mod: [modname] =
|
||||||
|
|
||||||
# Policies
|
# Policies
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.unciv.ui.screens.civilopediascreen
|
|||||||
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
|
import com.unciv.models.ruleset.IRulesetObject
|
||||||
import com.unciv.models.ruleset.Ruleset
|
import com.unciv.models.ruleset.Ruleset
|
||||||
import com.unciv.models.stats.INamed
|
import com.unciv.models.stats.INamed
|
||||||
|
|
||||||
@ -82,6 +83,10 @@ interface ICivilopediaText {
|
|||||||
if (outerNotEmpty) yield(FormattedLine())
|
if (outerNotEmpty) yield(FormattedLine())
|
||||||
yieldAll(getCivilopediaTextLines(ruleset))
|
yieldAll(getCivilopediaTextLines(ruleset))
|
||||||
}
|
}
|
||||||
|
if (this@ICivilopediaText is IRulesetObject && ruleset.mods.size > 1 && originRuleset.isNotEmpty()) {
|
||||||
|
yield(FormattedLine())
|
||||||
|
yield(FormattedLine("Mod: [$originRuleset]", starred = true, color = "#daa520"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return SimpleCivilopediaText(newLines.toList())
|
return SimpleCivilopediaText(newLines.toList())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user