ICivilopediaText
Addon common to most ruleset game objects managing civilopedia display
Usage:
Let Ruleset object implement this (by inheriting and implementing class ICivilopediaText)
Add
"civilopediaText": ["",…],
in the json for these objectsOptionally override getCivilopediaTextHeader to supply a different header line
Optionally override getCivilopediaTextLines to supply automatic stuff like tech prerequisites, uniques, etc.
Optionally override assembleCivilopediaText to handle assembly of the final set of lines yourself.
Functions
Assemble json-supplied lines with automatically generated ones.
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.
Generate automatic lines from object metadata.
Overrides Icon used for Civilopedia entry list (where you select the instance) This will still be passed to the category-specific image getter.
Overrides alphabetical sorting in Civilopedia
Properties
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.