Console command to reproduce:
Code: Select all
/c
script.on_event(defines.events.script_raised_destroy, function()
game.print("script_raised_destroy called")
end)
entity = game.player.surface.create_entity{name="stone-furnace", force=game.player.force, position={0,0}}
entity.destroy({raise_destroy = false})
Code: Select all
entity.destroy({raise_destroy = true}) -- Raise event
entity.destroy({raise_destroy = nil}) -- No event