StarOS: builder
Part builder, 2 ports. No spacecraft in range is needed. See the overview.
| function | does | power |
|---|---|---|
builder.build(kind, x, y, direction="") |
place a structure; its footprint must touch the robot | 300 W |
builder.pickup(id) |
take back one of your structures that touches the robot and holds no goods | 300 W |
builder.ghosts() |
your ghosts on this field, nearest first: id, kind, x, y, direction, blueprint, distance |
free |
builder.build_ghost(id) |
build that ghost, same rules as build |
300 W |
builder.repair(target) |
one repair step | 100 W |
builder.damaged() |
your damaged robots on this field and damaged buildings | free |
builder.can_repair() |
True | free |
- "Touch" means the cells north, east, south and west. A robot cannot build on its own cell.
- The item comes from the hopper, else from a touching depot or warehouse of yours.
build_ghostwith an id that is not your ghost on this field is a script error.repairtakes a robot name,"self"or a building number (int). It gives back up to 20 health and uses 1spare_partsfrom the hopper. The newest build also takes"train:<number>"and"container:<number>".damaged()entries havekind(robotwithname, orstructurewithidandstructure),x,y,damage,health,max_health.
def tick():
if robot.health < robot.max_health:
builder.repair("self")