Template:MaterialInfobox: Difference between revisions

Content deleted Content added
No edit summary
Undo revision 139601 by Linskyter (talk)
 
(7 intermediate revisions by 2 users not shown)
Line 1:
<infobox theme="portInfobox">
<title source="gradename"><formatdefault>{{#switch: {{{grade|}}}
| common
| Very rare | Very Rare | very rare = [[File:Very_Rare_material.svg|35px|link=]][[Category:Very rare materials]]▼
| Rare | rareCommon = [[File:Rare_materialCommon material.svg|35px34px|link=]][[Category:Rare materials]]{{PAGENAME}}
| rare
| Common | common = [[File:Common material.svg|35px|link=]][[Category:Common materials]]▼
| Very common | Very Common | very commonRare = [[File:Very commonRare material.svg|35px34px|link=]][[Category:Very common materials]]{{PAGENAME}}
| standard
| Standard | standard = [[File:Standard_material.svg|35px|link=]][[Category:Standard materials]]▼
| Standard = [[File:Standard material.svg|34px|link=]] {{PAGENAME}}
}} {{PAGENAME}}</format></title>▼
| very common
<image source="image"/>▼
| Very Common
<data source="grade">▼
| Very common = [[File:Very common material.svg|34px|link=]] {{PAGENAME}}
<label>Grade</label>
| very rare
</data>
| Very Rare
<group layout="horizontal">
| Very rare = [[File:Very Rare material.svg|34px|link=]] {{PAGENAME}}
<header>Known Uses</header>▼
}}</default></title>
<data source="knownuses">
▲ <image source="image"/>
<!-- <format></format>
▲ <header>Known UsesClassification</header>
TODO: Write a Lua function with Dev:List
<data source="grade"><label>Grade</label><format>{{#switch: {{{grade}}}
L.makeList('unbulleted', mw.text.split(args.knownuses, ';'))
| common
-->
▲ | Common | common = [[File:Common material.svg|35px|link=]](Grade 2) [[Category:Common materials]]
</data>
| rare
</group>
| Rare = Rare (Grade 4) [[Category:Rare materials]]
</infobox>
| standard
<includeonly>[[Category:Materials]]</includeonly>▼
▲| Standard |= Standard |(Grade standard3) = [[File:Standard_material.svg|35px|link=]][[Category:Standard materials]]
<noinclude>
| very common
<pre style="width: 300px">
| Very Common
| Very common = Very Common (Grade 1) [[Category:Very common materials]]
| very rare
| Very Rare
▲ | Very rare |= Very Rare |(Grade very5) rare = [[File:Very_Rare_material.svg|35px|link=]][[Category:Very rare materials]]
▲ }} {{PAGENAME}}</format></titledata>
<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="gradeknownuses"/>
▲</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Materials]]}}</includeonly><noinclude>
Example usage:<pre>
{{MaterialInfobox
| image =
| grade =
| knownusestype =
| 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", "Standard", "Rare", orand "Very rareRare".
▲;image:The image to display in the material infobox.
;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>