Though i did manage to freeze factorio but running this command twice in quick succession? !
Code: Select all
/c global.sprites=global.sprites or {} for x,tbl in pairs(global.sprites)do for y,sp in pairs(tbl)do if(rendering.is_valid(sp))then rendering.destroy(sp) end end end local z=512 game.print("Sprites: " .. z/32 .. "x" .. z/32 .. " chunks (" .. z^2 .. " total tiles)") for x=-z,z do global.sprites[x]=global.sprites[x] or {} for y=-z,z do global.sprites[x][y]=rendering.draw_sprite{sprite="entity/small-lamp",surface=game.player.surface,target={x,y},time_to_live=600} end end
Code: Select all
/c local z=512
game.print("Sprites: " .. z/32 .. "x" .. z/32 .. " chunks (" .. z^2 .. " total tiles)")
for x=-z,z do for y=-z,z do
rendering.draw_sprite{sprite="entity/small-lamp",surface=game.player.surface,target={x,y},time_to_live=600}
end end