Technology

class Technology : RulesetObject

Functions

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
era
Link copied to clipboard
fun era(): String
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.

getDescription
Link copied to clipboard
fun getDescription(ruleset: Ruleset): String

Textual description used in TechPickerScreen and AlertPopup(AlertType.TechResearched)

getEnabledBuildings
Link copied to clipboard
fun getEnabledBuildings(civInfo: CivilizationInfo): Sequence<Building>

Returns a Sequence of Buildings enabled by this Technology, filtered for civInfo's uniques, nuclear weapons and religion settings, and without those expressly hidden from Civilopedia.

getEnabledUnits
Link copied to clipboard
fun getEnabledUnits(civInfo: CivilizationInfo): Sequence<BaseUnit>

Returns a Sequence of BaseUnits enabled by this Technology, filtered for civInfo's uniques, nuclear weapons and religion settings, and without those expressly hidden from Civilopedia.

getFilteredBuildings
Link copied to clipboard
private fun getFilteredBuildings(civInfo: CivilizationInfo, predicate: (Building) -> Boolean): Sequence<Building>
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.

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>
getObsoletedBuildings
Link copied to clipboard
fun getObsoletedBuildings(civInfo: CivilizationInfo): Sequence<Building>

Returns a Sequence of Buildings obsoleted by this Technology, filtered for civInfo's uniques, nuclear weapons and religion settings, and without those expressly hidden from Civilopedia.

getSeeAlsoObjects
Link copied to clipboard
private fun getSeeAlsoObjects(ruleset: Ruleset): Sequence<TileImprovement>

Get improvements related to this tech by a unique

getSortGroup
Link copied to clipboard
open 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
isContinuallyResearchable
Link copied to clipboard
fun isContinuallyResearchable(): 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.

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

Properties

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.

column
Link copied to clipboard
var column: TechColumn? = null
cost
Link copied to clipboard
var cost: Int = 0
name
Link copied to clipboard
open lateinit override var name: String
prerequisites
Link copied to clipboard
var prerequisites: HashSet<String>
quote
Link copied to clipboard
var quote: String
row
Link copied to clipboard
var row: Int = 0
uniqueObjects
Link copied to clipboard
open override val uniqueObjects: List<Unique>
uniques
Link copied to clipboard
open override var uniques: ArrayList<String>

Sources

jvm source
Link copied to clipboard