fix 5dim's
This commit is contained in:
parent
a99c69167d
commit
19f91fa5de
3 changed files with 110 additions and 76 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Date: 2022-01-30
|
Date: 2022-02-04
|
||||||
Changes:
|
Changes:
|
||||||
- K2: Filter dirty water quantity
|
- K2: Filter dirty water quantity
|
||||||
|
Fixes:
|
||||||
|
- Fix for some possible 5dim's loadouts
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Date: 2022-01-20
|
Date: 2022-01-20
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,31 @@ function add_ingredient(recipe, ingredient, quantity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add a given ingredient prototype to a given recipe
|
||||||
|
function util.add_ingredient_raw(recipe_name, ingredient)
|
||||||
|
if me.bypass[recipe_name] then return end
|
||||||
|
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then
|
||||||
|
me.add_modified(recipe_name)
|
||||||
|
add_ingredient_raw(data.raw.recipe[recipe_name], ingredient)
|
||||||
|
add_ingredient_raw(data.raw.recipe[recipe_name].normal, ingredient)
|
||||||
|
add_ingredient_raw(data.raw.recipe[recipe_name].expensive, ingredient)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_ingredient_raw(recipe, ingredient)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if (
|
||||||
|
(existing[1] and (existing[1] == ingredient[1] or existing[1] == ingredient.name)) or
|
||||||
|
(existing.name and (existing.name == ingredient[1] or existing.name == ingredient.name))
|
||||||
|
) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(recipe.ingredients, ingredient)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Set an ingredient to a given quantity
|
-- Set an ingredient to a given quantity
|
||||||
function util.set_ingredient(recipe_name, ingredient, quantity)
|
function util.set_ingredient(recipe_name, ingredient, quantity)
|
||||||
if me.bypass[recipe_name] then return end
|
if me.bypass[recipe_name] then return end
|
||||||
|
|
@ -514,6 +539,15 @@ function util.set_icons(recipe_name, icons)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set recipe icons
|
||||||
|
function util.set_item_icons(item_name, icons)
|
||||||
|
if data.raw.recipe[item_name] then
|
||||||
|
data.raw.recipe[item_name].icons = icons
|
||||||
|
data.raw.recipe[item_name].icon = nil
|
||||||
|
data.raw.recipe[item_name].icon_size = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function util.set_to_founding(recipe)
|
function util.set_to_founding(recipe)
|
||||||
util.set_category(recipe, "founding")
|
util.set_category(recipe, "founding")
|
||||||
util.set_subgroup(recipe, "foundry-intermediate")
|
util.set_subgroup(recipe, "foundry-intermediate")
|
||||||
|
|
|
||||||
|
|
@ -6,85 +6,84 @@ if mods["5dim_core"] then
|
||||||
data.raw.recipe["lead-plate"].subgroup = "plates-plates"
|
data.raw.recipe["lead-plate"].subgroup = "plates-plates"
|
||||||
data.raw.item["lead-ore"].subgroup = "plates-ore"
|
data.raw.item["lead-ore"].subgroup = "plates-ore"
|
||||||
|
|
||||||
-- Industrial furnace
|
if mods["5dim_resources"] then
|
||||||
data:extend({
|
-- Industrial furnace
|
||||||
{
|
data:extend({
|
||||||
type = "recipe",
|
{
|
||||||
name = "lead-plate-industrial-ore",
|
type = "recipe",
|
||||||
category = "industrial-furnace",
|
name = "lead-plate-industrial-ore",
|
||||||
subgroup = "plates-industrial-ore",
|
category = "industrial-furnace",
|
||||||
order = "ad[lead-plate]",
|
subgroup = "plates-industrial-ore",
|
||||||
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
order = "ad[lead-plate]",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
||||||
enabled = true,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
energy_required = 65,
|
enabled = true,
|
||||||
ingredients = {{"lead-ore", 85}},
|
energy_required = 65,
|
||||||
result = util.me.lead_plate,
|
ingredients = {{"lead-ore", 85}},
|
||||||
result_count = 100,
|
result = util.me.lead_plate,
|
||||||
}
|
result_count = 100,
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Lead dust
|
-- Lead dust
|
||||||
data:extend(
|
data:extend(
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "lead-dust",
|
name = "lead-dust",
|
||||||
subgroup = "plates-dust",
|
subgroup = "plates-dust",
|
||||||
order = "d[lead-plate]",
|
order = "d[lead-plate]",
|
||||||
icon = "__bzlead__/graphics/icons/lead-powder.png",
|
icon = "__bzlead__/graphics/icons/lead-powder.png",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
stack_size = 200
|
stack_size = 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "lead-plate-dust",
|
||||||
|
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
||||||
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
|
subgroup = "plates-plates2",
|
||||||
|
order = "d[lead-plate]",
|
||||||
|
category = "smelting",
|
||||||
|
energy_required = 3.2,
|
||||||
|
enabled = true,
|
||||||
|
ingredients = {
|
||||||
|
{"lead-dust", 1}
|
||||||
|
},
|
||||||
|
result = util.me.lead_plate
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "lead-dust",
|
||||||
|
icon = "__bzlead__/graphics/icons/lead-powder.png",
|
||||||
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
|
category = "mashering",
|
||||||
|
subgroup = "",
|
||||||
|
order = "d[lead-plate]",
|
||||||
|
energy_required = 3.2,
|
||||||
|
enabled = true,
|
||||||
|
ingredients = {
|
||||||
|
{"lead-ore", 1}
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name = "lead-dust", amount=2},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "lead-plate-dust",
|
name = "lead-plate-industrial-dust",
|
||||||
|
category = "industrial-furnace",
|
||||||
|
subgroup = "plates-industrial-dust",
|
||||||
|
order = "ad[lead-plate]",
|
||||||
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
subgroup = "plates-plates2",
|
|
||||||
order = "d[lead-plate]",
|
|
||||||
category = "smelting",
|
|
||||||
energy_required = 3.2,
|
|
||||||
enabled = true,
|
enabled = true,
|
||||||
ingredients = {
|
energy_required = 65,
|
||||||
{"lead-dust", 1}
|
ingredients = {{"lead-dust", 85}},
|
||||||
},
|
result = util.me.lead_plate,
|
||||||
result = util.me.lead_plate
|
result_count = 100,
|
||||||
},
|
}
|
||||||
{
|
})
|
||||||
type = "recipe",
|
|
||||||
name = "lead-dust",
|
|
||||||
icon = "__bzlead__/graphics/icons/lead-powder.png",
|
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
|
||||||
category = "mashering",
|
|
||||||
subgroup = "",
|
|
||||||
order = "d[lead-plate]",
|
|
||||||
energy_required = 3.2,
|
|
||||||
enabled = true,
|
|
||||||
ingredients = {
|
|
||||||
{"lead-ore", 1}
|
|
||||||
},
|
|
||||||
results = {
|
|
||||||
{type="item", name = "lead-dust", amount=2},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "recipe",
|
|
||||||
name = "lead-plate-industrial-dust",
|
|
||||||
category = "industrial-furnace",
|
|
||||||
subgroup = "plates-industrial-dust",
|
|
||||||
order = "ad[lead-plate]",
|
|
||||||
icon = "__bzlead__/graphics/icons/lead-plate.png",
|
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
|
||||||
enabled = true,
|
|
||||||
energy_required = 65,
|
|
||||||
ingredients = {{"lead-dust", 85}},
|
|
||||||
result = util.me.lead_plate,
|
|
||||||
result_count = 100,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if mods["5dim_resources"] then
|
|
||||||
local mks = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"}
|
local mks = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"}
|
||||||
local items = {"5d-masher-"}
|
local items = {"5d-masher-"}
|
||||||
for i, mk in pairs(mks) do
|
for i, mk in pairs(mks) do
|
||||||
|
|
@ -92,7 +91,6 @@ if mods["5dim_core"] then
|
||||||
util.add_ingredient(item..mk, "lead-plate", 2)
|
util.add_ingredient(item..mk, "lead-plate", 2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if mods["5dim_energy"] then
|
if mods["5dim_energy"] then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue