此模块的文档可以在模块:TechTree/doc创建

local p = {}

p.version = require('Module:Common/Utility.lua').version[1]

function p.all_tech()
	tech_set = {
		['projection'] = {
			['key'] = 1, 
			['prerequisites'] = 1
		}
	}
	query = {
		['_id'] = { ["$regex"] = '^Data:Technology/' },
		['main_category'] = 'technology',
		['version'] = p.version
	}
	local result = mw.huiji.db.find(query, sets)
	local output_data = {}
	for _, data in ipairs(result) do
		if data['prerequisites'] then
			output_data[data['key']] = data['prerequisites']
		else
			output_data[data['key']] = 'none'
		end
	end
	table.sort(result,function(a,b)
		return (a.key < b.key)
		end)
	mw.huiji.expose('TECHDATA', output_data)
end

return p
0.0
0人评价
avatar