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 ability to specify catalogue the agent originates from.)
 
(5 intermediate revisions by the same user not shown)
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 theme="di">
     <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>
        <data source="cost"><label>Cost</label><format>{{credits|{{{cost|}}}}}</format></data>
        <data source="catalogue"><label>Catalogue</label><format>{{#if:{{{catalogue|}}}|{{#ifexist:{{{catalogue}}}|[[{{{catalogue}}}]]|{{{catalogue}}}}}|}}</format></data>
     </group>
     </group>
</infobox></includeonly>
</infobox></includeonly>

Latest revision as of 15:24, 6 September 2023

This template is a work in progress.