<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://stardew.fastobject.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ACalcedibility</id>
	<title>Module:Calcedibility - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stardew.fastobject.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ACalcedibility"/>
	<link rel="alternate" type="text/html" href="https://stardew.fastobject.net/index.php?title=Module:Calcedibility&amp;action=history"/>
	<updated>2026-10-29T05:35:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://stardew.fastobject.net/index.php?title=Module:Calcedibility&amp;diff=127719&amp;oldid=prev</id>
		<title>imported&gt;Margotbean: create</title>
		<link rel="alternate" type="text/html" href="https://stardew.fastobject.net/index.php?title=Module:Calcedibility&amp;diff=127719&amp;oldid=prev"/>
		<updated>2023-02-27T16:57:31Z</updated>

		<summary type="html">&lt;p&gt;create&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;
&lt;br /&gt;
--ceh = calculate edibility (energy/health)&lt;br /&gt;
function p.ce(frame)&lt;br /&gt;
	local item = string.lower(frame.args.im)&lt;br /&gt;
	local edibility = tonumber(frame.args.ed)&lt;br /&gt;
	local quality = tonumber(frame.args.q)&lt;br /&gt;
	local ulang = string.upper(frame.args.ll)&lt;br /&gt;
	local result, formattedresult, temp, length&lt;br /&gt;
&lt;br /&gt;
	if edibility == 0 then return 0 end&lt;br /&gt;
&lt;br /&gt;
	if item == &amp;quot;energy&amp;quot; then&lt;br /&gt;
		result = math.floor(math.ceil(edibility*2.5) + edibility*quality)&lt;br /&gt;
	else&lt;br /&gt;
		result = math.floor(math.floor(math.ceil(edibility*2.5) + edibility*quality)*0.45)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	formattedresult = mw.language.getContentLanguage():formatNum(result)&lt;br /&gt;
&lt;br /&gt;
	if ((result &amp;lt; 1000) or (ulang ~= &amp;quot;ES&amp;quot;)) then return formattedresult end&lt;br /&gt;
&lt;br /&gt;
	--replace space with dot&lt;br /&gt;
	--Problem: ES doesn&amp;#039;t add a space for 4 digits, only for 5+&lt;br /&gt;
&lt;br /&gt;
	if (result &amp;lt; 10000) then&lt;br /&gt;
		length = #(tostring(result))&lt;br /&gt;
		temp = string.sub(tostring(result), -3)	&lt;br /&gt;
		return string.sub(tostring(result), 1, (length-3)) .. &amp;quot;.&amp;quot; .. temp&lt;br /&gt;
	else&lt;br /&gt;
		temp = {mw.ustring.gsub(tostring(formattedresult), &amp;quot;%s&amp;quot; , &amp;quot;.&amp;quot;)} &lt;br /&gt;
		return temp[1]	&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Margotbean</name></author>
	</entry>
</feed>