Code: Select all
if data.raw.resource["quartz"] then
it works just fine in the data.lua, but in control.lua it gives an nil error. i was kinda hoping they had access to the same tables xD (apparently not)
i want it in my control.lua because i want to add compatibility between other mods and my Dynamic System.
the entire code for the compatibility:
Code: Select all
game.onevent(defines.events.onplayermineditem, function(event)
if data.raw.resource["quartz"] then --[[Industrio Compatibility]]--
if ds.mineitemsindustrio[event.itemstack.name] then
for counter, ingredients in pairs(ds.mineitemsindustrio[event.itemstack.name]) do
glob.counter[counter]=glob.counter[counter]+(event.itemstack.count*ingredients)
end
end
end
end)
Code: Select all
require "dataloader"