本WIKI编辑权限开放,建议收藏起来防止迷路
部分页面还在施工中,欢迎可爱的小伙伴来一起建设,可以加群讨论~ 幻兽帕鲁WIKI交流群:674595109

全站通知:

模块:Test

来自Palworld幻兽帕鲁中文百科WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

此模块的文档可以在模块:Test/doc创建

local p = {}

local function getPageTitle()
  return mw.title.getCurrentTitle().text
end

p["道具"] = function(frame)
  local data = mw.text.jsonDecode(mw.title.new('MediaWiki:Item.json'):getContent() or '{}')
  local item = getPageTitle()
  local row = ""
  for i, item in pairs(data) do
    if item['Rarity'] == 0 then
      row = row .. "\n" .. frame:expandTemplate {
        title = '道具模块',
        args = {
          ['名称'] = item['名称'],
          ['图标'] = item['图标'],
          ['TypeA'] = item['TypeA'],
          ['TypeB'] = item['TypeB'],
          ['说明'] = item['说明'],
          ['Recipe_Material1_Id'] = item['Recipe_Material1_Id'],
          ['Recipe_Material1_Icon'] = item['Recipe_Material1_Icon'],
          ['Recipe_Material1_Name'] = item['Recipe_Material1_Name'],
          ['Recipe_Material1_Count'] = item['Recipe_Material1_Count']
        }
      }
    end
  end
  return row
end

return p