Difference between revisions of "Template:Availability"

From Nookipedia, the Animal Crossing wiki
m (Correcting wikicode)
(Moving span style and season before and after #switch function, respectively, to reduce repetition. Resident Services now uses Nookling icon.)
Line 1: Line 1:
{{#switch:{{{1|}}}
+
<span style="font-size:.9em;">{{#switch:{{{1|}}}
| Able Sisters = {{#ifeq:{{#expr:{{#time:j}} mod 2}}|0|[[File:Mabel NH Icon.png|22px|link={{{1|}}}]]|[[File:Sable NH Icon.png|22px]]}}<span style="font-size:.9em;">&nbsp;[[Able Sisters]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Able Sisters = {{#ifeq:{{#expr:{{#time:j}} mod 2}}|0|[[File:Mabel NH Icon.png|22px|link={{{1|}}}]]|[[File:Sable NH Icon.png|22px]]}}&nbsp;[[Able Sisters]]
 
| Blathers
 
| Blathers
 
| Celeste
 
| Celeste
Line 8: Line 8:
 
| Label
 
| Label
 
| Saharah
 
| Saharah
| Tom Nook = [[File:{{{1|}}} NH Icon.png|22px|link={{{1|}}}]]<span style="font-size:.9em;">&nbsp;[[{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Tom Nook = [[File:{{{1|}}} NH Icon.png|22px|link={{{1|}}}]]&nbsp;[[{{{1|}}}]]
| Crafting = [[File:Menu DIY NH Icon.png|22px|link=DIY]]<span style="font-size:.9em;">&nbsp;[[DIY|Crafting]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Crafting = [[File:Menu DIY NH Icon.png|22px|link=DIY]]&nbsp;[[DIY|Crafting]]
| Nook's Cranny = [[File:Nookling PC icon.png|22px|link={{{1|}}}]]<span style="font-size:.9em;">&nbsp;[[{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Nook's Cranny = [[File:Nookling PC icon.png|22px|link={{{1|}}}]]&nbsp;[[{{{1|}}}]]
| Nook's Cranny (Upgraded) = [[File:Nookling PC icon.png|22px|link=Nook's Cranny]]<span style="font-size:.9em;">&nbsp;[[Nook's Cranny|{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Nook's Cranny (Upgraded) = [[File:Nookling PC icon.png|22px|link=Nook's Cranny]]&nbsp;[[Nook's Cranny|{{{1|}}}]]
| Zipper = [[File:{{{1|}}} PC icon.png|22px|link={{{1|}}}]]<span style="font-size:.9em;">&nbsp;[[{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Resident Services = [[File:Nookling PC icon.png|22px|link=Resident Services]]&nbsp;[[{{{1|}}}]]
| Bunny Day = [[File:ACnHEggSky.png|22px|link={{{1|}}}]]<span style="font-size:.9em;">&nbsp;[[{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Zipper = [[File:{{{1|}}} PC icon.png|22px|link={{{1|}}}]]&nbsp;[[{{{1|}}}]]
 +
| Bunny Day = [[File:ACnHEggSky.png|22px|link={{{1|}}}]]&nbsp;[[{{{1|}}}]]
 
| amiibo
 
| amiibo
 
| Balloon
 
| Balloon
Line 20: Line 21:
 
| Bug-off
 
| Bug-off
 
| C.J.
 
| C.J.
| Cyrus = [[File:Cyrus NH Icon.png|22px|link=Cyrus]]<span style="font-size:.9em;">&nbsp;[[Cyrus]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Cyrus = [[File:Cyrus NH Icon.png|22px|link=Cyrus]]&nbsp;[[Cyrus]]
| Dodo Airlines = [[File:Wilbur NH Icon.png|22px|link=Dodo Airlines]]<span style="font-size:.9em;">&nbsp;[[Dodo|Dodo Airlines]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Dodo Airlines = [[File:Wilbur NH Icon.png|22px|link=Dodo Airlines]]&nbsp;[[Dodo|Dodo Airlines]]
 
| Fishing Tourney
 
| Fishing Tourney
 
| Flick
 
| Flick
Line 33: Line 34:
 
| Pocket Camp
 
| Pocket Camp
 
| Recycling Bin
 
| Recycling Bin
| Resident Services
+
| Villager = [[{{{1|}}}]]
| Villager = <span style="font-size:.9em;">[[{{{1|}}}]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Cranky = [[File:Emotion Aggravation NH Icon cropped.png|22px|link=Cranky]]&nbsp;[[Cranky|Cranky villager]]
| Cranky = [[File:Emotion Aggravation NH Icon cropped.png|22px|link=Cranky]]<span style="font-size:.9em;">&nbsp;[[Cranky|Cranky villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Jock = [[File:Emotion Pride NH Icon cropped.png|22px|link=Jock]]&nbsp;[[Jock|Jock villager]]
| Jock = [[File:Emotion Pride NH Icon cropped.png|22px|link=Jock]]<span style="font-size:.9em;">&nbsp;[[Jock|Jock villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Lazy = [[File:Emotion Sleepy NH Icon cropped.png|22px|link=Lazy]]&nbsp;[[Lazy|Lazy villager]]
| Lazy = [[File:Emotion Sleepy NH Icon cropped.png|22px|link=Lazy]]<span style="font-size:.9em;">&nbsp;[[Lazy|Lazy villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Smug = [[File:Emotion Smirking NH Icon cropped.png|22px|link=Smug]]&nbsp;[[Smug|Smug villager]]
| Smug = [[File:Emotion Smirking NH Icon cropped.png|22px|link=Smug]]<span style="font-size:.9em;">&nbsp;[[Smug|Smug villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Normal = [[File:Emotion Happiness NH Icon cropped.png|22px|link=Normal]]&nbsp;[[Normal|Normal villager]]
| Normal = [[File:Emotion Happiness NH Icon cropped.png|22px|link=Normal]]<span style="font-size:.9em;">&nbsp;[[Normal|Normal villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Peppy = [[File:Emotion Encouraging NH Icon cropped.png|22px|link=Peppy]]&nbsp;[[Peppy|Peppy villager]]
| Peppy = [[File:Emotion Encouraging NH Icon cropped.png|22px|link=Peppy]]<span style="font-size:.9em;">&nbsp;[[Peppy|Peppy villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Snooty = [[File:Emotion Disagreement NH Icon cropped.png|22px|link=Snooty]]&nbsp;[[Snooty|Snooty villager]]
| Snooty = [[File:Emotion Disagreement NH Icon cropped.png|22px|link=Snooty]]<span style="font-size:.9em;">&nbsp;[[Snooty|Snooty villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| Sisterly = [[File:Emotion Mischief NH Icon cropped.png|22px|link=Sisterly]]&nbsp;[[Sisterly|Sisterly villager]]
| Sisterly = [[File:Emotion Mischief NH Icon cropped.png|22px|link=Sisterly]]<span style="font-size:.9em;">&nbsp;[[Sisterly|Sisterly villager]]{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
| #default = {{#if:{{{1|}}}|[[{{{1|}}}]]|Unknown}}
| #default = <span style="font-size:.9em;">{{#if:{{{1|}}}|[[{{{1|}}}]]|Unknown}}{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>
+
}}{{#if:{{{season|}}}|&nbsp;({{{season|}}})}}</span>{{#if:{{{nb|}}}||<br />}}<noinclude>{{Clear}}{{Documentation}}[[Category:Templates]]</noinclude>
}}{{#if:{{{nb|}}}||<br />}}<noinclude>{{Clear}}{{Documentation}}[[Category:Templates]]</noinclude>
 

Revision as of 00:09, April 30, 2020

Unknown

Template documentation (view)


Emotion Surprise NH Icon.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
Emotion Surprise NH Icon.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
Lua Logo.svg
This template is using one or many Lua modules
To change certain features of this template, the following modules will need to be edited:
  • Module:Availability
  • Module:Availability/Data
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
    Lua Logo.svg
    This template is using one or many Lua modules
    To change certain features of this template, the following modules will need to be edited:
  • Module:Availability
  • Module:Availability/Data
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.

    Usage

    {{Availability|<source>}}
    

    Generates an icon and link, intended for use in item tables. If no value is entered, template will return 'Unknown'. note can be used to specify any notes, such as a specific season the item is available in, or prerequisites that have to be met. By default, instances of this template will be on their own line; to remove linebreaks, nb can be set to true.

    The following item sources are currently supported:

    Characters
    Locations and merchants
    Villagers
    Events
    Distribution methods
    Flowers and flower bags
    Other plants
    Animal Crossing: Pocket Camp's Fortune Cookies
    Other

    Additionally, Villager is supported and will allow an icon and link for a specified villager to be shown. It is possible to switch the icon of the villager. To change the text for specific Villagers/Special NPCs, use text=. To hide the image of the availability template, use no-image.

    Example

    {{Availability|Nook's Cranny}}
    

    Nookling PC Character Icon.png Nook's Cranny

    {{Availability|Able Sisters|note=Winter}}
    

    Sable NH Character Icon.png Able Sisters

    {{Availability|Villager|Bob}}
    

    Villager

    {{Availability|RV|Toby}}
    

    RV

    {{Availability|Tom Nook|no-image=yes}}
    
    Tom Nook NH Character Icon.png Tom Nook