Debugging in to it, this code is where it is crashing (on the find
call):
for name, fragment in pairs (data.raw.item) do
if string.find (fragment, "core-fragment", 1, true) then
table.insert (external, {data_util.mod_prefix .. "core-fragment-" .. name, false, 3, false, remove_extra_layers = "core-fragment"})
--else
--log ("didn't find "..data_util.mod_prefix .. "core-fragment-" .. name)
end
end
At the time of the crash name
is: item-unknown
And the fragment
is:
{
flags = {
"hidden"
},
icon = "__core__/graphics/icons/unknown.png",
icon_size = 64,
name = "item-unknown",
stack_size = 1,
type = "item"
}
I'm not actually sure how that was supposed to work, fragment
is a table, which is invalid as a first argument in string.find
, perhaps the first argument should have been name
?