跳转到内容
主菜单
主菜单
移至侧栏
隐藏
首页|Wiki首页
Wymbot新手引导|新手入门
WymboTrip|旅行模块
指令一览|指令目录
旅行地点|旅行地点
物品来源速查|物品资料
Wums|wum图鉴
合成配方|合成配方
科研|科研
共创指南|参与编写
https://wum.hetonger.cn/|共创站首页
https://wum.hetonger.cn/game/|网页端
https://wum.hetonger.cn/command/|指令检索
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模块:地点数据”︁的源代码
模块
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模块:地点数据
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local p = {} local cached local page = '模板:地点信息/json' function p.get(name) if not cached then local ok, value = pcall(mw.loadJsonData, page) if not ok or type(value) ~= 'table' or value.schemaVersion ~= 1 or type(value.records) ~= 'table' then cached = { status = 'error', code = 'invalid-place-data', page = page } else cached = { status = 'known', records = value.records } end end if cached.status == 'error' then return cached end local record = cached.records[name] if record == nil then return { status = 'none' } end if type(record) ~= 'table' or type(record.descriptions) ~= 'table' then return { status = 'error', code = 'invalid-place-record', page = page } end if record.unlock ~= nil and type(record.unlock) ~= 'table' then return { status = 'error', code = 'invalid-place-unlock', page = page } end if record.unlock and record.unlock.text ~= nil and type(record.unlock.text) ~= 'string' then return { status = 'error', code = 'invalid-place-unlock-text', page = page } end for _, key in ipairs({ 'cost', 'hours', 'distance', 'experience' }) do local value = record[key] local empty = key ~= 'cost' and (value == nil or (type(value) == 'string' and mw.text.trim(value) == '')) if not empty and (type(value) ~= 'number' or value < 0 or value >= math.huge) then return { status = 'error', code = 'invalid-place-' .. key, page = page } end end for level, text in pairs(record.descriptions) do local n = tonumber(level) if not n or n <= 0 or n % 1 ~= 0 or type(text) ~= 'string' then return { status = 'error', code = 'invalid-place-description', page = page } end end return { status = 'known', record = record } end return p
此页面嵌入的页面:
模块:地点数据/doc
(
查看源代码
)
返回
模块:地点数据
。
搜索
搜索
查看“︁模块:地点数据”︁的源代码
添加话题