Code: Select all
script.on_event(defines.events.on_player_mined_item, function(event)
if event.item_stack.name == "my-item" then
game.players[1].print("Trying to change picked item_stack")
event.item_stack.set_stack() -- or .clear() or anything else - doesn't matter
end
end)
Or, if I change the result of mining to "blueprint", is it posible to set up that blueprint item?
Here we can see, that the result of mining is LuaItemStack, but almost all fields are nil. Why?