I cant seem to put together the right combination of words and functions to complete the task during the on_player_created event.
This is what I have:
Code: Select all
player.insert{name="blueprint-book", count=1}
local inventories = {player.get_inventory(defines.inventory.player_quickbar), player.get_inventory(defines.inventory.player_main)}
for _, inv in pairs(inventories) do
for i=1,#inv do
local itemStack = inv[i]
if itemStack.valid_for_read and itemStack.type == "blueprint-book" then
--now what? I want to insert blueprint count 30 into blueprint-book
end
end
end