If you hover over a chest, and run this command. The original chest will get destroyed (left on the ground).
Code: Select all
/c
local entity = game.player.selected
entity.surface.create_entity{
name = "entity-ghost", inner_name = "steel-chest",
position = entity.position,
force = entity.force,
fast_replace = true
}
At a minimum, I request that entities already marked for deconstruction are ignored in this.. It's causing a pretty bad bug in our mod Wide Containers and a workaround seems incredibly jank and annoying to develop.