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