Difference between revisions of "Template:Stat Modifier/Row"

From RimWorld Wiki
Jump to navigation Jump to search
(Revised - previous version not working.)
Line 1: Line 1:
 
<!-- This template serves to create rows for Drugs/Tags, but could possibly be used elsewhere to query stats with offsets or factors. If the input parameters result in no data, then this template returns nothing, conveniently only creating the row if it would contain data. -->
 
<!-- This template serves to create rows for Drugs/Tags, but could possibly be used elsewhere to query stats with offsets or factors. If the input parameters result in no data, then this template returns nothing, conveniently only creating the row if it would contain data. -->
{{#vardefine: page_name | {{{1|Luciferium}}} }}
+
{{#vardefine: name | {{{1|Gold}}} }}
{{#vardefine: stat_name | {{{3|Breathing}}} }}
+
{{#vardefine: property | {{{2|Beauty}}} }}
{{#vardefine: stat_comp | {{{2|Offset}}} }}
+
{{#vardefine: factor  | {{Q| {{#var:name}} | {{#var:property}} Factor}} }}
{{#vardefine: stat_full | {{{3|Breathing}}} {{{2|Offset}}} }}
+
{{#vardefine: offset  | {{Q| {{#var:name}} | {{#var:property}} Offset}} }}
  
 
{| class="wikitable"
 
{| class="wikitable"
 
<onlyinclude>
 
<onlyinclude>
{{#if: {{Q| {{#var: page_name}} | {{#var: stat_full}} }}|
+
{{#if: {{#var: factor}}{{#var: offset}}|
 
{{!}}-
 
{{!}}-
{{Tag/HR}} {{#var: stat_name}}
+
{{Tag/HR}} {{#var: property}}
{{!}}{{Q| {{#var: page_name}} | {{#var: stat_full}} }}|no row
+
{{!}}
}}</onlyinclude>
+
{{!}}  {{Stat Entry/Factor| {{#var:factor}} }}
 +
{{!}} 
 +
{{!}} {{Stat Entry/Offset| {{#var:offset}} }}
 +
|}}</onlyinclude>
 
|}
 
|}
<onlyinclude>
 
# {{{1|}}} {{#var: page_name}}
 
# {{{2|}}} {{#var: stat_comp}}
 
# {{{3|}}} {{#var: stat_name}}
 
# Stat:    {{#var: stat_full}}
 
# Result: {{Q| {{#var: page_name}} | {{#var: stat_full}} }}
 
</onlyinclude>
 

Revision as of 05:07, 10 September 2016




Beauty ×4 +20