<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AItem_Usage</id>
	<title>Module:Item Usage - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AItem_Usage"/>
	<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:Item_Usage&amp;action=history"/>
	<updated>2026-04-11T12:06:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://petitplanet.wiki/index.php?title=Module:Item_Usage&amp;diff=5032&amp;oldid=prev</id>
		<title>Stevium: fandom-table -&gt; wikitable</title>
		<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:Item_Usage&amp;diff=5032&amp;oldid=prev"/>
		<updated>2025-11-25T20:28:14Z</updated>

		<summary type="html">&lt;p&gt;fandom-table -&amp;gt; wikitable&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:28, 25 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot;&gt;Line 51:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 51:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._main(valids, craftType)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function p._main(valids, craftType)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local _table = mw.html.create(&#039;table&#039;):addClass(&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fandom-table &lt;/del&gt;article-table sortable&#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local _table = mw.html.create(&#039;table&#039;):addClass(&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wikitable &lt;/ins&gt;article-table sortable&#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- header row&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- header row&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key petitplanet:diff:1.41:old-5019:rev-5032:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Stevium</name></author>
	</entry>
	<entry>
		<id>https://petitplanet.wiki/index.php?title=Module:Item_Usage&amp;diff=5019&amp;oldid=prev</id>
		<title>Eleiyas: Created page with &quot;local p = {} local lib = require(&#039;Module:Feature&#039;) local Parse = require(&#039;Module:Parser&#039;).getTemplateArgs local Rlib = require(&#039;Module:Recipe&#039;).param local Item = require(&#039;Module:Item&#039;)._main  function p.main(frame) 	local args = require(&#039;Module:Arguments&#039;).getArgs(frame, { 		parentFirst = true, 		wrappers = {&#039;Template:Item Usage&#039;} 	}) 	local item = args[1] or mw.title.getCurrentTitle().rootText 	local count = 0 	local craftType = args[&#039;type&#039;] 	local out = mw.html.create...&quot;</title>
		<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:Item_Usage&amp;diff=5019&amp;oldid=prev"/>
		<updated>2025-11-25T20:21:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {} local lib = require(&amp;#039;Module:Feature&amp;#039;) local Parse = require(&amp;#039;Module:Parser&amp;#039;).getTemplateArgs local Rlib = require(&amp;#039;Module:Recipe&amp;#039;).param local Item = require(&amp;#039;Module:Item&amp;#039;)._main  function p.main(frame) 	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, { 		parentFirst = true, 		wrappers = {&amp;#039;Template:Item Usage&amp;#039;} 	}) 	local item = args[1] or mw.title.getCurrentTitle().rootText 	local count = 0 	local craftType = args[&amp;#039;type&amp;#039;] 	local out = mw.html.create...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local lib = require(&amp;#039;Module:Feature&amp;#039;)&lt;br /&gt;
local Parse = require(&amp;#039;Module:Parser&amp;#039;).getTemplateArgs&lt;br /&gt;
local Rlib = require(&amp;#039;Module:Recipe&amp;#039;).param&lt;br /&gt;
local Item = require(&amp;#039;Module:Item&amp;#039;)._main&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		parentFirst = true,&lt;br /&gt;
		wrappers = {&amp;#039;Template:Item Usage&amp;#039;}&lt;br /&gt;
	})&lt;br /&gt;
	local item = args[1] or mw.title.getCurrentTitle().rootText&lt;br /&gt;
	local count = 0&lt;br /&gt;
	local craftType = args[&amp;#039;type&amp;#039;]&lt;br /&gt;
	local out = mw.html.create()&lt;br /&gt;
	if lib.isNotEmpty(frame.args.pages) and frame.args.pages:find(&amp;#039;%$%$%$&amp;#039;) then&lt;br /&gt;
		local valids = {}&lt;br /&gt;
		for page in lib.gsplit(frame.args.pages, &amp;#039;$$$&amp;#039;) do&lt;br /&gt;
			local data = Parse(page, { only=&amp;#039;Recipe&amp;#039; } )&lt;br /&gt;
			if type(data[1]) ~= &amp;#039;table&amp;#039; then data = {data} end&lt;br /&gt;
			for _, call in ipairs(data) do&lt;br /&gt;
				if lib.isNotEmpty(call[&amp;#039;sort&amp;#039;]) and lib.isNotEmpty(call[item]) then&lt;br /&gt;
					for name in lib.gsplit(call[&amp;#039;sort&amp;#039;], lib.ternary(call[&amp;#039;sort&amp;#039;]:find(Rlib.sSortDelim2), Rlib.sSortDelim2, Rlib.sSortDelim)) do&lt;br /&gt;
						if (lib.isNotEmpty(name) and name == item) then&lt;br /&gt;
							valids[page] = valids[page] or {}&lt;br /&gt;
							table.insert(valids[page], call)&lt;br /&gt;
							count = count + 1&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if craftType == &amp;#039;Furnishing Set&amp;#039; then&lt;br /&gt;
			out:wikitext(&amp;#039;There &amp;#039;, lib.ternary(count &amp;gt; 1,&amp;#039;are&amp;#039;, &amp;#039;is&amp;#039;), &amp;#039; &amp;lt;b&amp;gt;&amp;#039;, tostring(count), &amp;#039;&amp;lt;/b&amp;gt; [[Furnishing Set]]&amp;#039;, lib.ternary(count &amp;gt; 1, &amp;#039;s&amp;#039;, &amp;#039;&amp;#039;), &amp;#039; that use&amp;#039;, lib.ternary(count &amp;gt; 1, &amp;#039;&amp;#039;, &amp;#039;s&amp;#039;), &amp;#039; [[&amp;#039;, item , &amp;#039;]] as a component:\n&amp;#039;)&lt;br /&gt;
		else&lt;br /&gt;
			out:wikitext(&amp;#039;There &amp;#039;, lib.ternary(count &amp;gt; 1,&amp;#039;are&amp;#039;, &amp;#039;is&amp;#039;), &amp;#039; &amp;lt;b&amp;gt;&amp;#039;, tostring(count), &amp;#039;&amp;lt;/b&amp;gt; use&amp;#039;, lib.ternary(count &amp;gt; 1, &amp;#039;s&amp;#039;, &amp;#039;&amp;#039;), &amp;#039; for [[&amp;#039;, item , &amp;#039;]]:\n&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		out:node(p._main(valids, craftType))&lt;br /&gt;
		return out&lt;br /&gt;
	else&lt;br /&gt;
		if craftType == &amp;#039;Furnishing Set&amp;#039; then&lt;br /&gt;
			out:wikitext(&amp;#039;No [[Furnishing Set]]s use [[&amp;#039;, item, &amp;#039;]] as a component.&amp;#039;)&lt;br /&gt;
		else&lt;br /&gt;
			out:wikitext(&amp;#039;No recipes use [[&amp;#039;, item, &amp;#039;]] as an ingredient.&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
		return out&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(valids, craftType)&lt;br /&gt;
	local _table = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;fandom-table article-table sortable&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	-- header row&lt;br /&gt;
	local tr = _table:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	tr:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Item&amp;#039;)&lt;br /&gt;
	tr:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Craft Type&amp;#039;)&lt;br /&gt;
	tr:tag(&amp;#039;th&amp;#039;):wikitext(craftType == &amp;#039;Furnishing Set&amp;#039; and &amp;#039;Components&amp;#039; or &amp;#039;Recipe&amp;#039;)&lt;br /&gt;
	-- mw.logObject(valids)&lt;br /&gt;
	-- rest of table&lt;br /&gt;
	for page, recipes in lib.spairs(valids) do&lt;br /&gt;
		local tr = _table:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		&lt;br /&gt;
		for i, recipe in pairs(recipes) do&lt;br /&gt;
			if i == 1 then&lt;br /&gt;
				local cell = tr:tag(&amp;#039;td&amp;#039;):attr(&amp;#039;rowspan&amp;#039;, #valids[page])&lt;br /&gt;
				if recipe[Rlib.sTypeArg]:find(&amp;#039;Set&amp;#039;) then&lt;br /&gt;
					cell&lt;br /&gt;
					:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
						:css{[&amp;#039;text-align&amp;#039;] = &amp;#039;center&amp;#039;, [&amp;#039;width&amp;#039;] = &amp;#039;165px&amp;#039;}&lt;br /&gt;
						:wikitext(&amp;#039;[[File:Furnishing Set &amp;#039;, page, &amp;#039; Display.png|160x80px|alt=&amp;#039;, page, &amp;#039;|link=&amp;#039;, page, &amp;#039;]]&amp;lt;br&amp;gt;[[&amp;#039;, page, &amp;#039;]]&amp;#039;)&lt;br /&gt;
				else&lt;br /&gt;
					cell:wikitext(Item({ page, x = recipe[Rlib.sYieldArg] }))&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				tr = _table:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
			tr:tag(&amp;#039;td&amp;#039;):css{[&amp;#039;text-align&amp;#039;] = &amp;#039;center&amp;#039;}:wikitext(&amp;#039;[[&amp;#039;, recipe[Rlib.sTypeArg], &amp;#039;]]&amp;#039;)&lt;br /&gt;
			local ingredients = {}&lt;br /&gt;
			for name in lib.gsplit(recipe[&amp;#039;sort&amp;#039;], lib.ternary(recipe[&amp;#039;sort&amp;#039;]:find(Rlib.sSortDelim2), Rlib.sSortDelim2, Rlib.sSortDelim)) do&lt;br /&gt;
				if (lib.isNotEmpty(name) and lib.isNotEmpty(recipe[name])) then&lt;br /&gt;
					table.insert(ingredients, Item({ name, size = 20, x = recipe[name] }))&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			tr:tag(&amp;#039;td&amp;#039;):wikitext(table.concat(ingredients, &amp;#039;&amp;lt;br&amp;gt;&amp;#039;))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- mw.logObject(_table) --debug&lt;br /&gt;
	return _table&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Eleiyas</name></author>
	</entry>
</feed>