<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sankoquest.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInventorySlot%2Fdoc</id>
	<title>Module:InventorySlot/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://sankoquest.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInventorySlot%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://sankoquest.wiki/w/index.php?title=Module:InventorySlot/doc&amp;action=history"/>
	<updated>2026-08-17T06:56:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://sankoquest.wiki/w/index.php?title=Module:InventorySlot/doc&amp;diff=655&amp;oldid=prev</id>
		<title>GrizzledAlchemistb40f9cb5: module documentation</title>
		<link rel="alternate" type="text/html" href="https://sankoquest.wiki/w/index.php?title=Module:InventorySlot/doc&amp;diff=655&amp;oldid=prev"/>
		<updated>2026-07-05T17:16:08Z</updated>

		<summary type="html">&lt;p&gt;module documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the documentation page for [[Module:InventorySlot]].&lt;br /&gt;
&lt;br /&gt;
Renders a single inventory-style item slot: a &amp;lt;code&amp;gt;span.sanko-inventory-slot&amp;lt;/code&amp;gt; containing a 28&amp;amp;nbsp;px item sprite (via [[Template:ItemSprite]], linked to the item&amp;#039;s page) and, when the quantity is anything other than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, a &amp;lt;code&amp;gt;span.sanko-inventory-qty&amp;lt;/code&amp;gt; badge.&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== slot ===&lt;br /&gt;
Wikitext entry point: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:InventorySlot|slot|item=...|qty=...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;item&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;qty&amp;lt;/code&amp;gt; may also be given as the first and second positional parameters.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sanko-table&amp;quot;&lt;br /&gt;
! Parameter !! Meaning !! Default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;item&amp;lt;/code&amp;gt; (or first positional) || Item name; also used as the sprite&amp;#039;s link target. Empty renders an empty slot. || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;qty&amp;lt;/code&amp;gt; (or second positional) || Quantity badge text. Hidden when empty or exactly &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. || hidden&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{#invoke:InventorySlot|slot|Iron Bar|3}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== _slot ===&lt;br /&gt;
Module-to-module entry point: &amp;lt;code&amp;gt;p._slot(frame, item, qty)&amp;lt;/code&amp;gt;. Takes the same values as plain Lua arguments and returns the rendered HTML string. This is how [[Module:Recipe]] draws its input and output slots.&lt;br /&gt;
&lt;br /&gt;
== Used by ==&lt;br /&gt;
* [[Module:Recipe]] — via &amp;lt;code&amp;gt;require(&amp;#039;Module:InventorySlot&amp;#039;)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;inventory._slot(frame, item, qty)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* No template currently calls &amp;lt;code&amp;gt;#invoke:InventorySlot&amp;lt;/code&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
== Notes and sharp edges ==&lt;br /&gt;
* The sprite is produced with &amp;lt;code&amp;gt;frame:expandTemplate{ title = &amp;#039;ItemSprite&amp;#039;, ... }&amp;lt;/code&amp;gt;, so this module breaks if [[Template:ItemSprite]] is renamed or deleted, and the item name must exist in [[Module:Sprite/Item]] or the slot shows the missing-sprite &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; placeholder.&lt;br /&gt;
* The quantity check is a string comparison: only the exact string &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (or empty) is suppressed. Values like &amp;lt;code&amp;gt;01&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;amp;nbsp;&amp;lt;/code&amp;gt; will display. The value is shown verbatim — no number formatting.&lt;br /&gt;
* Sprite size is fixed at 28&amp;amp;nbsp;px and the link always targets the item name; neither is parameterized.&lt;/div&gt;</summary>
		<author><name>GrizzledAlchemistb40f9cb5</name></author>
	</entry>
</feed>