30 lines
716 B
Python
30 lines
716 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 get_ground_type() != Grounds.Grassland:
|
||
|
|
till()
|
||
|
|
if x % 2 == 0:
|
||
|
|
if y % 2 == 0:
|
||
|
|
plant(Entities.Tree)
|
||
|
|
else:
|
||
|
|
if y % 2 != 0:
|
||
|
|
plant(Entities.Tree)
|
||
|
|
if get_water() < config.waterpercent:
|
||
|
|
use_item(Items.Water)
|
||
|
|
else:
|
||
|
|
if get_ground_type() != Grounds.Grassland:
|
||
|
|
till()
|
||
|
|
if x % 2 == 0:
|
||
|
|
if y % 2 == 0:
|
||
|
|
plant(Entities.Tree)
|
||
|
|
else:
|
||
|
|
if y % 2 != 0:
|
||
|
|
plant(Entities.Tree)
|
||
|
|
if get_water() < config.waterpercent:
|
||
|
|
use_item(Items.Water)
|
||
|
|
move(North)
|
||
|
|
move(East)
|