Difference between revisions of "Template:DLC Icons"

From RimWorld Wiki
Jump to navigation Jump to search
m
(added support for anomaly DLC)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1|}}}
+
<includeonly>{{#vardefine:pageName | {{{1 | {{PAGENAME}} }}} }}{{#vardefine:displayName|{{#if: {{Q|{{#var:pageName}}|Name}}|{{Q|{{#var:pageName}}|Name}}|{{#var:pageName}}}}}}{{#if: {{{no text|}}} || {{#if: {{{no link|}}}
   | Royalty (DLC) = &nbsp;{{RoyaltyIcon}}
+
   | {{#var:displayName}}
   | Ideology (DLC) = &nbsp;{{IdeologyIcon}}
+
   | [[{{#var:pageName}}|{{#var:displayName}}]]
  | Biotech (DLC) = &nbsp;{{BiotechIcon}}
+
}} }}{{#if: {{#vardefineecho:DLC | {{Q| {{#var:pageName}} | From DLC }} }}
   | Royalty (DLC), Ideology (DLC) | Ideology (DLC), Royalty (DLC) = &nbsp;{{RoyaltyIcon}}{{IdeologyIcon}}
+
   | &nbsp;{{#if: {{#pos: {{#var:DLC}} | Royalty (DLC) }} | {{RoyaltyIcon}} }}{{#if: {{#pos: {{#var:DLC}} | Ideology (DLC) }} | {{IdeologyIcon}} }}{{#if: {{#pos: {{#var:DLC}} | Biotech (DLC) }} | {{BiotechIcon}} }}{{#if: {{#pos: {{#var:DLC}} | Anomaly (DLC) }} | {{AnomalyIcon}} }}
  | Royalty (DLC), Biotech (DLC) | Biotech (DLC), Royalty (DLC) = &nbsp;{{RoyaltyIcon}}{{BiotechIcon}}
+
   | {{#if: {{{core|}}} | &nbsp;{{RimworldIcon}} }}
  | Ideology (DLC), Biotech (DLC) | Biotech (DLC), Ideology (DLC) = &nbsp;{{IdeologyIcon}}{{BiotechIcon}}
 
  | Royalty (DLC), Ideology (DLC), Biotech (DLC) | Royalty (DLC), Biotech (DLC), Ideology (DLC) | Ideology (DLC), Royalty (DLC), Biotech (DLC) | Ideology (DLC), Biotech (DLC), Royalty (DLC) | Biotech (DLC), Royalty (DLC), Ideology (DLC) | Biotech (DLC), Ideology (DLC), Royalty (DLC) = &nbsp;{{RoyaltyIcon}}{{IdeologyIcon}}{{BiotechIcon}}
 
   | #default = {{#if: {{{2|}}} | &nbsp;{{RimworldIcon}} }}
 
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:24, 14 April 2024

Documentation icon Template documentation[view] [edit] [history] [purge]

Description[edit]

Prints a page name with the icons of the DLCs it belongs to.

There are two parameters:

  • The first parameter should be the name of the page in question. Otherwise PAGENAME is used.
  • Additionally the following named parameters can be set to any value to get the desired effects:
    • no text: only prints the icons
    • no link: prints the text without a link
    • core: prints the {{RimworldIcon}} Content from Rimworld core game only as default

Usage[edit]

Simply add the template to the location it is required. This should work for both inline use, as well as in tables, nav boxes etc.

{{DLC Icons|Darklight brazier}}

Produces: Darklight brazier Content added by the Royalty DLCContent added by the Ideology DLC


{{DLC Icons|Club|core=1}}

Produces: Club Content from Rimworld core game only


{{DLC Icons|Darklight brazier|no link=1}}

Produces: Darklight brazier Content added by the Royalty DLCContent added by the Ideology DLC


{{DLC Icons|Darklight brazier|no text=1|no text=1}}

Produces:  Content added by the Royalty DLCContent added by the Ideology DLC


{{#ask: [[Category:Mechanoids]][[!Mechanoid]][[Type::Mechanoid]]
    | format = template
    | template = DLC Icons
    | link = none
    | sort = From DLC, Name
    | sep =  •  
}}

Produces: CentipedeCentipede blasterCentipede burnerCentipede gunnerLancerPikemanScytherTermiteAgrihand Content added by the Biotech DLCApocriton Content added by the Biotech DLCCenturion Content added by the Biotech DLCCleansweeper Content added by the Biotech DLCConstructoid Content added by the Biotech DLCDiabolus Content added by the Biotech DLCFabricor Content added by the Biotech DLCLegionary Content added by the Biotech DLCLifter Content added by the Biotech DLCMilitor Content added by the Biotech DLCParamedic Content added by the Biotech DLCScorcher Content added by the Biotech DLCTesseron Content added by the Biotech DLCTunneler Content added by the Biotech DLCWar queen Content added by the Biotech DLCWar urchin Content added by the Biotech DLC

See also[edit]