Nation

class Nation : RulesetObject

Functions

addUniqueBuildingsText
Link copied to clipboard
private fun addUniqueBuildingsText(textList: ArrayList<FormattedLine>, ruleset: Ruleset)
addUniqueImprovementsText
Link copied to clipboard
private fun addUniqueImprovementsText(textList: ArrayList<FormattedLine>, ruleset: Ruleset)
addUniqueUnitsText
Link copied to clipboard
private fun addUniqueUnitsText(textList: ArrayList<FormattedLine>, ruleset: Ruleset)
assembleCivilopediaText
Link copied to clipboard
open fun assembleCivilopediaText(ruleset: Ruleset): ICivilopediaText

Assemble json-supplied lines with automatically generated ones.

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getCityStateInfo
Link copied to clipboard
private fun getCityStateInfo(ruleset: Ruleset): List<FormattedLine>
getCivilopediaTextHeader
Link copied to clipboard
open fun getCivilopediaTextHeader(): FormattedLine?

Generate header line from object metadata. Default implementation will take INamed.name and render it in 150% normal font size with an icon from makeLink.

getCivilopediaTextLines
Link copied to clipboard
open override fun getCivilopediaTextLines(ruleset: Ruleset): List<FormattedLine>

Generate automatic lines from object metadata.

getIconName
Link copied to clipboard
open fun getIconName(): String

Overrides Icon used for Civilopedia entry list (where you select the instance) This will still be passed to the category-specific image getter.

getInnerColor
Link copied to clipboard
fun getInnerColor(): Color
getLeaderDisplayName
Link copied to clipboard
fun getLeaderDisplayName(): String
getMatchingUniques
Link copied to clipboard
open fun getMatchingUniques(uniqueType: UniqueType, stateForConditionals: StateForConditionals? = null): Sequence<Unique>
open fun getMatchingUniques(uniqueTemplate: String, stateForConditionals: StateForConditionals? = null): Sequence<Unique>
getOuterColor
Link copied to clipboard
fun getOuterColor(): Color
getSortGroup
Link copied to clipboard
open override fun getSortGroup(ruleset: Ruleset): Int

Overrides alphabetical sorting in Civilopedia

getUniqueTarget
Link copied to clipboard
open override fun getUniqueTarget(): UniqueTarget

Technically not currently needed, since the unique target can be retrieved from every unique in the uniqueObjects, But making this a function is relevant for future "unify Unciv object" plans ;)

hashCode
Link copied to clipboard
open fun hashCode(): Int
hasUnique
Link copied to clipboard
open fun hasUnique(uniqueType: UniqueType, stateForConditionals: StateForConditionals? = null): Boolean
open fun hasUnique(uniqueTemplate: String, stateForConditionals: StateForConditionals? = null): Boolean
isBarbarian
Link copied to clipboard
fun isBarbarian(): Boolean
isCityState
Link copied to clipboard
fun isCityState(): Boolean
isMajorCiv
Link copied to clipboard
fun isMajorCiv(): Boolean
isSpectator
Link copied to clipboard
fun isSpectator(): Boolean
makeLink
Link copied to clipboard
open override fun makeLink(): String

Create the correct string for a Civilopedia link

renderCivilopediaText
Link copied to clipboard
open fun renderCivilopediaText(labelWidth: Float, linkAction: (id: String) -> Unit? = null): Table

Build a Gdx Table showing our formattedcontent.

setTransients
Link copied to clipboard
fun setTransients()
toString
Link copied to clipboard
open override fun toString(): String

Properties

attacked
Link copied to clipboard
var attacked: String
cities
Link copied to clipboard
var cities: ArrayList<String>
cityStateType
Link copied to clipboard
var cityStateType: CityStateType? = null
civilopediaText
Link copied to clipboard
open override var civilopediaText: List<FormattedLine>

List of strings supporting simple formatting rules that CivilopediaScreen can render. May later be merged with automatic lines generated by the deriving class through overridden getCivilopediaTextHeader and/or getCivilopediaTextLines methods.

declaringWar
Link copied to clipboard
var declaringWar: String
defeated
Link copied to clipboard
var defeated: String
disembarkCosts1
Link copied to clipboard
var disembarkCosts1: Boolean = false
favoredReligion
Link copied to clipboard
var favoredReligion: String? = null
forestsAndJunglesAreRoads
Link copied to clipboard
var forestsAndJunglesAreRoads: Boolean = false
hateHello
Link copied to clipboard
var hateHello: String
ignoreHillMovementCost
Link copied to clipboard
var ignoreHillMovementCost: Boolean = false
innerColor
Link copied to clipboard
var innerColor: List<Int>? = null
innerColorObject
Link copied to clipboard
private lateinit var innerColorObject: Color
introduction
Link copied to clipboard
var introduction: String
leaderName
Link copied to clipboard
var leaderName: String
name
Link copied to clipboard
open lateinit override var name: String
neutralHello
Link copied to clipboard
var neutralHello: String
outerColor
Link copied to clipboard
lateinit var outerColor: List<Int>
outerColorObject
Link copied to clipboard
private lateinit var outerColorObject: Color
preferredVictoryType
Link copied to clipboard
var preferredVictoryType: VictoryType
startBias
Link copied to clipboard
var startBias: ArrayList<String>
startIntroPart1
Link copied to clipboard
var startIntroPart1: String
startIntroPart2
Link copied to clipboard
var startIntroPart2: String
style
Link copied to clipboard
val style: String
tradeRequest
Link copied to clipboard
var tradeRequest: String
uniqueName
Link copied to clipboard
var uniqueName: String
uniqueObjects
Link copied to clipboard
open override val uniqueObjects: List<Unique>
uniques
Link copied to clipboard
open override var uniques: ArrayList<String>
uniqueText
Link copied to clipboard
var uniqueText: String

Sources

jvm source
Link copied to clipboard