StarOS: assay
Part assay_probe, 1 port. What it reads becomes your knowledge of those cells. See the overview.
| function | returns | power |
|---|---|---|
assay.sample() |
the cell under the robot, or None with no ore |
30 W |
assay.scan(radius) |
ores within 1 to 8 cells | 100 W |
sample() gives resource, grade (permille), tonnes (at first use), left and layers, a list of depth, tier, grade, tonnes, left. scan() gives a list of x, y, resource, grade rounded to 10 permille.
def tick():
found = assay.sample()
if found != None:
robot.log(found["resource"] + " left " + str(found["left"]))