Template:Disease icon: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{ #if: {{{1|}}} |  
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v370/icons/icon_{{ #switch: {{{1|None}}}
{{ #replace: http://cdn.projectgorgon.com/v421/icons/icon_{{ #switch: {{{1|None}}}
| Feeble Fever = 2217
| Feeble Fever = 2217
| Slimy Tremors = 2217
| Slimy Tremors = 2217
Line 70: Line 70:
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Disease not found</span> }}
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Disease not found</span> }}
}}.png |  
}}.png |  
http://cdn.projectgorgon.com/v356/icons/icon_<span style="color:red">Error: Disease not found</span>.png |  
http://cdn.projectgorgon.com/v421/icons/icon_<span style="color:red">Error: Disease not found</span>.png |  
<span style="color:red">Error: Disease not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
<span style="color:red">Error: Disease not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
{{Disease icon/Explanation}}
{{Disease icon/Explanation}}
[[Category:Formatting templates|ItemT]]
[[Category:Formatting templates|ItemT]]
</noinclude>
</noinclude>

Revision as of 16:07, 28 February 2025

Description

This accepts a Disease name (including curses) as input and returns the in-game icon. Be aware that Disease icons have various sizes, and you can use CSS to easily resize them. 99% of the time, you'll want 32x32. If you do NEED 64x64, remember that some icons are not inherently that big so you'll lose image quality. See the Examples section below.

Syntax

{{Disease icon|<name>}}

Parameters

<name>
The name of the Disease or Curse. It must match exactly what is displayed in-game (e.g. "Feeble Fever", not "feeble fever" or "FeebleFever")

Examples

Basic Use

{{Disease icon|Feeble Fever}}

{{ #replace: http://cdn.projectgorgon.com/v421/icons/icon_2217.png | http://cdn.projectgorgon.com/v421/icons/icon_Error: Disease not found.png | Error: Disease not found }}


Forcing 32x32 size

<span class="extimage32px">{{Disease icon|Feeble Fever}}</span>

{{ #replace: http://cdn.projectgorgon.com/v421/icons/icon_2217.png | http://cdn.projectgorgon.com/v421/icons/icon_Error: Disease not found.png | Error: Disease not found }}


Forcing 64x64 size

<span class="extimage64px">{{Disease icon|Feeble Fever}}</span>

{{ #replace: http://cdn.projectgorgon.com/v421/icons/icon_2217.png | http://cdn.projectgorgon.com/v421/icons/icon_Error: Disease not found.png | Error: Disease not found }}