Missing typed uniques for the units - part 2 (#6749)

* Replacements for existing UniqueTypes

* More typed uniques are added

* Migration to the typed uniques

* Minor optimization

* More general approach on UniqueType usage

* Better wording for the UniqueType
This commit is contained in:
Jack Rainy
2022-05-13 12:34:10 +03:00
committed by GitHub
parent f0461121e4
commit ab82328211
14 changed files with 99 additions and 57 deletions

View File

@ -71,7 +71,7 @@ class UniqueDocsWriter {
// `val paramExamples = uniqueType.parameterTypeMap.map { it.joinToString("/") { pt -> pt.docExample } }.toTypedArray()`
// Might confuse modders to think "/" can go into the _actual_ unique and mean "or", so better show just one ("Farm" in the example above):
val paramExamples = uniqueType.parameterTypeMap.map { it.first().docExample }.toTypedArray()
lines += "\tExample: \"${uniqueText.fillPlaceholders(*paramExamples)}\"\n"
lines += "\tExample: \"${uniqueText.fillPlaceholders(*paramExamples)}\"\r\n"
}
lines += "\tApplicable to: " + uniqueType.allTargets().sorted().joinToString()
lines += ""