Yes it is. But only after switching "researched" for this technology off and back on
Here is the code. Full mod is in the attachment
Code: Select all
data:extend{
{
type = "recipe",
name = "steel-box",
energy_required = 0.5,
ingredients =
{
{"steel-plate", 1},
{"plastic-bar",1}
},
result = "steel-box",
enabled = "false"
},
{
type = "recipe",
name = "boxed-electronic-circuits",
icon = "__boxing__/graphics/icons/boxed-electronic-circuits.png",
subgroup = "boxing",
order = "v[box]-a[empty]",
energy_required = 90,
category = "advanced-crafting",
ingredients =
{
{"box-of-iron-plate", 2},
{"box-of-copper-cable",3}
},
results = {
{"box-of-electronic-circuit",1},
{"steel-box",4}
},
enabled = "false"
},
{
type = "recipe",
name = "boxed-advanced-circuits",
icon = "__boxing__/graphics/icons/boxed-advanced-circuits.png",
subgroup = "boxing",
order = "w[box]-a[empty]",
category = "advanced-crafting",
energy_required = 700,
ingredients =
{
{"box-of-electronic-circuit", 1},
{"box-of-plastic-bar",2},
{"box-of-copper-cable",2},
},
results = {
{"box-of-advanced-circuit",1},
{"steel-box",4}
},
enabled = "false"
},
{
type = "item",
name = "steel-box",
flags = {"goes-to-main-inventory"},
icon = "__boxing__/graphics/icons/steel-box.png",
subgroup = "boxing",
order = "a[box]-a[empty]",
stack_size = 10
},
{
type = "item-subgroup",
name = "boxing",
group = "intermediate-products",
order = "db"
},
}
local itemsToBeBoxed={
{
name='coal',
count=50,
boxorder='b',
unboxorder='c'
},
{
name='iron-ore',
count=50,
boxorder='d',
unboxorder='e'
},
{
name='copper-ore',
count=50,
boxorder='f',
unboxorder='g'
},
{
name='iron-plate',
count=100,
boxorder='h',
unboxorder='i'
},
{
name='copper-plate',
count=100,
boxorder='j',
unboxorder='k'
},
{
name='copper-cable',
count=200,
boxorder='l',
unboxorder='m'
},
{
name='electronic-circuit',
count=200,
boxorder='n',
unboxorder='o'
},
{
name='plastic-bar',
count=100,
boxorder='p',
unboxorder='q',
adv=true
},
{
name='steel-plate',
count=100,
boxorder='r',
unboxorder='s',
adv=true
},
{
name='advanced-circuit',
count=100,
boxorder='t',
unboxorder='u',
adv=true
},
{
name='stone',
count=50,
boxorder='v',
unboxorder='w'
},
{
name='iron-gear-wheel',
count=100,
boxorder='x',
unboxorder='y'
}
}
local boxingEffects={
{
type = "unlock-recipe",
recipe = "steel-box"
},
}
local advBoxingEffects={
{
type = "unlock-recipe",
recipe = "boxed-electronic-circuits"
},
{
type = "unlock-recipe",
recipe = "boxed-advanced-circuits"
},
}
for i=1,#itemsToBeBoxed do
local item=itemsToBeBoxed[i]
local name=item.name
local count=item.count
local boxorder=item.boxorder
local unboxorder=item.unboxorder
data:extend{
{
type = "recipe",
name = "box-"..name,
energy_required = 1,
category = "advanced-crafting",
subgroup = "boxing",
order = boxorder.."[box-"..name.."]",
ingredients =
{
{name, count},
{"steel-box", 1},
},
icon = "__boxing__/graphics/icons/box-"..name..".png",
result = "box-of-"..name,
enabled = "false"
},
{
type = "recipe",
name = "unbox-"..name,
category = "advanced-crafting",
energy_required = 1,
subgroup = "boxing",
order = unboxorder.."[ubox-"..name.."]",
enabled = "false",
icon = "__boxing__/graphics/icons/unbox-"..name..".png",
ingredients =
{
{type="item", name="box-of-"..name, amount=1}
},
results=
{
{type="item", name=name, amount=count},
{type="item", name="steel-box", amount=1}
}
},
{
type = "item",
flags = {"goes-to-main-inventory"},
name = "box-of-"..name,
icon = "__boxing__/graphics/icons/box-of-"..name..".png",
subgroup = "boxing",
order = "b[box]-"..boxorder.."["..name.."]",
stack_size = 10
},
}
if not item.adv then
table.insert(boxingEffects,
{
type = "unlock-recipe",
recipe = "box-"..name
})
table.insert(boxingEffects,
{
type = "unlock-recipe",
recipe = "unbox-"..name
})
else
table.insert(advBoxingEffects,
{
type = "unlock-recipe",
recipe = "box-"..name
})
table.insert(boxingEffects,
{
type = "unlock-recipe",
recipe = "unbox-"..name
})
end
end
data:extend{
{
type = "technology",
name = "boxing",
icon = "__boxing__/graphics/icons/boxing-tech.png",
prerequisites = {"logistics-3"},
unit =
{
count = 150,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1},
{"science-pack-3", 1}
},
time = 30
},
effects = boxingEffects,
order = "d-e",
},
{
type = "technology",
name = "boxing2",
icon = "__boxing__/graphics/icons/boxing-tech2.png",
prerequisites = {"boxing"},
unit =
{
count = 200,
ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1},
{"science-pack-3", 1}
},
time = 30
},
effects = advBoxingEffects,
order = "d-f",
},
}