Module:Sandbox/Soreness: Difference between revisions

From Growtopia
Jump to navigationJump to search
>Sorenesss
mNo edit summary
>Sorenesss
mNo edit summary
Line 17: Line 17:
if not next(copy) == nil then
if not next(copy) == nil then
table.insert(s,"'''Rarity "..i..":'''<br>")
table.insert(s,"'''Rarity "..i..":'''<br>")
--[[
while not next(copy) == nil
while not next(copy) == nil
do
do
table.insert(s, next(copy))
table.insert(s, next(copy))
end
end
--]]
end
end
end
end
return s;
return s;
end
end

Revision as of 10:26, 27 April 2022

Documentation for this module may be created at Module:Sandbox/Soreness/doc

local p = {}

local function shallowCopy(original)
	local copy = {}
	for key, value in pairs(original) do
		copy[key] = value
	end
	return copy
end

function p.ListRaritys()
	local s = {}
	for i=1, 400, 1
	do
		local copy = {}
		copy = shallowCopy("[".."[Category:Rarity "..i.."]]")
		if not next(copy) == nil then
			table.insert(s,"'''Rarity "..i..":'''<br>")
			--[[
			while not next(copy) == nil
			do
				table.insert(s, next(copy))
			end
			--]]
		end
	end
	return s;
end