Template:PetIcon: Difference between revisions

From Melvor Idle
(Added icon for Ty, the Mastery Pet)
m (Implement size parameter)
Line 1: Line 1:
Pulls icons for pets based on either name or skill:
Pulls icons for pets based on either name or skill:


<nowiki>{{PetIcon|Smithing}}</nowiki> becomes {{PetIcon|Smithing}}
{{T|PetIcon|Smithing}} becomes {{PetIcon|Smithing}}


<nowiki>{{PetIcon|Beavis}}</nowiki> becomes {{PetIcon|Beavis}}
{{T|PetIcon|Beavis}} becomes {{PetIcon|Beavis}}


<nowiki>{{PetIcon|Larry}}</nowiki> becomes {{PetIcon|Larry}}
{{T|PetIcon|Larry}} becomes {{PetIcon|Larry}}
 
Size option allows for larger icons. {{T|PetIcon|Asura|size=50}} becomes {{PetIcon|Asura|size=50}}


<includeonly><onlyinclude>{{#vardefine:pet|{{{1}}}}}{{#vardefine:ext|}}{{#switch:{{{1}}}
<includeonly><onlyinclude>{{#vardefine:pet|{{{1}}}}}{{#vardefine:ext|}}{{#switch:{{{1}}}
|Beavis|Woodcutting={{#vardefine:pet|Beavis}}{{#vardefine:ext|png}}
|Beavis|Woodcutting={{#vardefine:pet|Beavis}}{{#vardefine:ext|png}}
|Pudding Duckie|Fishing={{#vardefine:pet|Pudding Duckie}}{{#vardefine:ext|png}}
|Pudding Duckie|Fishing={{#vardefine:pet|Pudding Duckie}}{{#vardefine:ext|png}}
|Firemaking|Firemaking={{#vardefine:pet|Pyro}}{{#vardefine:ext|png}}
|Pyro|Firemaking={{#vardefine:pet|Pyro}}{{#vardefine:ext|png}}
|Cooking={{#vardefine:pet|Cris}}
|Cooking={{#vardefine:pet|Cris}}
|Mining={{#vardefine:pet|Cool Rock}}
|Mining={{#vardefine:pet|Cool Rock}}
Line 29: Line 31:
|Asura|Slayer={{#vardefine:pet|Asura}}{{#vardefine:ext|png}}
|Asura|Slayer={{#vardefine:pet|Asura}}{{#vardefine:ext|png}}
|Golbin={{#vardefine:pet|Golden Golbin}}
|Golbin={{#vardefine:pet|Golden Golbin}}
|Mastery|Ty={{#vardefine:pet|Ty}}}}{{Icon|type=pet|{{#var:pet}}|ext={{#var:ext|svg}}}}</onlyinclude></includeonly>
|Mastery|Ty={{#vardefine:pet|Ty}}}}{{Icon|type=pet|{{#var:pet}}|ext={{#var:ext|svg}}|size={{{size|}}}}}</onlyinclude></includeonly>

Revision as of 18:48, 10 January 2021

Pulls icons for pets based on either name or skill:

{{PetIcon|Smithing}} becomes Puff, the Baby Dragon

{{PetIcon|Beavis}} becomes Beavis

{{PetIcon|Larry}} becomes Larry, the Lonely Lizard

Size option allows for larger icons. {{PetIcon|Asura|size=50}} becomes Asura