Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hol = require("component").hologram
- local geo = require("component").geolyzer
- local ore_count = 0
- local uran_count = 0
- function scanMap()
- for x=-23,24 do
- for z=-23,24 do
- printCollumn(x,z,geo.scan(x,z))
- end
- end
- end
- function printCollumn(x,z,coll)
- -- local height = 1
- hol.set(23,32,23, 02)
- for y = 2,32 do
- if coll[y] > 70 and coll[y] <120 then
- uran_count=uran_count+1
- hol.set(x+23,y-1,z+23, 03)
- end
- if coll[y] > 30 and coll[y] < 70 then
- hol.set(x+23,y-1,z+23, 02)
- end
- -- print(x,z,coll[y])
- if (coll[y] > 2.0 and coll[y] < 35) then
- ore_count=ore_count+1
- hol.set(x+23,y-1, z+23, 01)
- else
- --hol.set(x+23,y-24, z+23, 03)
- end
- end
- end
- hol.clear()
- hol.setTranslation(0,0.3,0)
- hol.setScale(1.2)
- scanMap()
- require("term").clear()
- --print("Предположительно(помехи) урановой руды найдено: "..uran_count)
- print("Руды найдено: "..ore_count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement