Difference between revisions of "Template:NPCTable/row"

From Stoneshard wiki
Jump to navigation Jump to search
m
(variables, check if NPC exists in Friendly data by loading its occupation (every NPC should have one), if it's empty, don't load in checkmarks)
Line 1: Line 1:
<includeonly>
<!--
--- Define variables, goal is to only load each property from the Data page once. ---
-->{{#vardefine:Occupation|{{#ifeq: {{:Friendly data|{{{1}}}|Occupation}}|NPC {{{1}}} does not exist in Friendly data.||{{:Friendly data|{{{1}}}|Occupation}}}}}}<!--
-->{{#vardefine:Name|{{:Friendly data|{{{1}}}|Name}}}}<!--
-->{{#vardefine:Image|{{:Friendly data|{{{1}}}|Image}}}}<!--
|-
|-
| {{:Friendly data|{{{1}}}|Occupation}}
| {{#var:Occupation}}
| [[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|37px|link={{{1}}}]]<br>[[{{#if:{{#var:Name}}|{{Translate|{{#var:Name}}|NPCNames}}|{{Translate|{{{1}}}|NPCNames}}}}]]
| {{#if:{{#var:Occupation}}|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|37px|link={{{1}}}]]<br>[[{{#if:{{#var:Name}}|{{Translate|{{#var:Name}}|NPCNames}}|{{Translate|{{{1}}}|NPCNames}}}}]]}}
| {{#if:{{:Friendly data|{{{1}}}|Contract}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Contract}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|Quest}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Quest}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|Trader}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Trader}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|Repair}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Repair}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|Rumors}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Rumors}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|Lore}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|Lore}}|'''✓'''}}}}
| {{#if:{{:Friendly data|{{{1}}}|UniqueDialogue}}|'''✓'''}}
| {{#if:{{#var:Occupation}}|{{#if:{{:Friendly data|{{{1}}}|UniqueDialogue}}|'''✓'''}}}}
}}
</includeonly><noinclude>{{doc|Template:NPCTable/row}}[[Category:Templates]]</noinclude>
</includeonly><noinclude>{{doc|Template:NPCTable/row}}[[Category:Templates]]</noinclude>

Revision as of 15:55, 18 October 2022