Шаблон:Ct/doc: различия между версиями

Материал из Dwarf Fortress Wiki
Перейти к навигацииПерейти к поиску
(Новая страница: «This template assists in the display of temperatures, measured in degrees Urist, by adding a hovertext which displays the temperature in degrees Celsius, roun…»)
 
Нет описания правки
Строка 21: Строка 21:


<includeonly>[[Category:Шаблоны внутристрочного форматирования]]</includeonly>
<includeonly>[[Category:Шаблоны внутристрочного форматирования]]</includeonly>
<noinclude>[[Category:Шаблоны документации]]</noinclude>
<noinclude>[[Category:Документация шаблонов]]</noinclude>

Версия от 07:31, 4 сентября 2014

This template assists in the display of temperatures, measured in degrees Urist, by adding a hovertext which displays the temperature in degrees Celsius, rounded to the nearest one decimal point. It is actually quite flexible, being capable of parsing the number it needs out of entire lines of text, but it is stylistically recommended you restrict the template to the temperature itself:

Code Product
[[Water]] freezes at {{ct|10000}}. Water freezes at 10000 °U .
{{ct|[[Water]] freezes at 10000 °U.}} Water freezes at 10000 °U.
The temperature of [[magma]] is {{ct|12000}}. The temperature of magma is 12000 °U .

The template can parse both numbers and NONE, the two temperature-related values most commonly used in the raws. You can give it a second argument (which defaults to "none") for a fallback if and only if the value given is precisely NONE. This is helpful for templates that use data directly derived from parsing raw files.

Code Product
The ignition point of [[slate]]: {{ct|NONE}}. The ignition point of slate: none.
The ignition point of [[slate]] is {{ct|NONE|nonexistent; it never ignites}}. The ignition point of slate is nonexistent; it never ignites.