Module:Spell: Difference between revisions

From Kronopolis and the Flat Plane
No edit summary
No edit summary
Line 1: Line 1:
local p = {}
local p = {}


function p.getDomainList(domain)
function p.getDomainList(frame)
     directory = "Json/Spell/Domain/"
     local directory = 'Json/Spell/Domain/'
     data = mw.loadJsonData(directory .. domain[0])
     local data = mw.loadJsonData(directory .. frame['domain'])
    return data
end
end


return p;
return p

Revision as of 16:31, 23 February 2023

Usage

  • {{#invoke:spell|list|domain=}}
  • {{#invoke:spell|list|category=}}

local p = {}

function p.getDomainList(frame)
    local directory = 'Json/Spell/Domain/'
    local data = mw.loadJsonData(directory .. frame['domain'])
    return data
end

return p