2013-11-03 21:32:21 +00:00
|
|
|
--
|
|
|
|
--Flax Registry
|
|
|
|
--
|
|
|
|
|
|
|
|
for i=1,4 do
|
|
|
|
local drop = {
|
|
|
|
items = {
|
2013-11-03 22:36:03 +00:00
|
|
|
{items = {'farming:string'},rarity=5-i},
|
2013-11-04 15:59:56 +00:00
|
|
|
{items = {'farming:string'},rarity=6-i*2},
|
|
|
|
{items = {'farming:string'},rarity=7-i*3},
|
2013-11-03 22:36:03 +00:00
|
|
|
{items = {'farming:seed_flax'},rarity=5-i},
|
2013-11-04 15:59:56 +00:00
|
|
|
{items = {'farming:seed_flax'},rarity=6-i*2},
|
|
|
|
{items = {'farming:seed_flax'},rarity=7-i*3},
|
2013-11-03 21:32:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
minetest.register_node("farming:flax_"..i, {
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"farming_flax_"..i..".png"},
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = true,
|
|
|
|
drop = drop,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
groups = {snappy=3,flammable=2,plant=1,flax=i,not_in_creative_inventory=1,attached_node=1},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_node("farming:seed_flax", {
|
|
|
|
drawtype = "raillike",
|
|
|
|
description = "Flax Seeds",
|
|
|
|
tiles = {"farming_seed_placed.png"},
|
|
|
|
inventory_image = "farming_flax_seed.png",
|
2013-11-04 15:59:56 +00:00
|
|
|
groups = {snappy=3, plant=1},
|
2013-11-03 21:32:21 +00:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2013-11-03 23:30:03 +00:00
|
|
|
walkable = false,
|
2013-11-03 21:32:21 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.500000,-0.500000,-0.500000,0.500000,-0.3,0.500000},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
drop = "",
|
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--Spelt registry
|
|
|
|
--
|
|
|
|
for i=1,4 do
|
|
|
|
local drop = {
|
|
|
|
items = {
|
2013-11-03 22:36:03 +00:00
|
|
|
{items = {'farming:wheat'},rarity=5-i},
|
2013-11-04 15:59:56 +00:00
|
|
|
{items = {'farming:wheat'},rarity=6-i*2},
|
|
|
|
{items = {'farming:wheat'},rarity=7-i*3},
|
2013-11-03 22:36:03 +00:00
|
|
|
{items = {'farming:seed_spelt'},rarity=5-i},
|
2013-11-04 15:59:56 +00:00
|
|
|
{items = {'farming:seed_spelt'},rarity=6-i*2},
|
|
|
|
{items = {'farming:seed_spelt'},rarity=7-i*3},
|
2013-11-03 21:32:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
minetest.register_node("farming:spelt_"..i, {
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"farming_spelt_"..i..".png"},
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = true,
|
|
|
|
drop = drop,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
groups = {snappy=3,flammable=2,plant=1,flax=i,not_in_creative_inventory=1,attached_node=1},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-11-09 12:15:36 -06:00
|
|
|
minetest.register_node("farming:seed_spelt", {
|
|
|
|
drawtype = "raillike",
|
|
|
|
description = "Spelt Seeds",
|
|
|
|
tiles = {"farming_seed_placed.png"},
|
|
|
|
inventory_image = "farming_spelt_seed.png",
|
|
|
|
groups = {snappy=3, plant=1},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.500000,-0.500000,-0.500000,0.500000,-0.3,0.500000},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
drop = "",
|
|
|
|
})
|
|
|
|
|
2013-11-09 11:37:14 -06:00
|
|
|
---
|
|
|
|
--Soy registry
|
|
|
|
--
|
|
|
|
for i=1,4 do
|
|
|
|
local drop = {
|
|
|
|
items = {
|
2013-11-09 12:00:34 -06:00
|
|
|
{items = {'farming:soy'},rarity=5-i},
|
|
|
|
{items = {'farming:soy'},rarity=6-i*2},
|
|
|
|
{items = {'farming:soy'},rarity=7-i*3},
|
2013-11-09 11:37:14 -06:00
|
|
|
{items = {'farming:seed_soy'},rarity=5-i},
|
|
|
|
{items = {'farming:seed_soy'},rarity=6-i*2},
|
|
|
|
{items = {'farming:seed_soy'},rarity=7-i*3},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
minetest.register_node("farming:soy_"..i, {
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"farming_soy_"..i..".png"},
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = true,
|
|
|
|
drop = drop,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
groups = {snappy=3,flammable=2,plant=1,flax=i,not_in_creative_inventory=1,attached_node=1},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_node("farming:seed_soy", {
|
2013-11-03 21:32:21 +00:00
|
|
|
drawtype = "raillike",
|
2013-11-09 11:37:14 -06:00
|
|
|
description = "Soy Bean Seeds",
|
2013-11-03 21:32:21 +00:00
|
|
|
tiles = {"farming_seed_placed.png"},
|
2013-11-09 11:37:14 -06:00
|
|
|
inventory_image = "farming_soy_seed.png",
|
2013-11-04 15:59:56 +00:00
|
|
|
groups = {snappy=3, plant=1},
|
2013-11-03 21:32:21 +00:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2013-11-03 23:30:03 +00:00
|
|
|
walkable = false,
|
2013-11-03 21:32:21 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.500000,-0.500000,-0.500000,0.500000,-0.3,0.500000},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
drop = "",
|
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--Seed Growing ABMs
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:seed_flax"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:flax_1"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:seed_spelt"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:spelt_1"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2013-11-09 11:37:14 -06:00
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:seed_soy"},
|
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:soy_1"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2013-11-03 21:32:21 +00:00
|
|
|
--
|
|
|
|
--Plant Growing ABMs
|
|
|
|
--
|
|
|
|
|
|
|
|
--Flax
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:flax_1"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:flax_2"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:flax_2"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:flax_3"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:flax_3"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:flax_4"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
--Spelt
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:spelt_1"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:spelt_2"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:spelt_2"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:spelt_3"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:spelt_3"},
|
2013-11-03 22:43:10 +00:00
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
2013-11-03 21:32:21 +00:00
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
2013-11-03 21:45:59 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:spelt_4"})
|
2013-11-03 21:32:21 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2013-11-09 11:37:14 -06:00
|
|
|
--Soy
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:soy_1"},
|
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:soy_2"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:soy_2"},
|
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:soy_3"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:soy_3"},
|
|
|
|
interval = 200,
|
|
|
|
chance = 10,
|
|
|
|
action = function(pos, node)
|
|
|
|
if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name == "farming:soil" then
|
|
|
|
minetest.add_node({x=pos.x,y=pos.y,z=pos.z}, {name="farming:soy_4"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
2013-11-03 21:32:21 +00:00
|
|
|
--
|
|
|
|
--Farming Soil registry
|
|
|
|
--
|
|
|
|
|
|
|
|
minetest.register_node("farming:soil", {
|
|
|
|
description = "Farming Soil",
|
|
|
|
tiles = {"farming_soil.png",
|
|
|
|
"default_dirt.png"},
|
|
|
|
groups = {crumbly=3},
|
|
|
|
paramtype = "light",
|
|
|
|
drop = "default:dirt",
|
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--Craftitem Registry
|
|
|
|
--
|
|
|
|
minetest.register_craftitem("farming:string", {
|
|
|
|
description = "String",
|
|
|
|
inventory_image = "farming_string.png",
|
|
|
|
wield_image = "farming_string.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:wheat", {
|
|
|
|
description = "Spelt",
|
|
|
|
inventory_image = "farming_wheat.png",
|
|
|
|
wield_image = "farming_wheat.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:flour", {
|
|
|
|
description = "Pile of Flour",
|
|
|
|
inventory_image = "farming_flour.png",
|
|
|
|
wield_image = "farming_flour.png",
|
|
|
|
})
|
|
|
|
|
2013-11-09 11:37:14 -06:00
|
|
|
minetest.register_craftitem("farming:soy", {
|
|
|
|
description = "Soy Beans",
|
2013-11-09 20:42:48 -06:00
|
|
|
on_use=minetest.item_eat(2),
|
2013-11-09 11:37:14 -06:00
|
|
|
inventory_image = "farming_soy.png",
|
|
|
|
wield_image = "farming_soy.png",
|
|
|
|
})
|
|
|
|
|
2013-11-05 21:39:49 +00:00
|
|
|
--
|
|
|
|
--Cake
|
|
|
|
--
|
|
|
|
|
|
|
|
minetest.register_node("farming:cake", {
|
|
|
|
drawtype = "nodebox",
|
|
|
|
description = "CAKE!!!",
|
|
|
|
tiles = {"farming_cake_top.png","farming_cake_base.png","farming_cake_side.png"},
|
|
|
|
groups = {crumbly=3},
|
|
|
|
paramtype = "light",
|
|
|
|
drop = "farming:cake",
|
|
|
|
on_use=minetest.item_eat(16),
|
|
|
|
node_box = {
|
2013-11-10 20:08:42 +00:00
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2013-11-12 12:18:27 +00:00
|
|
|
{-6/16, -8/16, -4/16, 6/16, 0/16, 4/16},
|
|
|
|
{-4/16, -8/16, -6/16, 4/16, 0/16, 6/16},
|
|
|
|
{-5/16, -8/16, -5/16, 5/16, 0/16, 5/16},
|
2013-11-10 20:08:42 +00:00
|
|
|
},
|
2013-11-05 21:39:49 +00:00
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-8/16,-8/16,-8/16,8/16,0/16,8/16},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:dough", {
|
|
|
|
description = "Cake Mixture",
|
|
|
|
inventory_image = "farming_cakedough.png",
|
|
|
|
wield_image = "farming_cakedough.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:dough",
|
|
|
|
recipe = {
|
|
|
|
{"bushes:sugar","bushes:sugar"},
|
|
|
|
{"farming:flour","farming:flour"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "farming:cake",
|
|
|
|
recipe = "farming:dough",
|
|
|
|
cooktime = 30,
|
2013-11-03 21:32:21 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--Crafting
|
|
|
|
--
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:flour",
|
|
|
|
recipe = {
|
|
|
|
{"farming:wheat","farming:wheat"},
|
|
|
|
{"farming:wheat","farming:wheat"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:hoe_head 4",
|
|
|
|
recipe = {
|
|
|
|
{"","default:cobble","default:cobble"},
|
|
|
|
{"default:cobble","",""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:hoe",
|
|
|
|
recipe = {
|
|
|
|
{"farming:hoe_head"},
|
|
|
|
{"group:stick"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--The hoe (only stone for now)
|
|
|
|
--
|
|
|
|
minetest.register_craftitem("farming:hoe_head", {
|
|
|
|
description = "Hoe Head",
|
|
|
|
inventory_image = "farming_hoe_head.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("farming:hoe", {
|
|
|
|
description = "Hoe",
|
|
|
|
inventory_image = "farming_hoe.png",
|
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
--Farming soil-dirt abm
|
|
|
|
--
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = {"farming:soil"},
|
|
|
|
interval = 30,
|
|
|
|
chance = 3,
|
|
|
|
action = function(pos, node)
|
2013-11-04 15:59:56 +00:00
|
|
|
if minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name == "group:plant" then
|
2013-11-03 21:32:21 +00:00
|
|
|
minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="default:dirt"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
--
|
|
|
|
--Hoe functions
|
|
|
|
--
|
|
|
|
|
|
|
|
minetest.register_node(":default:dirt", {
|
|
|
|
description = "Dirt",
|
|
|
|
tiles = {"default_dirt.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3,soil=1},
|
|
|
|
drop = 'default:dirt',
|
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
on_punch = function(pos, node, puncher)
|
|
|
|
if puncher:get_wielded_item():get_name() == "farming:hoe" then
|
|
|
|
minetest.env:set_node(pos, {name="farming:soil"})
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node(":default:dirt_with_grass", {
|
|
|
|
description = "Grass",
|
|
|
|
tiles = {"default_dirt_grass.png",
|
|
|
|
"default_dirt.png",
|
|
|
|
"default_dirt_grass.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {crumbly=3,soil=1},
|
|
|
|
drop = 'default:dirt',
|
|
|
|
sounds = default.node_sound_dirt_defaults({
|
|
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
on_punch = function(pos, node, puncher)
|
|
|
|
if puncher:get_wielded_item():get_name() == "farming:hoe" then
|
|
|
|
minetest.env:set_node(pos, {name="farming:soil"})
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2013-11-05 19:51:04 +00:00
|
|
|
--
|
|
|
|
--Rope
|
|
|
|
--
|
|
|
|
|
|
|
|
minetest.register_node("farming:rope",{
|
|
|
|
description = "Rope",
|
|
|
|
drawtype = "nodebox",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
tiles = {"farming_rope.png"},
|
2013-11-05 21:39:49 +00:00
|
|
|
inventory_image = "farming_rope_inv.png",
|
|
|
|
wield_image = "farming_rope_inv.png",
|
2013-11-05 19:51:04 +00:00
|
|
|
groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1},
|
|
|
|
paramtype = "light",
|
|
|
|
climbable = true,
|
|
|
|
walkable = false,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2013-11-07 17:59:20 +00:00
|
|
|
{-2/16, -8/16, -2/16, 2/16, 8/16, 2/16},
|
2013-11-05 19:51:04 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2013-11-07 17:59:20 +00:00
|
|
|
{-3/16, -8/16, -3/16, 3/16, 8/16, 3/16},
|
2013-11-05 19:51:04 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "farming:rope",
|
|
|
|
recipe = {
|
|
|
|
{"farming:string"},
|
|
|
|
{"farming:string"},
|
|
|
|
{"farming:string"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2013-11-11 21:37:57 +00:00
|
|
|
--
|
|
|
|
--Anthill
|
|
|
|
--
|
|
|
|
local SPAWN_DELAY = 1000
|
|
|
|
local SPAWN_CHANCE = 200
|
|
|
|
local anthill_seed_diff = 339
|
|
|
|
|
|
|
|
plantslib:spawn_on_surfaces({
|
|
|
|
spawn_delay = SPAWN_DELAY,
|
|
|
|
spawn_plants = {"farming:anthill"},
|
|
|
|
avoid_radius = 25,
|
|
|
|
spawn_chance = SPAWN_CHANCE/10,
|
|
|
|
spawn_surfaces = {"default:dirt_with_grass"},
|
|
|
|
avoid_nodes = {"group:poisonivy", "group:flower", "group:flora"},
|
|
|
|
seed_diff = anthill_seed_diff,
|
|
|
|
light_min = 1,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("farming:anthill",{
|
|
|
|
description = "Ant Hill",
|
|
|
|
drawtype = "nodebox",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
tiles = {"farming_anthill.png"},
|
|
|
|
groups = {oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
|
|
|
paramtype = "light",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16},
|
|
|
|
{-7/16, -7/16, -7/16, 7/16, -6/16, 7/16},
|
|
|
|
{-6/16, -6/16, -6/16, 6/16, -5/16, 6/16},
|
|
|
|
{-5/16, -5/16, -5/16, 5/16, -4/16, 5/16},
|
|
|
|
{-4/16, -4/16, -4/16, 4/16, -3/16, 4/16},
|
|
|
|
{-3/16, -3/16, -3/16, 3/16, -2/16, 3/16},
|
|
|
|
{-2/16, -2/16, -2/16, 2/16, -1/16, 2/16},
|
|
|
|
{-1/16, -1/16, -1/16, 1/16, 0/16, 1/16},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
drop = {
|
|
|
|
max_items = 2,
|
|
|
|
items = {
|
|
|
|
{
|
|
|
|
items = {"farming:seed_soy"},
|
|
|
|
rarity = 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
items = {"farming:seed_spelt"},
|
|
|
|
rarity = 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
items = {"farming:seed_flax"},
|
|
|
|
rarity = 6,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
items = {"farming:seed_soy"},
|
|
|
|
rarity = 6,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
items = {"default:dirt"},
|
|
|
|
rarity = 3,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|