Difference between revisions of "Template:ConsumableTable/row"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(add check for zero in freshness data value, replacing the zero with "9999" - to sort items that never spoil above the long duration ones.)
old>Phoe nixx
m (no nbsp after property text)
Line 26: Line 26:
{{!}} {{:{{{1}}}|Subcategory}}
{{!}} {{:{{{1}}}|Subcategory}}
}}
}}
| {{Properties|{{{1}}}}}{{#if:{{:{{{1}}}|PropertyText}}|{{:{{{1}}}|PropertyText}}<div>&nbsp;</div>}}
| {{Properties|{{{1}}}}}{{#if:{{:{{{1}}}|PropertyText}}|{{:{{{1}}}|PropertyText}}}}
| {{#switch:{{:{{{1}}}|Uses}}|0=-|=1|{{:{{{1}}}|Uses}}}}
| {{#switch:{{:{{{1}}}|Uses}}|0=-|=1|{{:{{{1}}}|Uses}}}}
|data-sort-value="{{#ifeq: {{:{{{1}}}|Freshness}}|0|9999|{{:{{{1}}}|Freshness}}}}"| {{#if:{{:{{{1}}}|Freshness}}|{{#switch: {{#expr: ceil({{:{{{1}}}|Freshness}}/24) }}|0=∞|1=1 day|#default={{#expr: ceil({{:{{{1}}}|Freshness}}/24)}} days}}}}
|data-sort-value="{{#ifeq: {{:{{{1}}}|Freshness}}|0|9999|{{:{{{1}}}|Freshness}}}}"| {{#if:{{:{{{1}}}|Freshness}}|{{#switch: {{#expr: ceil({{:{{{1}}}|Freshness}}/24) }}|0=∞|1=1 day|#default={{#expr: ceil({{:{{{1}}}|Freshness}}/24)}} days}}}}

Revision as of 19:04, 8 July 2021

This template has no documentation. If you know how to use this template, please add some.