[0.12.29][Twinsen] Game crashed due to calling set_tiles
Posted: Fri Mar 25, 2016 7:47 am
I managed to crash the game working on a mod. Here is the relevant code:
All entities in the area were destroyed before running this code.
I've attached the mod, map save and log. Just load the save with the mod and place the smart chest.
Code: Select all
local pos = position -- this is just the player position
local full_size = {width=10, height=10}
local full_area = {left_top = {x = pos.x - full_size.width / 2, y = pos.y - full_size.height}, right_bottom = {x = pos.x + full_size.width / 2, y = pos.y}}
local new_tiles = {}
for x, y in iarea(area) do
table.insert(new_tiles, {name = "water", position = {x, y}})
end
surface.set_tiles(new_tiles)
I've attached the mod, map save and log. Just load the save with the mod and place the smart chest.