StarOS: farming
Four parts, 1 port each. They act on the cell under the robot and need a powered homestead of yours on an arable field. See the overview.
| function | does | power |
|---|---|---|
soil.look() |
dict soil (raw or tilled), crop, stage, stages, progress, moisture, weeds, ripe, wilted, arable, homestead |
free |
soil.till() |
raw regolith becomes tilled | 120 W |
planter.plant(crop) |
sow wheat, potato, maize or tomato with a seed from the hopper |
40 W |
weeder.weed() |
clear the weeds | 60 W |
harvester.harvest() |
reap a ripe crop into the hopper; clears a wilted one | 100 W |
An unknown crop name is a script error. planter and harvester need a hopper.
def tick():
plot = soil.look()
if plot["weeds"] > 0:
weeder.weed()
elif plot["ripe"] or plot["wilted"]:
harvester.harvest()