Can anyone tell me - is it possible to add a second resource when mining one?
Here is an example of code from the file __base__/prototypes/entity/resources.lua
Code: Select all
type = "resource",
name = "uranium-ore",
minable =
{
mining_particle = "stone-particle",
mining_time = 2,
result = "uranium-ore",
fluid_amount = 10,
required_fluid = "sulfuric-acid"
},
Code: Select all
type = "resource",
name = "uranium-ore",
minable =
{
mining_particle = "stone-particle",
mining_time = 2,
result = {"uranium-ore", "stone"},
fluid_amount = 10,
required_fluid = "sulfuric-acid"
},
Code: Select all
table.insert(data.raw.resource["iron-ore"].minable.result, {type = "resource", name = "stone", amount = 1})
Code: Select all
Failed to load mods: __My_add_pack_updated__/data-updates.lua:52: bad argument #1 of 3 to 'insert' (table expected, got string)
stack traceback:
[C]: in function 'insert'
__My_add_pack_updated__/data-updates.lua:52: in main chunk