StarOS: industry
Read only. See the overview.
industry.buildings() returns your producing buildings and stores, by id:
| key | meaning |
|---|---|
id, kind |
structure number and kind |
field, x, y |
where it stands (its anchor cell) |
recipe |
recipe id, empty for a store or when none is set |
state |
working, idle, unpowered, parked, or empty before its first turn |
input, output |
dicts of units by item; a store's stock is input |
wear |
durability out of 1000, or None |
The list has every field you own something on: filter on robot.field.
def tick():
for b in industry.buildings():
if b["state"] == "unpowered":
robot.log(b["kind"] + " " + str(b["id"]) + " has no power")