Module:Database

From Cassette Beasts
Revision as of 19:08, 21 May 2022 by Tomc (talk | contribs)

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

local p = {}

local db = mw.loadData("Module:Database/data")

function p.listSpecies(frame)
  local result = ""
  for index, species in pairs(db.species.by_index) do
    if result ~= "" then
      result = result .. "\n\n"
    end
    result = result .. string.format("%s #%03d", species.name, index)
  end
  return result
end

return p