跳转到内容
主菜单
主菜单
移至侧栏
隐藏
首页|Wiki首页
Wymbot新手引导|新手入门
WymboTrip|旅行模块
指令一览|指令目录
旅行地点|旅行地点
物品来源速查|物品资料
Wums|wum图鉴
合成配方|合成配方
科研|科研
共创指南|参与编写
https://wum.hetonger.cn/|共创站首页
https://wum.hetonger.cn/game/|网页端
https://wum.hetonger.cn/command/|指令检索
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模块:物品收集度”︁的源代码
模块
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模块:物品收集度
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local C = require('模块:物品通用') local D = require('模块:物品数据') local p = {} local function classify(result) local cats, pending = {}, result.status == 'pending' if result.status == 'none' then cats[#cats + 1] = '没有收集度信息的物品' end for _, entry in ipairs(result.entries or {}) do if entry.status == 'pending' then pending = true end if entry.level == 500 or entry.level == 10000 then if entry.status == 'known' then cats[#cats + 1] = '有' .. entry.level .. '%收集度信息的物品' elseif entry.level == 500 and entry.status == 'none' then cats[#cats + 1] = '没有500%收集度信息的物品' end end end if pending then cats[#cats + 1] = '物品收集度信息待完善的页面' end return cats end function p.main(frame) local c = C.context(frame) if not c.enabled then return '' end local selected = c.option('收集度档位', '') local result = D.getCollection(c.name, selected) local overall = selected ~= '' and D.getCollection(c.name, '') or result local parts = {} if result.status == 'error' or overall.status == 'error' then return C.finish(c, 'collection', C.heading(c, '这啥?') .. C.diagnostic(result.status == 'error' and result or overall), { '物品数据异常的页面' }) end local cats = classify(overall) if result.status == 'none' then return C.categories(c, cats) end local entries = result.entries or {} if #entries == 0 then entries = { { level = 100, status = 'pending' }, { level = 300, status = 'pending' }, { level = 500, status = 'pending' } } end for _, entry in ipairs(entries) do if entry.status == 'known' or (entry.status ~= 'none' and (entry.level == 100 or entry.level == 300)) then local text = entry.status == 'known' and C.literal(entry.text) or '具体信息还不是很清楚,多收集几个试试?<sup>[待完善]</sup>' parts[#parts + 1] = '<div class="mw-collapsible mw-collapsed wum-item-collection-entry">\n<div class="wum-item-collection-heading">收集度达到 ' .. entry.level .. '%</div>\n<div class="mw-collapsible-content wum-item-literal">' .. text .. '</div>\n</div>' end end if #parts == 0 then return C.categories(c, cats) end return C.finish(c, 'collection', C.heading(c, '这啥?') .. table.concat(parts, '\n'), cats) end return p
此页面嵌入的页面:
模块:物品收集度/doc
(
查看源代码
)
返回
模块:物品收集度
。
搜索
搜索
查看“︁模块:物品收集度”︁的源代码
添加话题