local p = {}
local all = mw.loadData('Module:Sandbox/Tag/All')
function p.main(f)
local args = f
if f == mw.getCurrentFrame() then
args = f:getParent().args
end
--'blocks','items','entity_types','fluids','game_events'
local objtype
if args[1] == 'block' or args[1] == 'blocks' then
objtype='blocks'
end
if args[1] == 'item' or args[1] == 'items' then
objtype='items'
end
if args[1] == 'entity_type' or args[1] == 'entity_types' or args[1] == 'entity'then
objtype='entity_types'
end
if args[1] == 'fluid' or args[1] == 'fluids' then
objtype='fluids'
end
if args[1] == 'game_event' or args[1] == 'game_events' then
objtype='game_events'
end
if not args[1] or args[1] == '' then
return '空标签类型'
end
local id = args[2]
local outtable=all['ID'][objtype][id]
return table.concat(table.sort(outtable),',')
end
return p
Advertisement
Advertisement