https://lua-api.factorio.com/latest/eve ... built_tile
https://lua-api.factorio.com/latest/Lua ... ecoratives
this is my control.lua;
Code: Select all
script.on_event(defines.events.on_player_built_tile, function(event)
local surface = game.surfaces[event.surface_index]
local tiles = event.tiles
for _,tile in pairs(tiles) do
local tile_position = surface.get_tile(tile.position.x, tile.position.y)
surface.destroy_decoratives{area={{-0.5, -0.5}, {0.5, 0.5}}, position=tile_position}
end
end)
The mod Decorative Removal caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Decorative-Removal::on_player_built_tile (ID 45)
LuaTile doesn't contain key x.
stack traceback:
[C]: in function 'destroy_decoratives'
__Decorative-Removal__/control.lua:7: in function <__Decorative-Removal__/control.lua:1>
stack traceback:
[C]: in ?
[C]: in function 'destroy_decoratives'
__Decorative-Removal__/control.lua:7: in function <__Decorative-Removal__/control.lua:1>