Module:Uses skill list: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 26:
local skills = {}
local skills_lowered = {}
local category = args.category and trim(args.category) or nil -- Optional category parameter
-- Process skill arguments
if (args == nil) then
table.insert(skills, mw.title.getCurrentTitle().text)
else
Line 42 ⟶ 44:
end
 
-- FetchBuild dataSMW query
local query = {
'[[Uses skill::' .. table.concat(skills, '||') .. ']]',
'[[Production JSON::+]]',
'?=#-',
Line 51 ⟶ 53:
}
-- Add category filter if provided
if category then
table.insert(query, '[[Category::' .. category .. ']]')
end
 
-- Fetch data
local t1 = os.clock()
local smw_data = mw.smw.ask(query)