This should work for you
Code:
function giveitems( times, type )
for i=1, times do
for mat_id,_ in pairs(tweak_data.blackmarket[type]) do
if _.infamous then
managers.blackmarket:add_to_inventory("infamous", type, mat_id, false)
elseif _.dlc then
managers.blackmarket:add_to_inventory("preorder", type, mat_id, false)
else
managers.blackmarket:add_to_inventory("normal", type, mat_id, false)
end
end
managers.blackmarket:remove_item("normal", "materials", "plastic", false)
managers.blackmarket:remove_item("normal", "colors", "nothing", false)
end
end
giveitems(1, "materials")
giveitems(1, "textures")
giveitems(1, "colors")