Template:MaterialInfobox: Difference between revisions

Content deleted Content added
m Changed css pos
Undo revision 139601 by Linskyter (talk)
 
(20 intermediate revisions by 6 users not shown)
Line 1:
<infobox>
<onlyinclude>{{#infoboxbuilder:
<title source="name"><default>{{#switch: {{{grade}}}
| 0:Theme = eInfobox | 0:CustomModule = Module:Infobox Material
| 1:Type = Title
| 1:Label = NULL
| 1:ValueMethod = PreTitleIcon
| 1:Grade = {{{grade|}}}
| 1:Value = {{PAGENAME}}
| 2:Type = Line
| 2:Label = Grade
| 2:Value = {{{grade|}}}
| 3:Type = Custom
| 3:Label = tr
| 3:Value = <td colspan="2">Known uses</td>
| 3:CssClass = custom-listheader
| 5:Type = Custom
| 5:Label = tr
| 5:Value = <td colspan="2">{{{knownuses|}}}</td>
| 5:ValueMethod = Newline
| 5:CssClass = custom-list
}}<includeonly>[[Category:Materials]]
{{#switch:{{lc:{{{grade|}}}}}
| common
| Common = [[CategoryFile:Common materialsmaterial.svg|34px|link=]] {{PAGENAME}}
| rare
| Rare = [[CategoryFile:Rare materialsmaterial.svg|34px|link=]] {{PAGENAME}}
| standard
| Standard = [[File:Standard material.svg|34px|link=]] {{PAGENAME}}
| very common
| Very Common
| Very common = [[CategoryFile:Very common materialsmaterial.svg|34px|link=]] {{PAGENAME}}
| very rare
| Very Rare
| Very rare = [[CategoryFile:Very rareRare materialsmaterial.svg|34px|link=]] {{PAGENAME}}
}}</includeonlydefault></onlyincludetitle>
<image source="image"/>
<noinclude>
<header>Classification</header>
<pre style="width: 300px">
<data source="grade"><label>Grade</label><format>{{#switch: {{{grade}}}
{{CommodityInfobox
| common
| grade = ▼
| Common = Common (Grade 2) [[Category:Common materials]]
| knownuses = ▼
| rare
| Rare = Rare (Grade 4) [[Category:Rare materials]]
| standard
| Standard = Standard (Grade 3) [[Category:Standard materials]]
| very common
| Very Common
| Very common = Very Common (Grade 1) [[Category:Very common materials]]
| very rare
| Very Rare
| Very rare = Very Rare (Grade 5) [[Category:Very rare materials]]
}}</format></data>
<data source="type"><label>Type</label><format>{{#switch: {{{type}}}
| E = [[Encoded Materials|Encoded Material]] [[Category:Encoded materials]]
| M = [[Manufactured Materials|Manufactured Material]] [[Category:Manufactured materials]]
| R = [[Raw Materials|Raw Material]] [[Category:Raw materials]]
}}</format></data>
<header>Recipes and Unlocks</header>
<data source="knownuses"/>
</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Materials]]}}</includeonly><noinclude>
Example usage:<pre>
{{MaterialInfobox
| image =
▲| grade =
| type =
▲| knownuses =
}}
</pre>
== Usage ==
;image: The image to display in the material infobox, preferably of the item as seen in the game.
;grade: The grade or rating on how difficult it is to find. CanThere eitherare befive grades: "Very commonCommon", "Common", or"Standard", "Rare", and "Very Rare".
;knownuses:The known uses listed in the information of the material. New material are separated by semi-colon (";"). Names have to be '''exact''' in terms of both name and capitalisation. Please use [[:Category:Icon templates|icon templates]] such as {{t|Material ship}}.▼
;type: The type of material, which indicates its source. There are three types: "E" (Encoded/Data), "M" (Manufactured), and "R" (Raw).
▲;knownuses: The known uses listed in the information of the material. New material are separated by semi-colon (";"). Names have tomust be '''exact''' in terms of both name and capitalisation., Pleaseand useordered alphabetically. [[:Category:Icon templates|icon templates]] suchshould asprecede each name: {{t|Material ship}} for ship Synthesis recipes and Technology Broker unlocks, {{t|Material Engineer}} for Engineer recipes, and {{t|SRV}} for SRV Synthesis recipes.
 
[[Category:Infobox templates|{{PAGENAME}}]]
</noinclude>