Difference between revisions of "Template:Infobox game/row/taxonomy/modes"

From PCGamingWiki, the wiki about fixing PC games
(added multiplayer vardefine (used by Template:Absent properties to detect when Template:Network/Multiplayer is missing))
(overhauled to use a switch instead of arraymap since there are only two modes (catches invalid/repeated combinations and also ensures Singleplayer is shown first); added Cargo vardefine handling; added row validity check)
 
Line 1: Line 1:
 
<includeonly>{{#if: {{{1|}}} | <tr>
 
<includeonly>{{#if: {{{1|}}} | <tr>
<td class="template-infobox-type">Modes</td>{{#vardefine:currentMode|}}
+
<td class="template-infobox-type">Modes</td>
<td class="template-infobox-info">{{#arraymap: {{{1}}} | , | €€€€€ | {{#switch: {{lc:€€€€€}}
+
<td class="template-infobox-info">{{#switch: {{lc:{{{1}}}}}
| singleplayer = {{#vardefine:currentMode|Singleplayer}}
+
| singleplayer = {{Glossary:Singleplayer|uc}}[[Category:Singleplayer]]{{#vardefine:modes|Singleplayer}}
| multiplayer  = {{#vardefine:currentMode|Multiplayer}}{{#vardefine:multiplayer|needed}}
+
| singleplayer,multiplayer
| #default    = <div title="Error: '€€€€€' not recognized" class="svg-icon svg-16 os-error"></div> [[Category:Invalid template usage (infobox game)]]
+
| singleplayer, multiplayer
}}{{Glossary:{{#var:currentMode}}|uc}} [[Category:{{#var:currentMode}}]] {{#vardefine:modes|{{#var:modes|}}{{#var:currentMode|}}, }}
+
| multiplayer,singleplayer
 +
| multiplayer, singleplayer = {{Glossary:Singleplayer|uc}}[[Category:Singleplayer]], {{Glossary:Multiplayer|uc}}[[Category:Multiplayer]]{{#vardefine:multiplayer|needed}}{{#vardefine:modes|Singleplayer, Multiplayer}}
 +
| multiplayer  = {{Glossary:Multiplayer|uc}}[[Category:Multiplayer]]{{#vardefine:multiplayer|needed}}{{#vardefine:modes|Multiplayer}}
 +
| #default    = <div title="Error: '€€€€€' not recognized" class="svg-icon svg-16 os-error"></div> [[Category:Invalid template usage (Taxonomy)]]
 
}}</td>
 
}}</td>
</tr>}}
+
</tr>}}{{#switch:{{#var:section}}
</includeonly><noinclude>{{Documentation}}</noinclude>
+
|Infobox game
 +
|monetization
 +
|microtransactions={{#vardefine:section|modes}}
 +
|#Default = [[Category:Invalid row order (Taxonomy)]]
 +
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 07:43, 4 September 2021

Documentation for the above template (sometimes hidden from view).
Please refer to Taxonomy.
Category Definition Notes Examples
Multiplayer The game supports some form of multiplayer either locally (e.g. hot seat play/pass-and-play) or remotely across the network or internet.
Singleplayer The game supports solo play through a singleplayer mode.
  • If the game also has multiplayer, the singleplayer component needs to be substantial enough (e.g. a campaign) and not just consist of an offline training mode.