Better docs for Trigger Conditions

This commit is contained in:
Yair Morgenstern 2023-01-16 23:13:08 +02:00
parent 509d179d19
commit be161d8839
2 changed files with 19 additions and 18 deletions

View File

@ -63,7 +63,8 @@ class UniqueDocsWriter {
for (uniqueType in uniqueTypes) {
if (uniqueType.getDeprecationAnnotation() != null) continue
val uniqueText = if (targetType == UniqueTarget.Conditional) "<${uniqueType.text}>"
val uniqueText = if (targetType == UniqueTarget.Conditional || targetType == UniqueTarget.TriggerCondition)
"<${uniqueType.text}>"
else uniqueType.text
lines += "??? example \"$uniqueText\"" // collapsable material mkdocs block, see https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=%3F%3F%3F#collapsible-blocks
if (uniqueType.parameterTypeMap.isNotEmpty()) {

View File

@ -1870,50 +1870,50 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Conditional
## TriggerCondition uniques
??? example "upon discovering [tech]"
Example: "upon discovering [Agriculture]"
??? example "<upon discovering [tech]>"
Example: "<upon discovering [Agriculture]>"
Applicable to: TriggerCondition
??? example "upon entering the [era]"
Example: "upon entering the [Ancient era]"
??? example "<upon entering the [era]>"
Example: "<upon entering the [Ancient era]>"
Applicable to: TriggerCondition
??? example "upon adopting [policy]"
Example: "upon adopting [Oligarchy]"
??? example "<upon adopting [policy]>"
Example: "<upon adopting [Oligarchy]>"
Applicable to: TriggerCondition
??? example "upon declaring war with a major Civilization"
??? example "<upon declaring war with a major Civilization>"
Applicable to: TriggerCondition
??? example "upon declaring friendship"
??? example "<upon declaring friendship>"
Applicable to: TriggerCondition
??? example "upon entering a Golden Age"
??? example "<upon entering a Golden Age>"
Applicable to: TriggerCondition
??? example "upon conquering a city"
??? example "<upon conquering a city>"
Applicable to: TriggerCondition
??? example "upon constructing [buildingFilter]"
Example: "upon constructing [Culture]"
??? example "<upon constructing [buildingFilter]>"
Example: "<upon constructing [Culture]>"
Applicable to: TriggerCondition
??? example "upon constructing [buildingFilter] [cityFilter]"
Example: "upon constructing [Culture] [in all cities]"
??? example "<upon constructing [buildingFilter] [cityFilter]>"
Example: "<upon constructing [Culture] [in all cities]>"
Applicable to: TriggerCondition
??? example "upon founding a Pantheon"
??? example "<upon founding a Pantheon>"
Applicable to: TriggerCondition
??? example "upon founding a Religion"
??? example "<upon founding a Religion>"
Applicable to: TriggerCondition
??? example "upon enhancing a Religion"
??? example "<upon enhancing a Religion>"
Applicable to: TriggerCondition