Module:Inventory slot/Inverse

Jump to navigation Jump to search
Documentation[create] [refresh]
This module has no documentation. If you know how to use this module, please create it.
local aliases = mw.loadData('Module:Inventory slot/Aliases')
local inverse = {}
for groupName, data in pairs(aliases) do
	if data[1] ~= nil then
		for _, entry in ipairs(data) do
			if type(entry) == 'table' then
				entry = entry.name
			end
			if inverse[entry] == nil then
				inverse[entry] = {}
			end
			table.insert(inverse[entry], groupName)
		end
	end
end

return inverse