Insert blueprints into blueprint-book
Posted: Thu Jan 05, 2017 4:18 am
I am setting up a custom quick start scenario and would like to start players off with a full (blank) blueprint book.
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:
Any help would be appreciated.
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