模块:ItemInfo:修订间差异

添加1,314字节 、​ 2024年6月8日 (星期六)
新增材料物品
(更新ID范围)
(新增材料物品)
第25行: 第25行:
             -- 饰品
             -- 饰品
             return p.loadItemInfoByIndex(game, '饰品', id + 1)
             return p.loadItemInfoByIndex(game, '饰品', id + 1)
        elseif id >= 20 and id <= 20 + 28 then
            -- 防具
            return p.loadItemInfoByIndex(game, '防具', id - 20 + 1)
        elseif id >= 95 and id <= 95 + 23 then
            -- 材料(合成)
            return p.loadItemInfoByIndex(game, '合成材料', id - 95 + 1)
         elseif id >= 191 and id <= 191 + 34 then
         elseif id >= 191 and id <= 191 + 34 then
             -- 武器
             -- 武器
第72行: 第78行:


-- 生成材料物品基本信息的方法,使用模板“物品信息”
-- 生成材料物品基本信息的方法,使用模板“物品信息”
function p.at1MaterialItemInfo(index)
-- type:采集/合成
     local item = p.loadItemInfoByIndex('AT1', '材料物品', index)
function p.at1MaterialItemInfo(type, index)
    local catName = '材料物品'
    if type == '合成' then
        catName = '合成材料'
    end
     local item = p.loadItemInfoByIndex('AT1', catName, index)


     local filteredRecrystalisation = recryFilter(item.recry)
     local filteredRecrystalisation = recryFilter(item.recry)
第82行: 第93行:
         ["原文"] = item.ori,
         ["原文"] = item.ori,
         ["类别"] = '材料',
         ["类别"] = '材料',
         ["子类别"] = '采集',
         ["子类别"] = type,
         ["卖价"] = item.base.sell_price,
         ["卖价"] = item.base.sell_price,
         ["游戏"] = 'AT1',    
         ["游戏"] = 'AT1',
         -- 重结晶S=filteredRecrystalisation.s_prod,
         ["重结晶S"] = filteredRecrystalisation.s_prod,
         -- 重结晶A=filteredRecrystalisation.a_prod,
         ["重结晶A"] = filteredRecrystalisation.a_prod,
         -- 重结晶B=filteredRecrystalisation.b_prod,
         ["重结晶B"] = filteredRecrystalisation.b_prod,
         ["重结晶C"] = filteredRecrystalisation.c_prod,
         ["重结晶C"] = filteredRecrystalisation.c_prod,
         ["其他来源"] = item.alt_src,
         ["其他来源"] = item.alt_src,
第104行: 第115行:
             arguments['合成用途' .. i] = item.item_use_this[i]
             arguments['合成用途' .. i] = item.item_use_this[i]
         end
         end
     end  
    end
    if item.naming ~= nil then
        arguments["欧莉卡命名"] = item.naming.orica
        arguments["弥纱命名"] = item.naming.misya
        arguments["修蕾莉亚命名"] = item.naming.syureria
    end
    if item.material ~= nil then
        for i = 1, 4 do
            arguments['材料' .. i] = item.material[i]
        end
     end


     return mw.getCurrentFrame():expandTemplate {
     return mw.getCurrentFrame():expandTemplate {
第115行: 第136行:
     result = {}
     result = {}
     for i = 1, 34 do
     for i = 1, 34 do
         table.insert(result, p.at1MaterialItemInfo(i))
         table.insert(result, p.at1MaterialItemInfo('采集', i))
    end
    return table.concat(result, '\n')
end
 
function p.listMelcMaterialsInAt1()
    result = {}
    for i = 1, 34 do
        table.insert(result, p.at1MaterialItemInfo('合成', i))
     end
     end
     return table.concat(result, '\n')
     return table.concat(result, '\n')
第198行: 第227行:
     if item.base.synthesisable == '1' then
     if item.base.synthesisable == '1' then
         arguments["配方"] = ci.getRecipeCardNameById(item.base.rc_id)
         arguments["配方"] = ci.getRecipeCardNameById(item.base.rc_id)
    end
    if item.naming ~= nil then
        arguments["欧莉卡命名"] = item.naming.orica
        arguments["弥纱命名"] = item.naming.misya
        arguments["修蕾莉亚命名"] = item.naming.syureria
    end
    if item.material ~= nil then
        for i = 1, 4 do
            arguments['材料' .. i] = item.material[i]
        end
     end
     end


1,075

个编辑