Page 1 of 1

[0.17.50] LuaEntity.destroy{raise_destroy = false} raises event

Posted: Fri Jun 21, 2019 6:08 am
by DaveMcW
LuaEntity.destroy() raises an event if the raise_destroy parameter exists and is false. This should not happen.

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})
These commands work correctly:

Code: Select all

entity.destroy({raise_destroy = true}) -- Raise event
entity.destroy({raise_destroy = nil}) -- No event

Re: [0.17.50] LuaEntity.destroy{raise_destroy = false} raises event

Posted: Fri Jun 21, 2019 8:45 am
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.