From 5283b931f89013680b9e6b8d011a0b37433f5872 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Tue, 23 Dec 2025 15:11:19 +0000 Subject: [PATCH] feat(*): Add carrots --- carrots.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 carrots.py diff --git a/carrots.py b/carrots.py new file mode 100644 index 0000000..35d87de --- /dev/null +++ b/carrots.py @@ -0,0 +1,21 @@ +import helpers + +# Before you can plant carrots with plant(Entities.Carrot), you have to till the soil. This will change the ground to Grounds.Soil. To till the soil, simply call till(). Calling till() again will change it back to Grounds.Grassland. + +# Planting carrots costs wood and hay. These items will be automatically removed when calling plant(Entities.Carrot). + +def till_and_plant(): + if get_ground_type() != Grounds.Soil: + till() + if get_entity_type() == Entities.Carrot: + helpers.harvest_if_possible() + plant(Entities.Carrot) + else: + plant(Entities.Carrot) + +def harvest_carrots(): + for x in range(get_world_size()): + for y in range(get_world_size()): + till_and_plant() + move(North) + move(East) \ No newline at end of file