From 64e09af2b4982b56c6a577eeacba80d055a0af4e Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Fri, 4 Jan 2019 16:05:29 -0500 Subject: [PATCH] Placing crops now adds the crops to the_world->growing_plants --- src/main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 9e60b67..9cd1d71 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -817,6 +817,25 @@ int main(int argc, char** argv) the_accessor->set_id_safe(px, py, pz, place_id); block_timer = 10; + + // Plants must grow! + + if (place_id == id_wheat_0) + { + the_world->growing_plants.push_back(growing_plant(px, py, pz, growing_wheat, 30)); + } + else if (place_id == id_carrots_0) + { + the_world->growing_plants.push_back(growing_plant(px, py, pz, growing_carrots, 60)); + } + else if (place_id == id_potatoes_0) + { + the_world->growing_plants.push_back(growing_plant(px, py, pz, growing_potatoes, 60)); + } + else if (place_id == id_beetroots_0) + { + the_world->growing_plants.push_back(growing_plant(px, py, pz, growing_beetroots, 60)); + } } } else