StarOS: sun
One turn is one game hour. Light is in permille: 0 at night, 1000 at noon on bare regolith under a full-strength sun. See the overview.
| member | meaning |
|---|---|
sun.light() |
sunlight on your cell now, permille |
sun.hour() |
hour of the day, 0 to sun.day_turns - 1 |
sun.day_turns |
length of a day in turns (an attribute, no parentheses) |
sun.is_day() |
True while the sun is up |
On a tidally locked body the light depends on where you stand, not on the hour.
def tick():
if sun.light() > 200:
robot.move("east")