From 179ffe8135445a16c738214f53ccb12b0eed4527 Mon Sep 17 00:00:00 2001 From: NewbProgrammer101 Date: Sat, 9 Sep 2017 09:32:24 -0500 Subject: [PATCH] Update default_farmer.lua --- data/occupations/default_farmer.lua | 32 ++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/data/occupations/default_farmer.lua b/data/occupations/default_farmer.lua index 7d7ee52..61a3b63 100644 --- a/data/occupations/default_farmer.lua +++ b/data/occupations/default_farmer.lua @@ -53,6 +53,36 @@ local farmer_def = { } }, + [3] = + { + check = true, + range = 3, + random_execution_times = true, + min_count = 8, + max_count = 8, + nodes = {"farming:wheat_8"}, + actions = + { + ["farming:wheat_8"] = + { + [1] = + { + action = npc.actions.cmd.WALK_STEP, + }, + [2] = + { + action = npc.actions.cmd.DIG, + }, + [3] = + { + action = npc.actions.cmd.PLACE, + args = + { + node = "farming:wheat_1" + } + } + } + }, none_actions = { -- Walk a single step in a random direction @@ -70,4 +100,4 @@ local farmer_def = { } -- Register occupation -npc.occupations.register_occupation("test_farmer", farmer_def) \ No newline at end of file +npc.occupations.register_occupation("farmer", farmer_def)