Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local geolyzer = component.geolyzer
- local offsetx = 0
- local offsetz = 0
- local offsety = 0
- local sizex = 4
- local sizez = 4
- local sizey = 4
- local map = {}
- local scanData = geolyzer.scan(offsetx, offsetz, offsety, sizex, sizez, sizey)
- local i = 1
- for y = 0, sizey - 1 do
- for z = 0, sizez - 1 do
- for x = 0, sizex - 1 do
- -- alternatively when thinking in terms of 3-dimensional table: map[offsety + y][offsetz + z][offsetx + x] = scanData[i]
- map[i] = {posx = offsetx + x, posy = offsety + y, posz = offsetz + z, hardness = scanData[i]}
- i = i + 1
- end
- end
- end
- for i = 1, sizex*sizez*sizey do
- print(map[i].posx, map[i].posy, map[i].posz, map[i].hardness)
- end
Add Comment
Please, Sign In to add comment