跳转到内容
主菜单
主菜单
移至侧栏
隐藏
首页|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 = {} function p.info(frame) local c = C.context(frame) local name = c.option('name', c.option(1, c.name)) local level = c.option('num', c.option(2, '')) if not tonumber(level) then return '' end local result = D.getCollection(name, level) if result.status == 'error' then return C.diagnostic(result) end for _, entry in ipairs(result.entries or {}) do if entry.status == 'none' then return '无' end if entry.status == 'known' then return C.literal(entry.text) end end return '' end function p.recipe(frame) local c = C.context(frame) local result = D.getRecipes(c.option('name', c.option(1, c.name))) if result.status == 'error' then return C.diagnostic(result) end if result.status ~= 'known' then return '' end local recipe = result.recipes[1] local kind = c.option('type', c.option(2, '配方')) if kind == '等级' then return recipe.level ~= nil and tostring(recipe.level) or '' end if kind == '信息' then return C.literal(recipe.info or '') end if kind ~= '配方' then return '' end local body = C.literal(recipe.name) .. (recipe.quantity == 1 and '' or ('x' .. recipe.quantity)) .. '=' for _, material in ipairs(recipe.materials) do body = body .. '<br>' .. C.link(material.name) .. 'x' .. material.quantity end return body end function p.upper(frame) local c = C.context(frame) local result = D.getUses(c.option('name', c.option(1, c.name))) if result.status == 'error' then return C.diagnostic(result) end if result.status ~= 'known' then return '' end local links = {} for _, name in ipairs(result.products) do links[#links + 1] = C.link(name) end return table.concat(links, '、') end return p
此页面嵌入的页面:
模块:物品查询/doc
(
查看源代码
)
返回
模块:物品查询
。
搜索
搜索
查看“︁模块:物品查询”︁的源代码
添加话题