Template:Infobox Operation: Difference between revisions

From Deceive Inc. Wiki
Jump to navigation Jump to search
m (Minor behavior fix for VIP list)
m (Removed errant printout, added documentation)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>This template is a work-in-progress.</noinclude><!--
<noinclude>This template is used to provide an infobox at the top of [[Operations|Operation]] page.


* name - str
== Parameters ==
* image - file
{| class="wikitable" style="width:100%;"
* location - str
! Parameter || Type || Description
* target - str
|-
* vips - list? of str (link to another page if possible)
| <code>name</code> || string || The name of the operation as it appears in-game
|-
| <code>image</code> || file || The file name of the image for the Operation's header.
|-
| <code>location</code> || string || The location of the Operation in question.
|-
| <code>target</code> || string || What it is that's actually being stolen (i.e. the [[Package]].
|-
| <code>vips</code> || list of strings (delimiter <code>,</code>) || A list of VIPs on the map. This is a list to account for Operations where there's more than one VIP (at the time of writing, [[Silver Reef]])
|}</noinclude><!--


--><includeonly><!--
--><includeonly><!--


-->{{#arraydefine:vips|{{{vips|}}}|,}}<!--
-->{{#arraydefine:vips|{{{vips|}}}|,}}<!--
-->{{#arrayprint:vips}}<!--


// Infobox Construction //
// Infobox Construction //
Line 20: Line 28:
         <header>Details</header>
         <header>Details</header>
         <data source="location"><label>Location</label></data>
         <data source="location"><label>Location</label></data>
         <data source="owner"><label>Owner</label><format>{{#if:{{#arrayprint:vips}}|{{#ifexpr: {{#arraysize:vips}} > 1 |<ul>{{#arrayprint:vips||@@@@|<li>{{#ifexist:@@@@|[[@@@@]]|@@@@}}</li>}}</ul>|{{#arrayprint:vips||@@@@|{{#ifexist:@@@@|[[@@@@]]|@@@@}}}}}}|}}</format></data>
         <data source="vips"><label>Owner</label><format>{{#if:{{#arrayprint:vips}}|{{#ifexpr: {{#arraysize:vips}} > 1 |<ul>{{#arrayprint:vips||@@@@|<li>{{#ifexist:@@@@|[[@@@@]]|@@@@}}</li>}}</ul>|{{#arrayprint:vips||@@@@|{{#ifexist:@@@@|[[@@@@]]|@@@@}}}}}}|}}</format></data>
         <data source="target"><label>Target</label></data>
         <data source="target"><label>Target</label></data>
     </group>
     </group>
</infobox></includeonly>
</infobox></includeonly>

Latest revision as of 17:26, 10 November 2023

This template is used to provide an infobox at the top of Operation page.

Parameters

Parameter Type Description
name string The name of the operation as it appears in-game
image file The file name of the image for the Operation's header.
location string The location of the Operation in question.
target string What it is that's actually being stolen (i.e. the Package.
vips list of strings (delimiter ,) A list of VIPs on the map. This is a list to account for Operations where there's more than one VIP (at the time of writing, Silver Reef)