Template:Infobox Agent: Difference between revisions

From Deceive Inc. Wiki
Jump to navigation Jump to search
m (Actually remembered to update my code snippets to match their new purpose)
m (Added a PI type so css rules could be applied. Also added a game data section including cost.)
Line 9: Line 9:
languages - array[str?]
languages - array[str?]
role - enum ("Vanguard", "Disruptor", "Tracker" "Scoundrel")
role - enum ("Vanguard", "Disruptor", "Tracker" "Scoundrel")
cost-c - int? - Credits cost
catalogue - string?


-->{{#vardefine:role|{{#switch:{{lc:{{{role|}}}}}
-->{{#vardefine:role|{{#switch:{{lc:{{{role|}}}}}
Line 22: Line 24:
/// Beginning of Infobox ///
/// Beginning of Infobox ///


--><infobox>
--><infobox type="agent">
     <title source="name"><default>{{PAGENAME}}</default></title>
     <title source="name"><default>{{PAGENAME}}</default></title>
     <image source="image">
     <image source="image">
Line 33: Line 35:
         <data source="country_of_origin"><label>Country of Origin</label></data>
         <data source="country_of_origin"><label>Country of Origin</label></data>
         <data source="languages"><label>Languages</label><format>{{#if:{{#arrayprint:languages}}|{{#ifexpr: {{#arraysize:languages}} > 1 |<ul>{{#arrayprint:languages||@@@@|<li>@@@@</li>}}</ul>|{{#arrayprint:languages||@@@@|@@@@}}}}|}}</format></data>
         <data source="languages"><label>Languages</label><format>{{#if:{{#arrayprint:languages}}|{{#ifexpr: {{#arraysize:languages}} > 1 |<ul>{{#arrayprint:languages||@@@@|<li>@@@@</li>}}</ul>|{{#arrayprint:languages||@@@@|@@@@}}}}|}}</format></data>
    </group>
    <group name="game_data">
        <header>Game Data</header>
         <data source="role"><label>Agent Role</label><format>{{#var:role}}</format></data>
         <data source="role"><label>Agent Role</label><format>{{#var:role}}</format></data>
    </group>
        <data source="cost"><label>Cost</label><format>{{credits|{{{cost-c|}}}</format></data>
</infobox></includeonly>
</infobox></includeonly>

Revision as of 15:14, 6 September 2023

This template is a work in progress.