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

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

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

Post 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

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”