Module:Availability/doc

 Module documentation (view)

Usage
This Lua module outputs the availability of each source presented and is used for the Availability template to account for preprocessor node count limits. Data is stored in a table, and can determine how certain variables are used.

Inserting a new source/availability
When adding a new source or availability to be used on pages, the following syntax must be inserted into the main  table. Note that this should not be done to villagers; they are separately called in the template via its own section in the Lua module.
 * describes the name of the source that the editor will write in the Availability template. There is also a second instance of, which can also feature a different text to its first instance. To use the   parameter for certain instances (e.g.  and ), leave the second instance blank.
 * requires an image (preferably an icon) to be added. It must include the filename extension.
 * describes the default size that  will be presented in.
 * describes the link that the player will click on (provided that the link is present). To use the  parameter for certain instances (e.g.  and ), leave this blank.
 * is optional, and is used to display specialized wikitext.

Each source must then be added under their appropriate section.

Example
"Isabelle" is the  in both instances that it appears. "Isabelle" is also the  and has a special wikitext presented in , although it will be unused in this instance. Its  is "Isabelle NH Character Icon.png", and the   is set to "22px".

The output is:

"Punchy's Crunch Cookie" is the, but it is blank in its second instance, along with its. Its  is "Punchy's Crunch Cookie PC Icon.png", and the   is set to "20px". Its  is simply "Punchy's Crunch Cookie", and will provide no links at all.

The output is: