Code: Select all
script.on_event(defines.events.on_player_crafted_item, function(event)
local player = game.get_player(event.player_index)
if player.crafting_queue_size == 1 then
player.begin_crafting{count=1, recipe=event.recipe}
end
end)