How to find out which item was launched in the rocket
Posted: Mon Apr 02, 2018 10:02 pm
How to find out which item was launched in the rocket in event on_rocket_launched?
www.factorio.com
https://forums.factorio.com/
You can check the rocket inventory:WIZ4 wrote:How to find out which item was launched in the rocket in event on_rocket_launched?
Code: Select all
function on_rocket_launch(event)
local rocket = event.rocket
local inventory = rocket.get_inventory(1)
local contents = inventory.get_contents()
game.print(serpent.block(contents))
end
Code: Select all
local inventory = rocket.get_inventory(1)