Update default_farmer.lua
This commit is contained in:
parent
739824015c
commit
72213f95f5
|
@ -10,8 +10,7 @@
|
||||||
local dugNodeData = npc.getFacingNodeInfo(self, 3)
|
local dugNodeData = npc.getFacingNodeInfo(self, 3)
|
||||||
local dugPosition = dugNodeData[1]
|
local dugPosition = dugNodeData[1]
|
||||||
local dugNodeName = dugNodeData[2]
|
local dugNodeName = dugNodeData[2]
|
||||||
local dugNodeNickname = dugNodeData[3]
|
local dugNodeNickname = dugNodeData[3]
|
||||||
|
|
||||||
local farmer_def = {
|
local farmer_def = {
|
||||||
dialogues = {},
|
dialogues = {},
|
||||||
textures = {},
|
textures = {},
|
||||||
|
@ -31,33 +30,36 @@ local farmer_def = {
|
||||||
check = true,
|
check = true,
|
||||||
range = 2,
|
range = 2,
|
||||||
random_execution_times = true,
|
random_execution_times = true,
|
||||||
min_count = 10,
|
min_count = 5,
|
||||||
max_count = 12,
|
max_count = 10,
|
||||||
nodes = {"farming:cotton_3"},
|
nodes = {"farming:cotton_8"},
|
||||||
actions =
|
actions =
|
||||||
{
|
{
|
||||||
-- Actions for grown cotton - harvest and replant
|
-- Actions for grown cotton - harvest and replant
|
||||||
["farming:cotton_3"] =
|
["farming:cotton_8"] =
|
||||||
{
|
{
|
||||||
[1] =
|
[1] =
|
||||||
{
|
{
|
||||||
action = npc.actions.cmd.WALK_TO_POS,
|
action = npc.actions.cmd.WALK_TO_POS,
|
||||||
args = {
|
args = {
|
||||||
node = "farming:cotton_3",
|
node = "farming:cotton_8",
|
||||||
walkable = true
|
walkable = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[2] =
|
[2] =
|
||||||
{
|
{
|
||||||
action = npc.actions.cmd.DIG,
|
action = npc.actions.cmd.DIG,
|
||||||
|
args = {
|
||||||
|
node = "farming:cotton_8",
|
||||||
|
walkable = {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[3] =
|
[3] =
|
||||||
{
|
{
|
||||||
action = npc.actions.cmd.PLACE,
|
if dugNodeNickname == "farming:cotton_8" then
|
||||||
args =
|
action = npc.actions.cmd.PLACE
|
||||||
{
|
args = {node = "farming:seed_cotton 1"}
|
||||||
node = "farming:cotton_1"
|
end
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +69,8 @@ local farmer_def = {
|
||||||
check = true,
|
check = true,
|
||||||
range = 3,
|
range = 3,
|
||||||
random_execution_times = true,
|
random_execution_times = true,
|
||||||
min_count = 16,
|
min_count = 1,
|
||||||
max_count = 96,
|
max_count = 16,
|
||||||
nodes = {"farming:wheat_8"},
|
nodes = {"farming:wheat_8"},
|
||||||
actions =
|
actions =
|
||||||
{
|
{
|
||||||
|
@ -79,32 +81,32 @@ local farmer_def = {
|
||||||
action = npc.actions.cmd.WALK_TO_POS,
|
action = npc.actions.cmd.WALK_TO_POS,
|
||||||
args = {
|
args = {
|
||||||
node = "farming:wheat_8",
|
node = "farming:wheat_8",
|
||||||
walkable = true
|
walkable = {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[2] =
|
[2] =
|
||||||
{
|
{
|
||||||
action = npc.actions.cmd.DIG,
|
action = npc.actions.cmd.DIG,
|
||||||
|
args = {
|
||||||
|
node = "farming:wheat_8",
|
||||||
|
walkable = {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[3] =
|
[3] =
|
||||||
{
|
{
|
||||||
action = npc.actions.cmd.PLACE,
|
if dugNodeNickname == "farming:wheat_8" then
|
||||||
args =
|
action = npc.actions.cmd.PLACE,
|
||||||
{
|
args = {node = "farming:seed_wheat 1"}
|
||||||
node = "farming:wheat_1"
|
end
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
none_actions =
|
none_actions = {
|
||||||
{
|
|
||||||
-- Walk a single step in a random direction
|
-- Walk a single step in a random direction
|
||||||
[1] = {
|
|
||||||
action = npc.actions.cmd.WALK_STEP,
|
action = npc.actions.cmd.WALK_STEP,
|
||||||
args =
|
args = {
|
||||||
{
|
|
||||||
dir = "random"
|
dir = "random"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue