打开/关闭搜索
搜索
打开/关闭菜单
1K
5.2K
4
8.2K
星砂岛百科
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
上传文件
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
本站正在进行早期测试,目前仍存在许多内容的缺失。
查看“︁模块:Livestock”︁的源代码
来自星砂岛百科
查看
阅读
查看源代码
查看历史
associated-pages
模块
讨论
更多操作
←
模块:Livestock
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:已验证邮箱用户
您没有权限编辑
模块
命名空间内的页面。
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
local item_common = require('Module:ItemCommon') local common = require('Module:Common') local p = {} item_common.buildRecipeDomain(p, '数据:Livestock/livestock_index.json', '数据:Livestock/livestock_mapping.json') function p.renderGrowStages(frame) local key = common.getArg(frame, 1, '') local record = p.findRecord(key) if not record or type(record) ~= 'table' then return '' end local stages = record.grow_stages if not stages or type(stages) ~= 'table' or #stages == 0 then return '' end local out = {} for _, stage in ipairs(stages) do local label = stage.display_name or stage.name or '' local icon = stage.icon or '' if label ~= '' and icon ~= '' and common.filePageExists(icon) then out[#out + 1] = '<section>' out[#out + 1] = '<label>' .. label .. '</label>' out[#out + 1] = '<image source="image_' .. stage.name .. '">' out[#out + 1] = '<default>' .. icon .. '</default>' out[#out + 1] = '</image>' out[#out + 1] = '</section>' end end return table.concat(out, '\n') end return p
该页面嵌入的页面:
模板:Tl
(
查看源代码
)
模块:ArgsUtil
(
查看源代码
)
模块:Livestock/doc
(
查看源代码
)
模块:Template link
(
查看源代码
)
返回
模块:Livestock
。
查看“︁模块:Livestock”︁的源代码
来自星砂岛百科