跳转到内容
主菜单
主菜单
移至侧栏
隐藏
首页|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 categories = { travel = '能通过旅行获取的物品', planting = '能通过种菜获取的物品', shop = '能通过超市获取的物品', other = '有其他获取方式的物品' } function p.main(frame) local c = C.context(frame) if not c.enabled then return '' end local result, rows, cats = D.getSources(c.name), {}, {} local groups = { travel = {}, planting = {}, shop = {}, other = {} } local other = c.text('其他方式') for _, entry in ipairs(result.entries or {}) do if groups[entry.kind] and not (entry.kind == 'other' and other) then local text = entry.target and C.link(entry.target, entry.label) or C.literal(entry.label) -- Item acquisition lists never display probabilities, including unknown ones. if entry.kind == 'shop' and entry.label == 'SB洪超市' then text = C.literal(entry.availability or '能') end if entry.note then text = text .. '(' .. C.literal(entry.note) .. ')' end groups[entry.kind][#groups[entry.kind] + 1] = text if categories[entry.kind] then cats[#cats + 1] = categories[entry.kind] end end end if other then groups.other = { other }; cats[#cats + 1] = categories.other end local travel = #groups.travel > 0 and table.concat(groups.travel, '、') or '他妈,旅行不掉这个!' local planting = #groups.planting > 0 and table.concat(groups.planting, '、') or (#groups.travel > 0 and '他妈,种菜不掉这个!' or '他妈,种菜也不掉这个!') rows = { '|-\n| 旅行 || ' .. travel, '|-\n| 种菜 || ' .. planting, '|-\n| [[SB洪超市]] || ' .. (#groups.shop > 0 and table.concat(groups.shop, '、') or '他妈,超市还卖这个?'), '|-\n| 其他 ||\n' .. (#groups.other > 0 and table.concat(groups.other, '、') or '你觉得还有其他方式?') } local body = C.heading(c, '在哪掉的?') if result.status == 'error' then body = body .. C.diagnostic(result) .. '\n'; cats[#cats + 1] = '物品数据异常的页面' end body = body .. '{| class="wikitable wum-item-table"\n! 获取途径 !! 能否通过该途径获得\n' .. table.concat(rows, '\n') .. '\n|}' return C.finish(c, 'sources', body, cats) end return p
此页面嵌入的页面:
模块:物品来源/doc
(
查看源代码
)
返回
模块:物品来源
。
搜索
搜索
查看“︁模块:物品来源”︁的源代码
添加话题