Integration of mods. Item does not exist.
Posted: Fri Mar 31, 2017 5:39 am
I try to use items of other(Yuoki) mod in recipes of my mod.
"Error in assignID 'y-coal-dust' does not exist"
My info.json
Integration with Yuoki mod is optional.
My mod see some Yuoki items(y-toxic-dust) and do not see other Yuoki items(y-coal-dust).
I guess that the "y-coal-dust" does not have time to load.
How can my mod wait for other mod?
Yuoki data.lua
My data.lua
My Yuoki.lua
"Error in assignID 'y-coal-dust' does not exist"
My info.json
Code: Select all
...
"dependencies": ["base >= 0.14.0", "? Nucular >= 1.0.4", "? Yuoki >= 0.4.63", "? yi_engines >= 0.4.19"],
...
My mod see some Yuoki items(y-toxic-dust) and do not see other Yuoki items(y-coal-dust).
I guess that the "y-coal-dust" does not have time to load.
How can my mod wait for other mod?
Yuoki data.lua
Code: Select all
...
require("prototypes.item.y_items") -- y-toxic-dust declaration
...
require("prototypes.z_items") -- y-coal-dust declaration
...
My data.lua
Code: Select all
...
require("Yuoki.Yuoki")
Code: Select all
...
if data.raw.fluid["y-con_water"] then
local tmp_recipe = data.raw.recipe["clearing-contaminated-water"]
tmp_recipe.results = {
{type="fluid", name="water", amount=24},
{type="item", name="dirt", amount=5},
[b]{type="item", name="y-toxic-dust", amount=1}, -- this line work correct[/b]
}
...
tmp_recipe = data.raw.recipe["coal-dust|solid-fuel"] --coal-processing-recipes.lua
tmp_recipe.ingredients = {
[b]{type="item",name="y-coal-dust ", amount=4}, -- this line generate error[/b]
}
...
end