Difference between revisions of "Template:ConsumableTable/row"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
m
old>Realpsojed
(Add check, if freshness = 0 then "never spoils", otherwise "spoils in X days". If freshness does not exist, don't show anything (for non-food items).)
Line 28: Line 28:
| {{Properties|{{{1}}}}}{{#if:{{:{{{1}}}|PropertyText}}|{{:{{{1}}}|PropertyText}}<div>&nbsp;</div>}}
| {{Properties|{{{1}}}}}{{#if:{{:{{{1}}}|PropertyText}}|{{:{{{1}}}|PropertyText}}<div>&nbsp;</div>}}
| {{#switch:{{:{{{1}}}|Uses}}|0=-|=1|{{:{{{1}}}|Uses}}}}
| {{#switch:{{:{{{1}}}|Uses}}|0=-|=1|{{:{{{1}}}|Uses}}}}
| data-sort-value="{{#iferror: {{#expr: ceil({{:{{{1}}}|Freshness}}/24) }}|error}}" | {{#switch: {{#iferror: {{#expr: ceil({{:{{{1}}}|Freshness}}/24) }}|error}}|0=∞|1= 1 day|error=error|={{#expr: ceil({{:{{{1}}}|Freshness}}/24) }} days}}
|data-sort-value="{{:{{{1}}}|Freshness}}"| {{#if:{{:{{{1}}}|Freshness}}|{{#switch: {{#expr: ceil({{:{{{1}}}|Freshness}}/24) }}|0=∞|1=1 day|#default={{#expr: ceil({{:{{{1}}}|Freshness}}/24)}} days}}}}
| {{:{{{1}}}|Description}}<!--
| {{:{{{1}}}|Description}}<!--
-->{{#if:{{#var:consumable table notes}}|
-->{{#if:{{#var:consumable table notes}}|
{{!}} {{:{{{1}}}|Notes}}
{{!}} {{:{{{1}}}|Notes}}
}}</includeonly><noinclude>{{doc|Template:ArmorTable}}[[Category:Templates]]</noinclude>
}}</includeonly><noinclude>{{doc|Template:ArmorTable}}[[Category:Templates]]</noinclude>

Revision as of 22:15, 1 July 2021

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