Files
2026-11-05 21:32:13 +08:00

22 lines
790 B
Python

import config
def Plant():
for x in range(get_world_size()):
for y in range(get_world_size()):
if get_entity_type() != None:
if can_harvest():
harvest()
if num_items(Items.Hay) > config.carrottimes * get_world_size() and num_items(Items.Wood) > config.carrottimes * get_world_size():
if get_ground_type() != Grounds.Soil:
till()
plant(Entities.Carrot)
if get_water() < config.waterpercent:
use_item(Items.Water)
else:
if num_items(Items.Hay) > config.carrottimes * get_world_size() and num_items(Items.Wood) > config.carrottimes * get_world_size():
if get_ground_type() != Grounds.Soil:
till()
plant(Entities.Carrot)
if get_water() < config.waterpercent:
use_item(Items.Water)
move(North)
move(East)