Moduł:Inventory slot/Furnace

Z Minecraft Wiki Polska
Przejdź do nawigacji Przejdź do wyszukiwania
[ utwórz | historia | odśwież ]Dokumentacja
W tym module nie ma dokumentacji. Jeśli wiesz jak używać tego modułu, proszę, podaj odpowiednie informacje.
local p = {}
function p.grid( data )
	local str = data.args[1]
	local num = data.args[2]
	str = string.gsub(str,',',';')
	
	local result = ""
	local strPos = 1
	local numPos = 1
	if num ~= "" then
		while string.find(num,',',numPos) do
			result = result..string.sub(str,strPos,string.find(str,';',strPos) - 1)..','
			strPos = string.find(str,';',strPos) + 1
			result = result..string.sub(num,numPos,string.find(num,',',numPos) - 1)..';'
			numPos = string.find(num,',',numPos) + 1
		end
	end
	if string.find(str,';',strPos) then
		if num ~= "" then
			result = result..string.sub(str,strPos,string.find(str,';',strPos) - 1)..','..string.sub(num,numPos,-1)..';'
			strPos = string.find(str,';',strPos) + 1
			numPos = -1
		end
	end
	result = result..string.sub(str,strPos,-1)
	if string.sub(num,numPos,-1) ~= "" then
		result = result..','..string.sub(num,numPos,-1)
	end
	return result
end
return p