Module:Bee/Mutations

--

local p = {}

p.mutates_from = function(f) local args = f.args or f	if f == mw.getCurrentFrame and args[1] == nil then args = f:getParent.args else f = mw.getCurrentFrame end args = require(Module:ProcessArgs).norm(args) -- TODO: Localization. local text = "{|class=\"wikitable\"\n! Parent 1 !! Parent 2 !! Result !! Chance\n" local this_bee = args["this"] local parent_index = 1 while args["par-1" .. parent_index] and args["par-2" .. parent_index] and args["chc-" .. parent_index] do text = text .. "|-\n" .. "| " .. args["par-1" .. parent_index] .. " || " .. args["par-2" .. parent_index] .. " || " .. this_bee .. " || " .. args["chc-" .. parent_index] .. "\n" parent_index = parent_index + 1 end text = text .. "|}"	return text end

return p

--