[0.17.50] LuaEntity.destroy{raise_destroy = false} raises event
Posted: Fri Jun 21, 2019 6:08 am
LuaEntity.destroy() raises an event if the raise_destroy parameter exists and is false. This should not happen.
Console command to reproduce:
These commands work correctly:
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