Compare commits
39 Commits
master
...
c202ced929
Author | SHA1 | Date | |
---|---|---|---|
c202ced929 | |||
501e9e302e | |||
a26e4f94f2 | |||
f1d02c7877 | |||
31101de345 | |||
19d5001f46 | |||
7e5db833e0 | |||
cfe731352d | |||
22fc0be525 | |||
1b0e96cfc7 | |||
d087d639b8 | |||
23d12c3c8c | |||
942d6eafba | |||
9b6a055534 | |||
361e006b56 | |||
48951090c0 | |||
3246f11594 | |||
756b4417ea | |||
787b7b3396 | |||
847a9a4527 | |||
9fa818c1aa | |||
13df43deeb | |||
e0340ce2cf | |||
8f2c41abe9 | |||
59743d747f | |||
c8284b6410 | |||
62b83f71a4 | |||
11b79dffd2 | |||
52575203c4 | |||
5c012d470b | |||
a6bc7aaf9e | |||
0cc0a7233f | |||
58f3dbf783 | |||
fb733d8f6f | |||
016528f585 | |||
88ed7b5a7f | |||
e9d97cfeb1 | |||
19577a3917 | |||
ec40c00836 |
@ -217,7 +217,7 @@ on an older map are enabled and growing properly.
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale (with setting to disable weed growth).
|
- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files., hoes can deal damage.
|
||||||
- 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility
|
- 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility
|
||||||
- 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube
|
- 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube
|
||||||
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock)
|
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
--= Helpers
|
--= Helpers
|
||||||
|
|
||||||
local eth = core.get_modpath("ethereal")
|
local eth = minetest.get_modpath("ethereal")
|
||||||
local alias = function(orig, new)
|
local alias = function(orig, new)
|
||||||
core.register_alias(orig, new)
|
minetest.register_alias(orig, new)
|
||||||
end
|
end
|
||||||
|
|
||||||
--= Add {eatable} group to default food items if found
|
--= Add {eatable} group to default food items if found
|
||||||
@ -24,7 +24,7 @@ if eth then
|
|||||||
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
||||||
alias("farming_plus:banana", "ethereal:banana")
|
alias("farming_plus:banana", "ethereal:banana")
|
||||||
else
|
else
|
||||||
core.register_node(":ethereal:banana", {
|
minetest.register_node(":ethereal:banana", {
|
||||||
description = S("Banana"),
|
description = S("Banana"),
|
||||||
drawtype = "torchlike",
|
drawtype = "torchlike",
|
||||||
tiles = {"farming_banana_single.png"},
|
tiles = {"farming_banana_single.png"},
|
||||||
@ -34,17 +34,20 @@ else
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
type = "fixed",
|
||||||
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
||||||
|
},
|
||||||
|
groups = {
|
||||||
|
food_banana = 1, fleshy = 3, dig_immediate = 3
|
||||||
},
|
},
|
||||||
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3},
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("ethereal:banana", 2)
|
farming.add_eatable("ethereal:banana", 2)
|
||||||
|
|
||||||
core.register_node(":ethereal:bananaleaves", {
|
minetest.register_node(":ethereal:bananaleaves", {
|
||||||
description = S("Banana Leaves"),
|
description = S("Banana Leaves"),
|
||||||
tiles = {"ethereal_banana_leaf.png"},
|
tiles = {"ethereal_banana_leaf.png"},
|
||||||
inventory_image = "ethereal_banana_leaf.png",
|
inventory_image = "ethereal_banana_leaf.png",
|
||||||
@ -88,7 +91,7 @@ if eth then
|
|||||||
alias("farming_plus:orange", "ethereal:orange")
|
alias("farming_plus:orange", "ethereal:orange")
|
||||||
alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
|
alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
|
||||||
else
|
else
|
||||||
core.register_node(":ethereal:orange", {
|
minetest.register_node(":ethereal:orange", {
|
||||||
description = S("Orange"),
|
description = S("Orange"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_orange.png"},
|
tiles = {"farming_orange.png"},
|
||||||
@ -98,11 +101,14 @@ else
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed", fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
type = "fixed",
|
||||||
|
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
||||||
|
},
|
||||||
|
groups = {
|
||||||
|
food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2
|
||||||
},
|
},
|
||||||
groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -159,3 +165,7 @@ alias("farming_plus:tomato_1", "farming:tomato_2")
|
|||||||
alias("farming_plus:tomato_2", "farming:tomato_4")
|
alias("farming_plus:tomato_2", "farming:tomato_4")
|
||||||
alias("farming_plus:tomato_3", "farming:tomato_6")
|
alias("farming_plus:tomato_3", "farming:tomato_6")
|
||||||
alias("farming_plus:tomato", "farming:tomato_8")
|
alias("farming_plus:tomato", "farming:tomato_8")
|
||||||
|
|
||||||
|
-- Weeds
|
||||||
|
|
||||||
|
alias("farming:weed", "default:grass_2")
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:artichoke", {
|
minetest.register_craftitem("farming:artichoke", {
|
||||||
description = S("Artichoke"),
|
description = S("Artichoke"),
|
||||||
inventory_image = "farming_artichoke.png",
|
inventory_image = "farming_artichoke.png",
|
||||||
groups = {compostability = 48, seed = 2, food_artichoke = 1},
|
groups = {compostability = 48, seed = 2, food_artichoke = 1},
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1")
|
||||||
@ -40,27 +40,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:artichoke_1", table.copy(def))
|
minetest.register_node("farming:artichoke_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_2.png"}
|
def.tiles = {"farming_artichoke_2.png"}
|
||||||
core.register_node("farming:artichoke_2", table.copy(def))
|
minetest.register_node("farming:artichoke_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_3.png"}
|
def.tiles = {"farming_artichoke_3.png"}
|
||||||
core.register_node("farming:artichoke_3", table.copy(def))
|
minetest.register_node("farming:artichoke_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_4.png"}
|
def.tiles = {"farming_artichoke_4.png"}
|
||||||
def.drop = {
|
minetest.register_node("farming:artichoke_4", table.copy(def))
|
||||||
items = {
|
|
||||||
{items = {"farming:artichoke"}, rarity = 1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
core.register_node("farming:artichoke_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -73,7 +68,7 @@ def.drop = {
|
|||||||
{items = {"farming:artichoke"}, rarity = 2}
|
{items = {"farming:artichoke"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:artichoke_5", table.copy(def))
|
minetest.register_node("farming:artichoke_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -87,11 +82,9 @@ farming.registered_plants["farming:artichoke"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -101,7 +94,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 13,
|
y_min = 1,
|
||||||
decoration = "farming:artichoke_4",
|
y_max = 13,
|
||||||
spawn_by = "group:tree", num_spawn_by = 1
|
decoration = {"farming:artichoke_5"},
|
||||||
|
spawn_by = "group:tree",
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:asparagus", {
|
minetest.register_craftitem("farming:asparagus", {
|
||||||
description = S("Asparagus"),
|
description = S("Asparagus"),
|
||||||
inventory_image = "farming_asparagus.png",
|
inventory_image = "farming_asparagus.png",
|
||||||
groups = {compostability = 48, seed = 2, food_asparagus = 1},
|
groups = {compostability = 48, seed = 2, food_asparagus = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:asparagus_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:asparagus_1")
|
||||||
@ -42,27 +42,27 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:asparagus_1", table.copy(def))
|
minetest.register_node("farming:asparagus_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_2.png"}
|
def.tiles = {"farming_asparagus_2.png"}
|
||||||
core.register_node("farming:asparagus_2", table.copy(def))
|
minetest.register_node("farming:asparagus_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_3.png"}
|
def.tiles = {"farming_asparagus_3.png"}
|
||||||
core.register_node("farming:asparagus_3", table.copy(def))
|
minetest.register_node("farming:asparagus_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_4.png"}
|
def.tiles = {"farming_asparagus_4.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:asparagus"}, rarity = 1}
|
{items = {"farming:asparagus"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:asparagus_4", table.copy(def))
|
minetest.register_node("farming:asparagus_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -71,11 +71,11 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:asparagus 2"}, rarity = 1},
|
{items = {"farming:asparagus"}, rarity = 1},
|
||||||
{items = {"farming:asparagus"}, rarity = 2}
|
{items = {"farming:asparagus 2"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:asparagus_5", table.copy(def))
|
minetest.register_node("farming:asparagus_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -89,20 +89,21 @@ farming.registered_plants["farming:asparagus"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
name = "farming:asparagus_5",
|
name = "farming:asparagus_5",
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = -0.1,
|
||||||
scale = farming.asparagus,
|
scale = farming.asparagus,
|
||||||
spread = {x = 100, y = 100, z = 100},
|
spread = {x = 100, y = 100, z = 100},
|
||||||
seed = 234,
|
seed = 234,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 8, y_max = 32,
|
y_min = 8,
|
||||||
decoration = "farming:asparagus_4",
|
y_max = 32,
|
||||||
|
decoration = "farming:asparagus_5",
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_barley", {
|
minetest.register_node("farming:seed_barley", {
|
||||||
description = S("Barley Seed"),
|
description = S("Barley Seed"),
|
||||||
tiles = {"farming_barley_seed.png"},
|
tiles = {"farming_barley_seed.png"},
|
||||||
inventory_image = "farming_barley_seed.png",
|
inventory_image = "farming_barley_seed.png",
|
||||||
@ -27,13 +27,13 @@ core.register_node("farming:seed_barley", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:barley_1", param2 = 3})
|
minetest.set_node(pos, {name = "farming:barley_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:barley", {
|
minetest.register_craftitem("farming:barley", {
|
||||||
description = S("Barley"),
|
description = S("Barley"),
|
||||||
inventory_image = "farming_barley.png",
|
inventory_image = "farming_barley.png",
|
||||||
groups = {food_barley = 1, flammable = 2, compostability = 65}
|
groups = {food_barley = 1, flammable = 2, compostability = 65}
|
||||||
@ -65,27 +65,27 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:barley_1", table.copy(def))
|
minetest.register_node("farming:barley_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_barley_2.png"}
|
def.tiles = {"farming_barley_2.png"}
|
||||||
core.register_node("farming:barley_2", table.copy(def))
|
minetest.register_node("farming:barley_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_barley_3.png"}
|
def.tiles = {"farming_barley_3.png"}
|
||||||
core.register_node("farming:barley_3", table.copy(def))
|
minetest.register_node("farming:barley_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_barley_4.png"}
|
def.tiles = {"farming_barley_4.png"}
|
||||||
core.register_node("farming:barley_4", table.copy(def))
|
minetest.register_node("farming:barley_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_barley_5.png"}
|
def.tiles = {"farming_barley_5.png"}
|
||||||
core.register_node("farming:barley_5", table.copy(def))
|
minetest.register_node("farming:barley_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ def.drop = {
|
|||||||
{items = {"farming:seed_barley"}, rarity = 2}
|
{items = {"farming:seed_barley"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:barley_6", table.copy(def))
|
minetest.register_node("farming:barley_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ def.drop = {
|
|||||||
{items = {"farming:seed_barley"}, rarity = 1}
|
{items = {"farming:seed_barley"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:barley_7", table.copy(def))
|
minetest.register_node("farming:barley_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -116,13 +116,13 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:barley 2"}, rarity = 1},
|
{items = {"farming:barley"}, rarity = 1},
|
||||||
{items = {"farming:barley"}, rarity = 2},
|
{items = {"farming:barley"}, rarity = 3},
|
||||||
{items = {"farming:seed_barley 2"}, rarity = 1},
|
{items = {"farming:seed_barley"}, rarity = 1},
|
||||||
{items = {"farming:seed_barley"}, rarity = 2}
|
{items = {"farming:seed_barley"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:barley_8", table.copy(def))
|
minetest.register_node("farming:barley_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
-- All textures by (C) Auke Kok <sofar@foo-projects.org> CC-BY-SA-3.0
|
-- All textures by (C) Auke Kok <sofar@foo-projects.org> CC-BY-SA-3.0
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
local a = farming.recipe_items
|
||||||
|
|
||||||
-- place beans helper
|
-- place beans helper
|
||||||
|
|
||||||
@ -12,14 +13,14 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then return end
|
if not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not core.registered_nodes[under.name] then return end
|
if not minetest.registered_nodes[under.name] then return end
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if placer and itemstack and def and def.on_rightclick then
|
if placer and itemstack and def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
@ -29,15 +30,15 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
|
|||||||
local name = placer and placer:get_player_name() or ""
|
local name = placer and placer:get_player_name() or ""
|
||||||
|
|
||||||
-- check for protection
|
-- check for protection
|
||||||
if core.is_protected(pt.under, name) then return end
|
if minetest.is_protected(pt.under, name) then return end
|
||||||
|
|
||||||
-- check if pointing at bean pole
|
-- check if pointing at bean pole
|
||||||
if under.name ~= "farming:beanpole" then return end
|
if under.name ~= "farming:beanpole" then return end
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
core.set_node(pt.under, {name = plantname})
|
minetest.set_node(pt.under, {name = plantname})
|
||||||
|
|
||||||
core.sound_play("default_place_node", {pos = pt.under, gain = 1.0}, true)
|
minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0}, true)
|
||||||
|
|
||||||
if placer or not farming.is_creative(placer:get_player_name()) then
|
if placer or not farming.is_creative(placer:get_player_name()) then
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check for refill
|
-- check for refill
|
||||||
if itemstack:get_count() == 0 then
|
if itemstack:get_count() == 0 then
|
||||||
|
|
||||||
core.after(0.20,
|
minetest.after(0.20,
|
||||||
farming.refill_plant, placer, "farming:beans", placer:get_wield_index())
|
farming.refill_plant, placer, "farming:beans", placer:get_wield_index())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -56,11 +57,11 @@ end
|
|||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:beans", {
|
minetest.register_craftitem("farming:beans", {
|
||||||
description = S("Green Beans"),
|
description = S("Green Beans"),
|
||||||
inventory_image = "farming_beans.png",
|
inventory_image = "farming_beans.png",
|
||||||
groups = {compostability = 48, seed = 2, food_beans = 1},
|
groups = {compostability = 48, seed = 2, food_beans = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1")
|
return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1")
|
||||||
@ -71,7 +72,7 @@ farming.add_eatable("farming:beans", 1)
|
|||||||
|
|
||||||
-- beanpole
|
-- beanpole
|
||||||
|
|
||||||
core.register_node("farming:beanpole", {
|
minetest.register_node("farming:beanpole", {
|
||||||
description = S("Bean Pole (place on soil before planting beans)"),
|
description = S("Bean Pole (place on soil before planting beans)"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_beanpole.png"},
|
tiles = {"farming_beanpole.png"},
|
||||||
@ -94,26 +95,26 @@ core.register_node("farming:beanpole", {
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then return end
|
if not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not core.registered_nodes[under.name] then return end
|
if not minetest.registered_nodes[under.name] then return end
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if def and def.on_rightclick then
|
if def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.is_protected(pt.above, placer:get_player_name()) then
|
if minetest.is_protected(pt.above, placer:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodename = under.name
|
local nodename = under.name
|
||||||
|
|
||||||
if core.get_item_group(nodename, "soil") < 2 then return end
|
if minetest.get_item_group(nodename, "soil") < 2 then return end
|
||||||
|
|
||||||
local top = {
|
local top = {
|
||||||
x = pointed_thing.above.x,
|
x = pointed_thing.above.x,
|
||||||
@ -121,11 +122,11 @@ core.register_node("farming:beanpole", {
|
|||||||
z = pointed_thing.above.z
|
z = pointed_thing.above.z
|
||||||
}
|
}
|
||||||
|
|
||||||
nodename = core.get_node(top).name
|
nodename = minetest.get_node(top).name
|
||||||
|
|
||||||
if nodename ~= "air" then return end
|
if nodename ~= "air" then return end
|
||||||
|
|
||||||
core.set_node(pointed_thing.above, {name = "farming:beanpole"})
|
minetest.set_node(pointed_thing.above, {name = "farming:beanpole"})
|
||||||
|
|
||||||
if not farming.is_creative(placer:get_player_name()) then
|
if not farming.is_creative(placer:get_player_name()) then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
@ -163,22 +164,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:beanpole_1", table.copy(def))
|
minetest.register_node("farming:beanpole_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_2.png"}
|
def.tiles = {"farming_beanpole_2.png"}
|
||||||
core.register_node("farming:beanpole_2", table.copy(def))
|
minetest.register_node("farming:beanpole_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_3.png"}
|
def.tiles = {"farming_beanpole_3.png"}
|
||||||
core.register_node("farming:beanpole_3", table.copy(def))
|
minetest.register_node("farming:beanpole_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_4.png"}
|
def.tiles = {"farming_beanpole_4.png"}
|
||||||
core.register_node("farming:beanpole_4", table.copy(def))
|
minetest.register_node("farming:beanpole_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -189,11 +190,11 @@ def.drop = {
|
|||||||
items = {
|
items = {
|
||||||
{items = {"farming:beanpole"}, rarity = 1},
|
{items = {"farming:beanpole"}, rarity = 1},
|
||||||
{items = {"farming:beans 3"}, rarity = 1},
|
{items = {"farming:beans 3"}, rarity = 1},
|
||||||
{items = {"farming:beans"}, rarity = 2},
|
{items = {"farming:beans 2"}, rarity = 2},
|
||||||
{items = {"farming:beans"}, rarity = 3}
|
{items = {"farming:beans 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:beanpole_5", table.copy(def))
|
minetest.register_node("farming:beanpole_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -208,7 +209,7 @@ farming.registered_plants["farming:beans"] = {
|
|||||||
|
|
||||||
-- wild green bean bush (this is what you find on the map)
|
-- wild green bean bush (this is what you find on the map)
|
||||||
|
|
||||||
core.register_node("farming:beanbush", {
|
minetest.register_node("farming:beanbush", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_beanbush.png"},
|
tiles = {"farming_beanbush.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -234,7 +235,7 @@ core.register_node("farming:beanbush", {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
@ -246,6 +247,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 18, y_max = 38,
|
y_min = 18,
|
||||||
|
y_max = 38,
|
||||||
decoration = "farming:beanbush"
|
decoration = "farming:beanbush"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
local a = farming.recipe_items
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:beetroot", {
|
minetest.register_craftitem("farming:beetroot", {
|
||||||
description = S("Beetroot"),
|
description = S("Beetroot"),
|
||||||
inventory_image = "farming_beetroot.png",
|
inventory_image = "farming_beetroot.png",
|
||||||
groups = {compostability = 48, seed = 2, food_beetroot = 1},
|
groups = {compostability = 48, seed = 2, food_beetroot = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
|
||||||
@ -40,22 +41,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:beetroot_1", table.copy(def))
|
minetest.register_node("farming:beetroot_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_2.png"}
|
def.tiles = {"farming_beetroot_2.png"}
|
||||||
core.register_node("farming:beetroot_2", table.copy(def))
|
minetest.register_node("farming:beetroot_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_3.png"}
|
def.tiles = {"farming_beetroot_3.png"}
|
||||||
core.register_node("farming:beetroot_3", table.copy(def))
|
minetest.register_node("farming:beetroot_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_4.png"}
|
def.tiles = {"farming_beetroot_4.png"}
|
||||||
core.register_node("farming:beetroot_4", table.copy(def))
|
minetest.register_node("farming:beetroot_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -63,13 +64,14 @@ def.tiles = {"farming_beetroot_5.png"}
|
|||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 4, items = {
|
||||||
{items = {"farming:beetroot 2"}, rarity = 1},
|
{items = {"farming:beetroot"}, rarity = 1},
|
||||||
{items = {"farming:beetroot"}, rarity = 2},
|
{items = {"farming:beetroot"}, rarity = 2},
|
||||||
{items = {"farming:beetroot"}, rarity = 3}
|
{items = {"farming:beetroot"}, rarity = 3},
|
||||||
|
{items = {"farming:beetroot"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:beetroot_5", table.copy(def))
|
minetest.register_node("farming:beetroot_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -83,15 +85,9 @@ farming.registered_plants["farming:beetroot"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}
|
minetest.register_decoration({
|
||||||
|
|
||||||
if farming.eth then
|
|
||||||
spawn_on = {"ethereal:prairie_dirt"}
|
|
||||||
end
|
|
||||||
|
|
||||||
core.register_decoration({
|
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = spawn_on,
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -101,6 +97,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 20,
|
y_min = 1,
|
||||||
|
y_max = 20,
|
||||||
decoration = "farming:beetroot_5"
|
decoration = "farming:beetroot_5"
|
||||||
})
|
})
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:blackberry", {
|
minetest.register_craftitem("farming:blackberry", {
|
||||||
description = S("Blackberries"),
|
description = S("Blackberries"),
|
||||||
inventory_image = "farming_blackberry.png",
|
inventory_image = "farming_blackberry.png",
|
||||||
groups = {
|
groups = {
|
||||||
compostability = 48, seed = 2, food_blackberries = 1, food_blackberry = 1,
|
compostability = 48, seed = 2, food_blackberries = 1, food_blackberry = 1,
|
||||||
food_berry = 1
|
food_berry = 1
|
||||||
},
|
},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1")
|
||||||
@ -42,17 +42,17 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:blackberry_1", table.copy(def))
|
minetest.register_node("farming:blackberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_2.png"}
|
def.tiles = {"farming_blackberry_2.png"}
|
||||||
core.register_node("farming:blackberry_2", table.copy(def))
|
minetest.register_node("farming:blackberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_3.png"}
|
def.tiles = {"farming_blackberry_3.png"}
|
||||||
core.register_node("farming:blackberry_3", table.copy(def))
|
minetest.register_node("farming:blackberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -61,12 +61,12 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:blackberry 2"}, rarity = 1},
|
{items = {'farming:blackberry 2'}, rarity = 1},
|
||||||
{items = {"farming:blackberry"}, rarity = 2},
|
{items = {'farming:blackberry'}, rarity = 2},
|
||||||
{items = {"farming:blackberry"}, rarity = 3},
|
{items = {'farming:blackberry'}, rarity = 3},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:blackberry_4", table.copy(def))
|
minetest.register_node("farming:blackberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -80,11 +80,9 @@ farming.registered_plants["farming:blackberry"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -94,6 +92,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 20,
|
y_min = 3,
|
||||||
|
y_max = 20,
|
||||||
decoration = "farming:blackberry_4"
|
decoration = "farming:blackberry_4"
|
||||||
})
|
})
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:blueberries", {
|
minetest.register_craftitem("farming:blueberries", {
|
||||||
description = S("Wild Blueberries"),
|
description = S("Wild Blueberries"),
|
||||||
inventory_image = "farming_blueberries.png",
|
inventory_image = "farming_blueberries.png",
|
||||||
groups = {
|
groups = {
|
||||||
compostability = 48,seed = 2, food_blueberries = 1, food_blueberry = 1,
|
compostability = 48,seed = 2, food_blueberries = 1, food_blueberry = 1,
|
||||||
food_berry = 1
|
food_berry = 1
|
||||||
},
|
},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
|
||||||
@ -41,17 +41,17 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:blueberry_1", table.copy(def))
|
minetest.register_node("farming:blueberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_blueberry_2.png"}
|
def.tiles = {"farming_blueberry_2.png"}
|
||||||
core.register_node("farming:blueberry_2", table.copy(def))
|
minetest.register_node("farming:blueberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_blueberry_3.png"}
|
def.tiles = {"farming_blueberry_3.png"}
|
||||||
core.register_node("farming:blueberry_3", table.copy(def))
|
minetest.register_node("farming:blueberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ def.drop = {
|
|||||||
{items = {"farming:blueberries"}, rarity = 3}
|
{items = {"farming:blueberries"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:blueberry_4", table.copy(def))
|
minetest.register_node("farming:blueberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -79,11 +79,9 @@ farming.registered_plants["farming:blueberries"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -93,6 +91,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 15,
|
y_min = 3,
|
||||||
|
y_max = 15,
|
||||||
decoration = "farming:blueberry_4"
|
decoration = "farming:blueberry_4"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:cabbage", {
|
minetest.register_craftitem("farming:cabbage", {
|
||||||
description = S("Cabbage"),
|
description = S("Cabbage"),
|
||||||
inventory_image = "farming_cabbage.png",
|
inventory_image = "farming_cabbage.png",
|
||||||
groups = {compostability = 48, seed = 2, food_cabbage = 1},
|
groups = {compostability = 48, seed = 2, food_cabbage = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cabbage_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cabbage_1")
|
||||||
@ -40,27 +40,27 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:cabbage_1", table.copy(def))
|
minetest.register_node("farming:cabbage_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_2.png"}
|
def.tiles = {"farming_cabbage_2.png"}
|
||||||
core.register_node("farming:cabbage_2", table.copy(def))
|
minetest.register_node("farming:cabbage_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_3.png"}
|
def.tiles = {"farming_cabbage_3.png"}
|
||||||
core.register_node("farming:cabbage_3", table.copy(def))
|
minetest.register_node("farming:cabbage_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_4.png"}
|
def.tiles = {"farming_cabbage_4.png"}
|
||||||
core.register_node("farming:cabbage_4", table.copy(def))
|
minetest.register_node("farming:cabbage_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_5.png"}
|
def.tiles = {"farming_cabbage_5.png"}
|
||||||
core.register_node("farming:cabbage_5", table.copy(def))
|
minetest.register_node("farming:cabbage_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6 (final)
|
-- stage 6 (final)
|
||||||
|
|
||||||
@ -68,12 +68,12 @@ def.tiles = {"farming_cabbage_6.png"}
|
|||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 2, items = {
|
||||||
{items = {"farming:cabbage 2"}, rarity = 1},
|
{items = {"farming:cabbage 2"}, rarity = 1},
|
||||||
{items = {"farming:cabbage"}, rarity = 3}
|
{items = {"farming:cabbage 1"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cabbage_6", table.copy(def))
|
minetest.register_node("farming:cabbage_6", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ farming.registered_plants["farming:cabbage"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
@ -99,6 +99,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 2, y_max = 15,
|
y_min = 2,
|
||||||
|
y_max = 15,
|
||||||
decoration = "farming:cabbage_6"
|
decoration = "farming:cabbage_6"
|
||||||
})
|
})
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
|
|
||||||
-- Original textures from PixelBox texture pack
|
-- Original textures from PixelBox texture pack
|
||||||
-- https://forum.core.net/viewtopic.php?id=4990
|
-- https://forum.minetest.net/viewtopic.php?id=4990
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
local a = farming.recipe_items
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:carrot", {
|
minetest.register_craftitem("farming:carrot", {
|
||||||
description = S("Carrot"),
|
description = S("Carrot"),
|
||||||
inventory_image = "farming_carrot.png",
|
inventory_image = "farming_carrot.png",
|
||||||
groups = {compostability = 48, seed = 2, food_carrot = 1},
|
groups = {compostability = 48, seed = 2, food_carrot = 1},
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
|
||||||
@ -43,32 +44,32 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:carrot_1", table.copy(def))
|
minetest.register_node("farming:carrot_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_2.png"}
|
def.tiles = {"farming_carrot_2.png"}
|
||||||
core.register_node("farming:carrot_2", table.copy(def))
|
minetest.register_node("farming:carrot_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_3.png"}
|
def.tiles = {"farming_carrot_3.png"}
|
||||||
core.register_node("farming:carrot_3", table.copy(def))
|
minetest.register_node("farming:carrot_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_4.png"}
|
def.tiles = {"farming_carrot_4.png"}
|
||||||
core.register_node("farming:carrot_4", table.copy(def))
|
minetest.register_node("farming:carrot_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_5.png"}
|
def.tiles = {"farming_carrot_5.png"}
|
||||||
core.register_node("farming:carrot_5", table.copy(def))
|
minetest.register_node("farming:carrot_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_6.png"}
|
def.tiles = {"farming_carrot_6.png"}
|
||||||
core.register_node("farming:carrot_6", table.copy(def))
|
minetest.register_node("farming:carrot_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -76,10 +77,10 @@ def.tiles = {"farming_carrot_7.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:carrot"}, rarity = 1},
|
{items = {"farming:carrot"}, rarity = 1},
|
||||||
{items = {"farming:carrot"}, rarity = 3}
|
{items = {"farming:carrot 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:carrot_7", table.copy(def))
|
minetest.register_node("farming:carrot_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -89,11 +90,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:carrot 2"}, rarity = 1},
|
{items = {"farming:carrot 2"}, rarity = 1},
|
||||||
{items = {"farming:carrot"}, rarity = 2},
|
{items = {"farming:carrot 3"}, rarity = 2}
|
||||||
{items = {"farming:carrot"}, rarity = 3},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:carrot_8", table.copy(def))
|
minetest.register_node("farming:carrot_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -107,11 +107,17 @@ farming.registered_plants["farming:carrot"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
y_max = mg and 30 or 20,
|
||||||
|
near = mg and "group:water" or nil,
|
||||||
|
num = mg and 1 or -1,
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -121,6 +127,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 30,
|
y_min = 1,
|
||||||
decoration = "farming:carrot_7"
|
y_max = def.y_max,
|
||||||
|
decoration = "farming:carrot_8",
|
||||||
|
spawn_by = def.near,
|
||||||
|
num_spawn_by = def.num
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
local a = farming.recipe_items
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:chili_pepper", {
|
minetest.register_craftitem("farming:chili_pepper", {
|
||||||
description = S("Chili Pepper"),
|
description = S("Chili Pepper"),
|
||||||
inventory_image = "farming_chili_pepper.png",
|
inventory_image = "farming_chili_pepper.png",
|
||||||
groups = {compostability = 48, seed = 2, food_chili_pepper = 1},
|
groups = {compostability = 48, seed = 2, food_chili_pepper = 1},
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
|
||||||
@ -40,37 +41,37 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:chili_1", table.copy(def))
|
minetest.register_node("farming:chili_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_chili_2.png"}
|
def.tiles = {"farming_chili_2.png"}
|
||||||
core.register_node("farming:chili_2", table.copy(def))
|
minetest.register_node("farming:chili_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_chili_3.png"}
|
def.tiles = {"farming_chili_3.png"}
|
||||||
core.register_node("farming:chili_3", table.copy(def))
|
minetest.register_node("farming:chili_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_chili_4.png"}
|
def.tiles = {"farming_chili_4.png"}
|
||||||
core.register_node("farming:chili_4", table.copy(def))
|
minetest.register_node("farming:chili_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_chili_5.png"}
|
def.tiles = {"farming_chili_5.png"}
|
||||||
core.register_node("farming:chili_5", table.copy(def))
|
minetest.register_node("farming:chili_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_chili_6.png"}
|
def.tiles = {"farming_chili_6.png"}
|
||||||
core.register_node("farming:chili_6", table.copy(def))
|
minetest.register_node("farming:chili_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_chili_7.png"}
|
def.tiles = {"farming_chili_7.png"}
|
||||||
core.register_node("farming:chili_7", table.copy(def))
|
minetest.register_node("farming:chili_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -79,13 +80,11 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:chili_pepper 2"}, rarity = 1},
|
{items = {"farming:chili_pepper 3"}, rarity = 1},
|
||||||
{items = {"farming:chili_pepper"}, rarity = 2},
|
{items = {"farming:chili_pepper 2"}, rarity = 2}
|
||||||
{items = {"farming:chili_pepper"}, rarity = 3},
|
|
||||||
{items = {"farming:chili_pepper"}, rarity = 4}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:chili_8", table.copy(def))
|
minetest.register_node("farming:chili_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -99,11 +98,11 @@ farming.registered_plants["farming:chili_pepper"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {
|
||||||
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
||||||
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
"mcl_core:dirt_with_grass"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -114,7 +113,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 45,
|
y_min = 5,
|
||||||
decoration = "farming:chili_8",
|
y_max = 35,
|
||||||
spawn_by = "group:tree", num_spawn_by = 1
|
decoration = {"farming:chili_8"},
|
||||||
|
spawn_by = "group:tree",
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- place cocoa
|
-- place cocoa
|
||||||
local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
||||||
@ -9,14 +9,14 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then return end
|
if not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not core.registered_nodes[under.name] then return end
|
if not minetest.registered_nodes[under.name] then return end
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if placer and itemstack and def and def.on_rightclick then
|
if placer and itemstack and def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
@ -24,7 +24,7 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
|
|
||||||
-- check if pointing at jungletree
|
-- check if pointing at jungletree
|
||||||
if (under.name ~= "default:jungletree" and under.name ~= "mcl_core:jungletree")
|
if (under.name ~= "default:jungletree" and under.name ~= "mcl_core:jungletree")
|
||||||
or core.get_node(pt.above).name ~= "air" then
|
or minetest.get_node(pt.above).name ~= "air" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -32,12 +32,12 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
local name = placer and placer:get_player_name() or ""
|
local name = placer and placer:get_player_name() or ""
|
||||||
|
|
||||||
-- check for protection
|
-- check for protection
|
||||||
if core.is_protected(pt.above, name) then return end
|
if minetest.is_protected(pt.above, name) then return end
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
core.set_node(pt.above, {name = plantname})
|
minetest.set_node(pt.above, {name = plantname})
|
||||||
|
|
||||||
core.sound_play("default_place_node", {pos = pt.above, gain = 1.0}, true)
|
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}, true)
|
||||||
|
|
||||||
if placer and not farming.is_creative(placer:get_player_name()) then
|
if placer and not farming.is_creative(placer:get_player_name()) then
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check for refill
|
-- check for refill
|
||||||
if itemstack:get_count() == 0 then
|
if itemstack:get_count() == 0 then
|
||||||
|
|
||||||
core.after(0.20, farming.refill_plant, placer,
|
minetest.after(0.20, farming.refill_plant, placer,
|
||||||
"farming:cocoa_beans_raw", placer:get_wield_index())
|
"farming:cocoa_beans_raw", placer:get_wield_index())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -56,7 +56,7 @@ end
|
|||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:cocoa_beans_raw", {
|
minetest.register_craftitem("farming:cocoa_beans_raw", {
|
||||||
description = S("Raw Cocoa Beans"),
|
description = S("Raw Cocoa Beans"),
|
||||||
inventory_image = "farming_cocoa_beans.png^[brighten",
|
inventory_image = "farming_cocoa_beans.png^[brighten",
|
||||||
groups = {compostability = 48, seed = 1, flammable = 2},
|
groups = {compostability = 48, seed = 1, flammable = 2},
|
||||||
@ -90,7 +90,7 @@ local def = {
|
|||||||
-- custom function that returns True when conditions are met
|
-- custom function that returns True when conditions are met
|
||||||
growth_check = function(pos, node_name)
|
growth_check = function(pos, node_name)
|
||||||
|
|
||||||
if core.find_node_near(pos, 1,
|
if minetest.find_node_near(pos, 1,
|
||||||
{"default:jungletree", "mcl_core:jungletree"}) then
|
{"default:jungletree", "mcl_core:jungletree"}) then
|
||||||
return true -- place next growth stage
|
return true -- place next growth stage
|
||||||
end
|
end
|
||||||
@ -101,22 +101,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:cocoa_1", table.copy(def))
|
minetest.register_node("farming:cocoa_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cocoa_2.png"}
|
def.tiles = {"farming_cocoa_2.png"}
|
||||||
core.register_node("farming:cocoa_2", table.copy(def))
|
minetest.register_node("farming:cocoa_2", table.copy(def))
|
||||||
|
|
||||||
-- stage3
|
-- stage3
|
||||||
|
|
||||||
def.tiles = {"farming_cocoa_3.png"}
|
def.tiles = {"farming_cocoa_3.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:cocoa_beans_raw"}, rarity = 1}
|
{items = {"farming:cocoa_beans_raw 1"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cocoa_3", table.copy(def))
|
minetest.register_node("farming:cocoa_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -126,11 +126,11 @@ def.growth_check = nil
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:cocoa_beans_raw 2"}, rarity = 1},
|
{items = {"farming:cocoa_beans_raw 2"}, rarity = 1},
|
||||||
{items = {"farming:cocoa_beans_raw"}, rarity = 2},
|
{items = {"farming:cocoa_beans_raw 1"}, rarity = 2},
|
||||||
{items = {"farming:cocoa_beans_raw"}, rarity = 3}
|
{items = {"farming:cocoa_beans_raw 1"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cocoa_4", table.copy(def))
|
minetest.register_node("farming:cocoa_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -143,44 +143,10 @@ farming.registered_plants["farming:cocoa_beans"] = {
|
|||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- add random cocoa pods to jungle tree's
|
-- register async mapgen script
|
||||||
|
|
||||||
local random = math.random -- localise for speed
|
if minetest.register_mapgen_script then
|
||||||
|
minetest.register_mapgen_script(farming.path .. "/crops/cocoa_mapgen.lua")
|
||||||
core.register_on_generated(function(minp, maxp)
|
else
|
||||||
|
dofile(farming.path .. "/crops/cocoa_mapgen.lua")
|
||||||
if maxp.y < 0 then return end
|
end
|
||||||
|
|
||||||
local pos, dir
|
|
||||||
local cocoa = core.find_nodes_in_area(minp, maxp,
|
|
||||||
{"default:jungletree", "mcl_core:jungletree"})
|
|
||||||
|
|
||||||
for n = 1, #cocoa do
|
|
||||||
|
|
||||||
pos = cocoa[n]
|
|
||||||
|
|
||||||
if core.find_node_near(pos, 1,
|
|
||||||
{"default:jungleleaves", "moretrees:jungletree_leaves_green",
|
|
||||||
"mcl_core:jungleleaves"}) then
|
|
||||||
|
|
||||||
dir = random(80)
|
|
||||||
|
|
||||||
if dir == 1 then pos.x = pos.x + 1
|
|
||||||
elseif dir == 2 then pos.x = pos.x - 1
|
|
||||||
elseif dir == 3 then pos.z = pos.z + 1
|
|
||||||
elseif dir == 4 then pos.z = pos.z - 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if dir < 5
|
|
||||||
and core.get_node(pos).name == "air"
|
|
||||||
and core.get_node_light(pos) > 12 then
|
|
||||||
|
|
||||||
--print ("Cocoa Pod added at " .. core.pos_to_string(pos))
|
|
||||||
|
|
||||||
core.set_node(pos, {
|
|
||||||
name = "farming:cocoa_" .. tostring(random(4))
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
58
crops/cocoa_mapgen.lua
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
-- Localize things for speed
|
||||||
|
|
||||||
|
local random = math.random
|
||||||
|
local jungletree_nodes = {"default:jungletree", "mcl_core:jungletree"}
|
||||||
|
local jungletree_leaves = {
|
||||||
|
"default:jungleleaves", "moretrees:jungletree_leaves_green", "mcl_core:jungleleaves"}
|
||||||
|
|
||||||
|
-- check area to place cocoa pods near jungle trees
|
||||||
|
|
||||||
|
local function generate(vmanip, minp, maxp)
|
||||||
|
|
||||||
|
if maxp.y < 0 then return end
|
||||||
|
|
||||||
|
local min, max = vmanip:get_emerged_area()
|
||||||
|
local area = VoxelArea:new({MinEdge = min, MaxEdge = max})
|
||||||
|
local data = vmanip:get_light_data()
|
||||||
|
local cocoa = minetest.find_nodes_in_area(minp, maxp, jungletree_nodes)
|
||||||
|
|
||||||
|
for n = 1, #cocoa do
|
||||||
|
|
||||||
|
local pos = cocoa[n]
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, jungletree_leaves) then
|
||||||
|
|
||||||
|
local dir = random(80)
|
||||||
|
|
||||||
|
if dir == 1 then pos.x = pos.x + 1
|
||||||
|
elseif dir == 2 then pos.x = pos.x - 1
|
||||||
|
elseif dir == 3 then pos.z = pos.z + 1
|
||||||
|
elseif dir == 4 then pos.z = pos.z -1
|
||||||
|
end
|
||||||
|
|
||||||
|
if dir < 5 and minetest.get_node(pos).name == "air" then
|
||||||
|
|
||||||
|
local index = area:index(pos.x, pos.y, pos.z)
|
||||||
|
|
||||||
|
if data[index] > 12 then -- light at pos > 12
|
||||||
|
|
||||||
|
minetest.set_node(pos, {name = "farming:cocoa_" .. random(4)})
|
||||||
|
--print("Cocoa Pod added at " .. minetest.pos_to_string(pos))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- mapgen
|
||||||
|
|
||||||
|
if minetest.save_gen_notify then -- async env (5.9+)
|
||||||
|
minetest.register_on_generated(function(vmanip, minp, maxp, blockseed)
|
||||||
|
generate(vmanip, minp, maxp)
|
||||||
|
end)
|
||||||
|
else -- main thread (5.8 and earlier)
|
||||||
|
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||||
|
generate(minetest.get_mapgen_object("voxelmanip"), minp, maxp)
|
||||||
|
end)
|
||||||
|
end
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:coffee_beans", {
|
minetest.register_craftitem("farming:coffee_beans", {
|
||||||
description = S("Coffee Beans"),
|
description = S("Coffee Beans"),
|
||||||
inventory_image = "farming_coffee_beans.png",
|
inventory_image = "farming_coffee_beans.png",
|
||||||
groups = {compostability = 48, seed = 2, food_coffee = 1, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_coffee = 1, flammable = 2},
|
||||||
@ -37,22 +37,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:coffee_1", table.copy(def))
|
minetest.register_node("farming:coffee_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_2.png"}
|
def.tiles = {"farming_coffee_2.png"}
|
||||||
core.register_node("farming:coffee_2", table.copy(def))
|
minetest.register_node("farming:coffee_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_3.png"}
|
def.tiles = {"farming_coffee_3.png"}
|
||||||
core.register_node("farming:coffee_3", table.copy(def))
|
minetest.register_node("farming:coffee_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_4.png"}
|
def.tiles = {"farming_coffee_4.png"}
|
||||||
core.register_node("farming:coffee_4", table.copy(def))
|
minetest.register_node("farming:coffee_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -62,11 +62,11 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:coffee_beans 2"}, rarity = 1},
|
{items = {"farming:coffee_beans 2"}, rarity = 1},
|
||||||
{items = {"farming:coffee_beans"}, rarity = 2},
|
{items = {"farming:coffee_beans 2"}, rarity = 2},
|
||||||
{items = {"farming:coffee_beans"}, rarity = 3}
|
{items = {"farming:coffee_beans 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:coffee_5", table.copy(def))
|
minetest.register_node("farming:coffee_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -80,19 +80,18 @@ farming.registered_plants["farming:coffee"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
local spawn_on = {
|
local mg = farming.mapgen == "v6"
|
||||||
"default:dirt_with_dry_grass", "default:dirt_with_rainforest_litter",
|
|
||||||
"default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass",
|
def = {
|
||||||
"ethereal:prairie_dirt"
|
y_max = mg and 50 or 55,
|
||||||
|
spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
||||||
|
"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass",
|
||||||
|
"mcl_core:dirt_with_grass"}
|
||||||
}
|
}
|
||||||
|
|
||||||
if farming.mapgen == "v6" then
|
minetest.register_decoration({
|
||||||
spawn_on = {"default:dirt_with_grass"}
|
|
||||||
end
|
|
||||||
|
|
||||||
core.register_decoration({
|
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = spawn_on,
|
place_on = def.spawn_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -102,6 +101,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 20, y_max = 55,
|
y_min = 20,
|
||||||
|
y_max = def.y_max,
|
||||||
decoration = "farming:coffee_5"
|
decoration = "farming:coffee_5"
|
||||||
})
|
})
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and
|
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:corn", {
|
minetest.register_craftitem("farming:corn", {
|
||||||
description = S("Corn"),
|
description = S("Corn"),
|
||||||
inventory_image = "farming_corn.png",
|
inventory_image = "farming_corn.png",
|
||||||
groups = {compostability = 45, seed = 2, food_corn = 1},
|
groups = {compostability = 45, seed = 2, food_corn = 1},
|
||||||
on_use = core.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
|
||||||
@ -45,33 +45,33 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:corn_1", table.copy(def))
|
minetest.register_node("farming:corn_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_corn_2.png"}
|
def.tiles = {"farming_corn_2.png"}
|
||||||
core.register_node("farming:corn_2", table.copy(def))
|
minetest.register_node("farming:corn_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_corn_3.png"}
|
def.tiles = {"farming_corn_3.png"}
|
||||||
core.register_node("farming:corn_3", table.copy(def))
|
minetest.register_node("farming:corn_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_corn_4.png"}
|
def.tiles = {"farming_corn_4.png"}
|
||||||
core.register_node("farming:corn_4", table.copy(def))
|
minetest.register_node("farming:corn_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_corn_5.png"}
|
def.tiles = {"farming_corn_5.png"}
|
||||||
core.register_node("farming:corn_5", table.copy(def))
|
minetest.register_node("farming:corn_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_corn_6.png"}
|
def.tiles = {"farming_corn_6.png"}
|
||||||
def.visual_scale = 1.9
|
def.visual_scale = 1.9
|
||||||
core.register_node("farming:corn_6", table.copy(def))
|
minetest.register_node("farming:corn_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -79,10 +79,11 @@ def.tiles = {"farming_corn_7.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:corn"}, rarity = 1},
|
{items = {"farming:corn"}, rarity = 1},
|
||||||
|
{items = {"farming:corn"}, rarity = 2},
|
||||||
{items = {"farming:corn"}, rarity = 3}
|
{items = {"farming:corn"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:corn_7", table.copy(def))
|
minetest.register_node("farming:corn_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -92,11 +93,11 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:corn 2"}, rarity = 1},
|
{items = {"farming:corn 2"}, rarity = 1},
|
||||||
{items = {"farming:corn"}, rarity = 2},
|
{items = {"farming:corn 2"}, rarity = 2},
|
||||||
{items = {"farming:corn"}, rarity = 3}
|
{items = {"farming:corn 2"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:corn_8", table.copy(def))
|
minetest.register_node("farming:corn_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -110,11 +111,9 @@ farming.registered_plants["farming:corn"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -124,6 +123,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 12, y_max = 27,
|
y_min = 12,
|
||||||
|
y_max = 25,
|
||||||
decoration = "farming:corn_7"
|
decoration = "farming:corn_7"
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_cotton", {
|
minetest.register_node("farming:seed_cotton", {
|
||||||
description = S("Cotton Seed"),
|
description = S("Cotton Seed"),
|
||||||
tiles = {"farming_cotton_seed.png"},
|
tiles = {"farming_cotton_seed.png"},
|
||||||
inventory_image = "farming_cotton_seed.png",
|
inventory_image = "farming_cotton_seed.png",
|
||||||
@ -27,13 +27,13 @@ core.register_node("farming:seed_cotton", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:cotton_1", param2 = 1})
|
minetest.set_node(pos, {name = "farming:cotton_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:cotton", {
|
minetest.register_craftitem("farming:cotton", {
|
||||||
description = S("Cotton"),
|
description = S("Cotton"),
|
||||||
inventory_image = "farming_cotton.png",
|
inventory_image = "farming_cotton.png",
|
||||||
groups = {flammable = 4, compostability = 50}
|
groups = {flammable = 4, compostability = 50}
|
||||||
@ -63,22 +63,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:cotton_1", table.copy(def))
|
minetest.register_node("farming:cotton_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_2.png"}
|
def.tiles = {"farming_cotton_2.png"}
|
||||||
core.register_node("farming:cotton_2", table.copy(def))
|
minetest.register_node("farming:cotton_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_3.png"}
|
def.tiles = {"farming_cotton_3.png"}
|
||||||
core.register_node("farming:cotton_3", table.copy(def))
|
minetest.register_node("farming:cotton_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_4.png"}
|
def.tiles = {"farming_cotton_4.png"}
|
||||||
core.register_node("farming:cotton_4", table.copy(def))
|
minetest.register_node("farming:cotton_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
@ -88,23 +88,31 @@ def.drop = {
|
|||||||
{items = {"farming:seed_cotton"}, rarity = 1}
|
{items = {"farming:seed_cotton"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cotton_5", table.copy(def))
|
minetest.register_node("farming:cotton_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_6.png"}
|
def.tiles = {"farming_cotton_6.png"}
|
||||||
core.register_node("farming:cotton_6", table.copy(def))
|
def.drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"farming:cotton"}, rarity = 1},
|
||||||
|
{items = {"farming:cotton"}, rarity = 2}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
minetest.register_node("farming:cotton_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_7.png"}
|
def.tiles = {"farming_cotton_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
|
{items = {"farming:cotton"}, rarity = 1},
|
||||||
{items = {"farming:cotton"}, rarity = 2},
|
{items = {"farming:cotton"}, rarity = 2},
|
||||||
{items = {"farming:seed_cotton"}, rarity = 1}
|
{items = {"farming:seed_cotton"}, rarity = 1},
|
||||||
|
{items = {"farming:seed_cotton"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cotton_7", table.copy(def))
|
minetest.register_node("farming:cotton_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -121,7 +129,7 @@ def.drop = {
|
|||||||
{items = {"farming:seed_cotton"}, rarity = 3}
|
{items = {"farming:seed_cotton"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cotton_8", table.copy(def))
|
minetest.register_node("farming:cotton_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -135,7 +143,7 @@ farming.registered_plants["farming:cotton"] = {
|
|||||||
|
|
||||||
-- wild cotton (this is what you find on the map)
|
-- wild cotton (this is what you find on the map)
|
||||||
|
|
||||||
core.register_node("farming:cotton_wild", {
|
minetest.register_node("farming:cotton_wild", {
|
||||||
description = S("Wild Cotton"),
|
description = S("Wild Cotton"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
waving = 1,
|
waving = 1,
|
||||||
@ -164,32 +172,34 @@ core.register_node("farming:cotton_wild", {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
local spawn_on = {
|
local mg = farming.mapgen == "v6"
|
||||||
"default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass",
|
|
||||||
"mcl_core:dirt_with_grass"
|
def = {
|
||||||
|
grow_on = mg and {"default:dirt_with_grass"} or {"default:dry_dirt_with_dry_grass",
|
||||||
|
"mcl_core:dirt_with_grass"},
|
||||||
|
biome = mg and {"jungle"} or {"savanna"}
|
||||||
}
|
}
|
||||||
|
|
||||||
if farming.mapgen == "v6" then
|
minetest.register_decoration({
|
||||||
spawn_on = {"default:dirt_with_grass"}
|
|
||||||
end
|
|
||||||
|
|
||||||
core.register_decoration({
|
|
||||||
name = "farming:cotton_wild",
|
name = "farming:cotton_wild",
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = spawn_on,
|
place_on = def.grow_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = -0.1,
|
||||||
scale = farming.cotton,
|
scale = 0.1,
|
||||||
spread = {x = 100, y = 100, z = 100},
|
spread = {x = 50, y = 50, z = 50},
|
||||||
seed = 4242,
|
seed = 4242,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.7
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 120,
|
biomes = def.biome,
|
||||||
|
y_max = 31000,
|
||||||
|
y_min = 1,
|
||||||
decoration = "farming:cotton_wild"
|
decoration = "farming:cotton_wild"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
--[[ Cotton using api
|
--[[ Cotton using api
|
||||||
farming.register_plant("farming:cotton", {
|
farming.register_plant("farming:cotton", {
|
||||||
description = "Cotton seed",
|
description = "Cotton seed",
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
Original textures from DocFarming mod
|
Original textures from DocFarming mod
|
||||||
https://forum.core.net/viewtopic.php?id=3948
|
https://forum.minetest.net/viewtopic.php?id=3948
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:cucumber", {
|
minetest.register_craftitem("farming:cucumber", {
|
||||||
description = S("Cucumber"),
|
description = S("Cucumber"),
|
||||||
inventory_image = "farming_cucumber.png",
|
inventory_image = "farming_cucumber.png",
|
||||||
groups = {compostability = 48, seed = 2, food_cucumber = 1},
|
groups = {compostability = 48, seed = 2, food_cucumber = 1},
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
|
||||||
@ -43,17 +43,17 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:cucumber_1", table.copy(def))
|
minetest.register_node("farming:cucumber_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cucumber_2.png"}
|
def.tiles = {"farming_cucumber_2.png"}
|
||||||
core.register_node("farming:cucumber_2", table.copy(def))
|
minetest.register_node("farming:cucumber_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cucumber_3.png"}
|
def.tiles = {"farming_cucumber_3.png"}
|
||||||
core.register_node("farming:cucumber_3", table.copy(def))
|
minetest.register_node("farming:cucumber_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:cucumber 2"}, rarity = 1},
|
{items = {"farming:cucumber 2"}, rarity = 1},
|
||||||
{items = {"farming:cucumber"}, rarity = 2}
|
{items = {"farming:cucumber 2"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:cucumber_4", table.copy(def))
|
minetest.register_node("farming:cucumber_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -80,11 +80,16 @@ farming.registered_plants["farming:cucumber"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
near = mg and "group:water" or nil,
|
||||||
|
num = mg and 1 or -1,
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -94,7 +99,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 20,
|
y_min = 1,
|
||||||
|
y_max = 20,
|
||||||
decoration = "farming:cucumber_4",
|
decoration = "farming:cucumber_4",
|
||||||
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
spawn_by = def.near,
|
||||||
|
num_spawn_by = def.num
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:eggplant", {
|
minetest.register_craftitem("farming:eggplant", {
|
||||||
description = S("Eggplant"),
|
description = S("Eggplant"),
|
||||||
inventory_image = "farming_eggplant.png",
|
inventory_image = "farming_eggplant.png",
|
||||||
groups = {compostability = 48, seed = 2, food_eggplant = 1},
|
groups = {compostability = 48, seed = 2, food_eggplant = 1},
|
||||||
on_use = core.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:eggplant_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:eggplant_1")
|
||||||
@ -41,12 +41,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:eggplant_1", table.copy(def))
|
minetest.register_node("farming:eggplant_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_eggplant_2.png"}
|
def.tiles = {"farming_eggplant_2.png"}
|
||||||
core.register_node("farming:eggplant_2", table.copy(def))
|
minetest.register_node("farming:eggplant_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ def.drop = {
|
|||||||
{items = {"farming:eggplant"}, rarity = 3}
|
{items = {"farming:eggplant"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:eggplant_3", table.copy(def))
|
minetest.register_node("farming:eggplant_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:eggplant 2"}, rarity = 1},
|
{items = {"farming:eggplant 2"}, rarity = 1},
|
||||||
{items = {"farming:eggplant"}, rarity = 2}
|
{items = {"farming:eggplant 2"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:eggplant_4", table.copy(def))
|
minetest.register_node("farming:eggplant_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -84,19 +84,21 @@ farming.registered_plants["farming:eggplant"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = -0.1,
|
||||||
scale = farming.eggplant,
|
scale = farming.eggplant,
|
||||||
spread = {x = 100, y = 100, z = 100},
|
spread = {x = 100, y = 100, z = 100},
|
||||||
seed = 356,
|
seed = 356,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 40,
|
biomes = {"deciduous_forest"},
|
||||||
decoration = "farming:eggplant_3",
|
y_max = 31000,
|
||||||
|
y_min = 1,
|
||||||
|
decoration = "farming:eggplant_4",
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:garlic_clove", {
|
minetest.register_craftitem("farming:garlic_clove", {
|
||||||
description = S("Garlic clove"),
|
description = S("Garlic clove"),
|
||||||
inventory_image = "crops_garlic_clove.png",
|
inventory_image = "crops_garlic_clove.png",
|
||||||
groups = {compostability = 35, seed = 2, food_garlic_clove = 1, flammable = 3},
|
groups = {compostability = 35, seed = 2, food_garlic_clove = 1, flammable = 3},
|
||||||
@ -39,22 +39,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:garlic_1", table.copy(def))
|
minetest.register_node("farming:garlic_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"crops_garlic_plant_2.png"}
|
def.tiles = {"crops_garlic_plant_2.png"}
|
||||||
core.register_node("farming:garlic_2", table.copy(def))
|
minetest.register_node("farming:garlic_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"crops_garlic_plant_3.png"}
|
def.tiles = {"crops_garlic_plant_3.png"}
|
||||||
core.register_node("farming:garlic_3", table.copy(def))
|
minetest.register_node("farming:garlic_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"crops_garlic_plant_4.png"}
|
def.tiles = {"crops_garlic_plant_4.png"}
|
||||||
core.register_node("farming:garlic_4", table.copy(def))
|
minetest.register_node("farming:garlic_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
@ -63,12 +63,12 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:garlic 2"}, rarity = 1},
|
{items = {"farming:garlic 3"}, rarity = 1},
|
||||||
{items = {"farming:garlic"}, rarity = 2},
|
{items = {"farming:garlic"}, rarity = 2},
|
||||||
{items = {"farming:garlic"}, rarity = 3}
|
{items = {"farming:garlic"}, rarity = 5}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:garlic_5", table.copy(def))
|
minetest.register_node("farming:garlic_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -82,12 +82,9 @@ farming.registered_plants["farming:garlic"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt",
|
|
||||||
"default:dirt_with_rainforest_litter"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -97,7 +94,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 45,
|
y_min = 3,
|
||||||
|
y_max = 35,
|
||||||
decoration = "farming:garlic_5",
|
decoration = "farming:garlic_5",
|
||||||
spawn_by = "group:tree", num_spawn_by = 1
|
spawn_by = "group:tree",
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:ginger", {
|
minetest.register_craftitem("farming:ginger", {
|
||||||
description = S("Ginger"),
|
description = S("Ginger"),
|
||||||
inventory_image = "farming_ginger.png",
|
inventory_image = "farming_ginger.png",
|
||||||
groups = {compostability = 48, seed = 2, food_ginger = 1},
|
groups = {compostability = 48, seed = 2, food_ginger = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:ginger_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:ginger_1")
|
||||||
@ -40,12 +40,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:ginger_1", table.copy(def))
|
minetest.register_node("farming:ginger_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_ginger_2.png"}
|
def.tiles = {"farming_ginger_2.png"}
|
||||||
core.register_node("farming:ginger_2", table.copy(def))
|
minetest.register_node("farming:ginger_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ def.drop = {
|
|||||||
{items = {"farming:ginger"}, rarity = 3}
|
{items = {"farming:ginger"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:ginger_3", table.copy(def))
|
minetest.register_node("farming:ginger_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -66,11 +66,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:ginger 2"}, rarity = 1},
|
{items = {"farming:ginger 2"}, rarity = 1},
|
||||||
{items = {"farming:ginger"}, rarity = 2},
|
{items = {"farming:ginger 2"}, rarity = 2}
|
||||||
{items = {"farming:ginger"}, rarity = 3}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:ginger_4", table.copy(def))
|
minetest.register_node("farming:ginger_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -78,19 +77,16 @@ farming.registered_plants["farming:ginger"] = {
|
|||||||
crop = "farming:ginger",
|
crop = "farming:ginger",
|
||||||
seed = "farming:ginger",
|
seed = "farming:ginger",
|
||||||
minlight = 5,
|
minlight = 5,
|
||||||
maxlight = core.LIGHT_MAX,
|
maxlight = minetest.LIGHT_MAX,
|
||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
name = "farming:ginger_4",
|
name = "farming:ginger_4",
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass",
|
|
||||||
"ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -100,7 +96,8 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 80,
|
y_max = 80,
|
||||||
|
y_min = 1,
|
||||||
decoration = "farming:ginger_3",
|
decoration = "farming:ginger_3",
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- place trellis helper
|
-- place trellis helper
|
||||||
|
|
||||||
@ -10,14 +10,14 @@ local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then return end
|
if not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not core.registered_nodes[under.name] then return end
|
if not minetest.registered_nodes[under.name] then return end
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if placer and itemstack and def and def.on_rightclick then
|
if placer and itemstack and def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
@ -27,15 +27,15 @@ local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
|||||||
local name = placer and placer:get_player_name() or ""
|
local name = placer and placer:get_player_name() or ""
|
||||||
|
|
||||||
-- check for protection
|
-- check for protection
|
||||||
if core.is_protected(pt.under, name) then return end
|
if minetest.is_protected(pt.under, name) then return end
|
||||||
|
|
||||||
-- check if pointing at trellis
|
-- check if pointing at trellis
|
||||||
if under.name ~= "farming:trellis" then return end
|
if under.name ~= "farming:trellis" then return end
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
core.set_node(pt.under, {name = plantname})
|
minetest.set_node(pt.under, {name = plantname})
|
||||||
|
|
||||||
core.sound_play("default_place_node", {pos = pt.under, gain = 1.0}, true)
|
minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0}, true)
|
||||||
|
|
||||||
if placer and not farming.is_creative(placer:get_player_name()) then
|
if placer and not farming.is_creative(placer:get_player_name()) then
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check for refill
|
-- check for refill
|
||||||
if itemstack:get_count() == 0 then
|
if itemstack:get_count() == 0 then
|
||||||
|
|
||||||
core.after(0.20, farming.refill_plant, placer,
|
minetest.after(0.20, farming.refill_plant, placer,
|
||||||
"farming:grapes", placer:get_wield_index()
|
"farming:grapes", placer:get_wield_index()
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -55,11 +55,11 @@ end
|
|||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:grapes", {
|
minetest.register_craftitem("farming:grapes", {
|
||||||
description = S("Grapes"),
|
description = S("Grapes"),
|
||||||
inventory_image = "farming_grapes.png",
|
inventory_image = "farming_grapes.png",
|
||||||
groups = {compostability = 48, seed = 2, food_grapes = 1},
|
groups = {compostability = 48, seed = 2, food_grapes = 1},
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
|
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
|
||||||
@ -70,7 +70,7 @@ farming.add_eatable("farming:grapes", 2)
|
|||||||
|
|
||||||
-- trellis
|
-- trellis
|
||||||
|
|
||||||
core.register_node("farming:trellis", {
|
minetest.register_node("farming:trellis", {
|
||||||
description = S("Trellis (place on soil before planting grapes)"),
|
description = S("Trellis (place on soil before planting grapes)"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_trellis.png"},
|
tiles = {"farming_trellis.png"},
|
||||||
@ -93,26 +93,26 @@ core.register_node("farming:trellis", {
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then return end
|
if not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not core.registered_nodes[under.name] then return end
|
if not minetest.registered_nodes[under.name] then return end
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if def and def.on_rightclick then
|
if def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.is_protected(pt.above, placer:get_player_name()) then
|
if minetest.is_protected(pt.above, placer:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodename = under.name
|
local nodename = under.name
|
||||||
|
|
||||||
if core.get_item_group(nodename, "soil") < 2 then return end
|
if minetest.get_item_group(nodename, "soil") < 2 then return end
|
||||||
|
|
||||||
local top = {
|
local top = {
|
||||||
x = pointed_thing.above.x,
|
x = pointed_thing.above.x,
|
||||||
@ -120,11 +120,11 @@ core.register_node("farming:trellis", {
|
|||||||
z = pointed_thing.above.z
|
z = pointed_thing.above.z
|
||||||
}
|
}
|
||||||
|
|
||||||
nodename = core.get_node(top).name
|
nodename = minetest.get_node(top).name
|
||||||
|
|
||||||
if nodename ~= "air" then return end
|
if nodename ~= "air" then return end
|
||||||
|
|
||||||
core.set_node(pointed_thing.above, {name = "farming:trellis"})
|
minetest.set_node(pointed_thing.above, {name = "farming:trellis"})
|
||||||
|
|
||||||
if not farming.is_creative(placer:get_player_name()) then
|
if not farming.is_creative(placer:get_player_name()) then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
@ -162,37 +162,37 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:grapes_1", table.copy(def))
|
minetest.register_node("farming:grapes_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_2.png"}
|
def.tiles = {"farming_grapes_2.png"}
|
||||||
core.register_node("farming:grapes_2", table.copy(def))
|
minetest.register_node("farming:grapes_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_3.png"}
|
def.tiles = {"farming_grapes_3.png"}
|
||||||
core.register_node("farming:grapes_3", table.copy(def))
|
minetest.register_node("farming:grapes_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_4.png"}
|
def.tiles = {"farming_grapes_4.png"}
|
||||||
core.register_node("farming:grapes_4", table.copy(def))
|
minetest.register_node("farming:grapes_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_5.png"}
|
def.tiles = {"farming_grapes_5.png"}
|
||||||
core.register_node("farming:grapes_5", table.copy(def))
|
minetest.register_node("farming:grapes_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_6.png"}
|
def.tiles = {"farming_grapes_6.png"}
|
||||||
core.register_node("farming:grapes_6", table.copy(def))
|
minetest.register_node("farming:grapes_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_7.png"}
|
def.tiles = {"farming_grapes_7.png"}
|
||||||
core.register_node("farming:grapes_7", table.copy(def))
|
minetest.register_node("farming:grapes_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -202,13 +202,12 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:trellis"}, rarity = 1},
|
{items = {"farming:trellis"}, rarity = 1},
|
||||||
{items = {"farming:grapes 2"}, rarity = 1},
|
{items = {"farming:grapes 3"}, rarity = 1},
|
||||||
{items = {"farming:grapes"}, rarity = 2},
|
{items = {"farming:grapes 1"}, rarity = 2},
|
||||||
{items = {"farming:grapes"}, rarity = 3},
|
{items = {"farming:grapes 1"}, rarity = 3}
|
||||||
{items = {"farming:grapes"}, rarity = 4}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:grapes_8", table.copy(def))
|
minetest.register_node("farming:grapes_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -223,7 +222,7 @@ farming.registered_plants["farming:grapes"] = {
|
|||||||
|
|
||||||
-- wild grape vine (this is what you find on the map)
|
-- wild grape vine (this is what you find on the map)
|
||||||
|
|
||||||
core.register_node("farming:grapebush", {
|
minetest.register_node("farming:grapebush", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_grapebush.png"},
|
tiles = {"farming_grapebush.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -233,9 +232,9 @@ core.register_node("farming:grapebush", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:grapes"}, rarity = 1},
|
{items = {"farming:grapes 1"}, rarity = 1},
|
||||||
{items = {"farming:grapes"}, rarity = 2},
|
{items = {"farming:grapes 1"}, rarity = 2},
|
||||||
{items = {"farming:grapes"}, rarity = 3}
|
{items = {"farming:grapes 1"}, rarity = 3}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
@ -249,11 +248,9 @@ core.register_node("farming:grapebush", {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -263,6 +260,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 25, y_max = 50,
|
y_min = 25,
|
||||||
|
y_max = 50,
|
||||||
decoration = "farming:grapebush"
|
decoration = "farming:grapebush"
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_hemp", {
|
minetest.register_node("farming:seed_hemp", {
|
||||||
description = S("Hemp Seed"),
|
description = S("Hemp Seed"),
|
||||||
tiles = {"farming_hemp_seed.png"},
|
tiles = {"farming_hemp_seed.png"},
|
||||||
inventory_image = "farming_hemp_seed.png",
|
inventory_image = "farming_hemp_seed.png",
|
||||||
@ -27,13 +27,13 @@ core.register_node("farming:seed_hemp", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:hemp_1", param2 = 1})
|
minetest.set_node(pos, {name = "farming:hemp_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:hemp_leaf", {
|
minetest.register_craftitem("farming:hemp_leaf", {
|
||||||
description = S("Hemp Leaf"),
|
description = S("Hemp Leaf"),
|
||||||
inventory_image = "farming_hemp_leaf.png",
|
inventory_image = "farming_hemp_leaf.png",
|
||||||
groups = {compostability = 35}
|
groups = {compostability = 35}
|
||||||
@ -63,27 +63,27 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:hemp_1", table.copy(def))
|
minetest.register_node("farming:hemp_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_2.png"}
|
def.tiles = {"farming_hemp_2.png"}
|
||||||
core.register_node("farming:hemp_2", table.copy(def))
|
minetest.register_node("farming:hemp_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_3.png"}
|
def.tiles = {"farming_hemp_3.png"}
|
||||||
core.register_node("farming:hemp_3", table.copy(def))
|
minetest.register_node("farming:hemp_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_4.png"}
|
def.tiles = {"farming_hemp_4.png"}
|
||||||
core.register_node("farming:hemp_4", table.copy(def))
|
minetest.register_node("farming:hemp_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_5.png"}
|
def.tiles = {"farming_hemp_5.png"}
|
||||||
core.register_node("farming:hemp_5", table.copy(def))
|
minetest.register_node("farming:hemp_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ def.drop = {
|
|||||||
{items = {"farming:seed_hemp"}, rarity = 1}
|
{items = {"farming:seed_hemp"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:hemp_6", table.copy(def))
|
minetest.register_node("farming:hemp_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ def.drop = {
|
|||||||
{items = {"farming:seed_hemp"}, rarity = 3}
|
{items = {"farming:seed_hemp"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:hemp_7", table.copy(def))
|
minetest.register_node("farming:hemp_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -118,11 +118,11 @@ def.drop = {
|
|||||||
items = {
|
items = {
|
||||||
{items = {"farming:hemp_leaf 2"}, rarity = 1},
|
{items = {"farming:hemp_leaf 2"}, rarity = 1},
|
||||||
{items = {"farming:hemp_leaf"}, rarity = 2},
|
{items = {"farming:hemp_leaf"}, rarity = 2},
|
||||||
{items = {"farming:seed_hemp 2"}, rarity = 1},
|
{items = {"farming:seed_hemp"}, rarity = 1},
|
||||||
{items = {"farming:seed_hemp"}, rarity = 2}
|
{items = {"farming:seed_hemp"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:hemp_8", table.copy(def))
|
minetest.register_node("farming:hemp_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -136,11 +136,11 @@ farming.registered_plants["farming:hemp"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {
|
||||||
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
||||||
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
"mcl_core:dirt_with_grass"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -151,7 +151,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 45,
|
y_min = 3,
|
||||||
|
y_max = 45,
|
||||||
decoration = "farming:hemp_7",
|
decoration = "farming:hemp_7",
|
||||||
spawn_by = "group:tree", num_spawn_by = 1
|
spawn_by = "group:tree",
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:lettuce", {
|
minetest.register_craftitem("farming:lettuce", {
|
||||||
description = S("Lettuce"),
|
description = S("Lettuce"),
|
||||||
inventory_image = "farming_lettuce.png",
|
inventory_image = "farming_lettuce.png",
|
||||||
groups = {compostability = 48, seed = 2, food_lettuce = 1},
|
groups = {compostability = 48, seed = 2, food_lettuce = 1},
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1")
|
||||||
@ -39,22 +39,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:lettuce_1", table.copy(def))
|
minetest.register_node("farming:lettuce_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_2.png"}
|
def.tiles = {"farming_lettuce_2.png"}
|
||||||
core.register_node("farming:lettuce_2", table.copy(def))
|
minetest.register_node("farming:lettuce_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_3.png"}
|
def.tiles = {"farming_lettuce_3.png"}
|
||||||
core.register_node("farming:lettuce_3", table.copy(def))
|
minetest.register_node("farming:lettuce_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_4.png"}
|
def.tiles = {"farming_lettuce_4.png"}
|
||||||
core.register_node("farming:lettuce_4", table.copy(def))
|
minetest.register_node("farming:lettuce_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
@ -64,10 +64,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:lettuce 2"}, rarity = 1},
|
{items = {"farming:lettuce 2"}, rarity = 1},
|
||||||
{items = {"farming:lettuce"}, rarity = 3}
|
{items = {"farming:lettuce 1"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:lettuce_5", table.copy(def))
|
minetest.register_node("farming:lettuce_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -81,11 +81,9 @@ farming.registered_plants["farming:lettuce"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -95,6 +93,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 35,
|
y_min = 5,
|
||||||
|
y_max = 35,
|
||||||
decoration = "farming:lettuce_5"
|
decoration = "farming:lettuce_5"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:melon_slice", {
|
minetest.register_craftitem("farming:melon_slice", {
|
||||||
description = S("Melon Slice"),
|
description = S("Melon Slice"),
|
||||||
inventory_image = "farming_melon_slice.png",
|
inventory_image = "farming_melon_slice.png",
|
||||||
groups = {compostability = 48, seed = 2, food_melon_slice = 1},
|
groups = {compostability = 48, seed = 2, food_melon_slice = 1},
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
|
||||||
@ -39,41 +39,41 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:melon_1", table.copy(def))
|
minetest.register_node("farming:melon_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_melon_2.png"}
|
def.tiles = {"farming_melon_2.png"}
|
||||||
core.register_node("farming:melon_2", table.copy(def))
|
minetest.register_node("farming:melon_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_melon_3.png"}
|
def.tiles = {"farming_melon_3.png"}
|
||||||
core.register_node("farming:melon_3", table.copy(def))
|
minetest.register_node("farming:melon_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_melon_4.png"}
|
def.tiles = {"farming_melon_4.png"}
|
||||||
core.register_node("farming:melon_4", table.copy(def))
|
minetest.register_node("farming:melon_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_melon_5.png"}
|
def.tiles = {"farming_melon_5.png"}
|
||||||
core.register_node("farming:melon_5", table.copy(def))
|
minetest.register_node("farming:melon_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_melon_6.png"}
|
def.tiles = {"farming_melon_6.png"}
|
||||||
core.register_node("farming:melon_6", table.copy(def))
|
minetest.register_node("farming:melon_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_melon_7.png"}
|
def.tiles = {"farming_melon_7.png"}
|
||||||
core.register_node("farming:melon_7", table.copy(def))
|
minetest.register_node("farming:melon_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
core.register_node("farming:melon_8", {
|
minetest.register_node("farming:melon_8", {
|
||||||
description = S("Melon"),
|
description = S("Melon"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"farming_melon_top.png",
|
"farming_melon_top.png",
|
||||||
@ -88,7 +88,7 @@ core.register_node("farming:melon_8", {
|
|||||||
drop = "farming:melon_8",
|
drop = "farming:melon_8",
|
||||||
sounds = farming.node_sound_wood_defaults(),
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = core.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
@ -105,12 +105,19 @@ farming.registered_plants["farming:melon"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
y_max = mg and 20 or 6,
|
||||||
|
spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
||||||
|
"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"},
|
||||||
|
near = mg and "group:water" or nil,
|
||||||
|
num = mg and 1 or -1,
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = def.spawn_on,
|
||||||
"default:dirt_with_grass", "default:dirt_with_dry_grass",
|
|
||||||
"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -120,7 +127,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 3,
|
y_min = 1,
|
||||||
|
y_max = def.y_max,
|
||||||
decoration = "farming:melon_8",
|
decoration = "farming:melon_8",
|
||||||
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
spawn_by = def.near,
|
||||||
|
num_spawn_by = def.num
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_mint", {
|
minetest.register_node("farming:seed_mint", {
|
||||||
description = S("Mint Seeds"),
|
description = S("Mint Seeds"),
|
||||||
tiles = {"farming_mint_seeds.png"},
|
tiles = {"farming_mint_seeds.png"},
|
||||||
inventory_image = "farming_mint_seeds.png",
|
inventory_image = "farming_mint_seeds.png",
|
||||||
@ -27,13 +27,13 @@ core.register_node("farming:seed_mint", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:mint_1", param2 = 1})
|
minetest.set_node(pos, {name = "farming:mint_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:mint_leaf", {
|
minetest.register_craftitem("farming:mint_leaf", {
|
||||||
description = S("Mint Leaf"),
|
description = S("Mint Leaf"),
|
||||||
inventory_image = "farming_mint_leaf.png",
|
inventory_image = "farming_mint_leaf.png",
|
||||||
groups = {food_mint = 1, flammable = 4, compostability = 48}
|
groups = {food_mint = 1, flammable = 4, compostability = 48}
|
||||||
@ -62,17 +62,17 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:mint_1", table.copy(def))
|
minetest.register_node("farming:mint_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_mint_2.png"}
|
def.tiles = {"farming_mint_2.png"}
|
||||||
core.register_node("farming:mint_2", table.copy(def))
|
minetest.register_node("farming:mint_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_mint_3.png"}
|
def.tiles = {"farming_mint_3.png"}
|
||||||
core.register_node("farming:mint_3", table.copy(def))
|
minetest.register_node("farming:mint_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -82,12 +82,12 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:mint_leaf 2"}, rarity = 1},
|
{items = {"farming:mint_leaf 2"}, rarity = 1},
|
||||||
{items = {"farming:mint_leaf"}, rarity = 2},
|
{items = {"farming:mint_leaf 2"}, rarity = 2},
|
||||||
{items = {"farming:seed_mint 2"}, rarity = 1},
|
{items = {"farming:seed_mint 1"}, rarity = 1},
|
||||||
{items = {"farming:seed_mint"}, rarity = 2}
|
{items = {"farming:seed_mint 2"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:mint_4", table.copy(def))
|
minetest.register_node("farming:mint_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -101,11 +101,11 @@ farming.registered_plants["farming:mint"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {
|
||||||
"default:dirt_with_grass", "default:dirt_with_coniferous_litter",
|
"default:dirt_with_grass", "default:dirt_with_coniferous_litter",
|
||||||
"mcl_core:dirt_with_grass", "ethereal:bamboo_dirt"
|
"mcl_core:dirt_with_grass"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -116,7 +116,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 75,
|
y_min = 0,
|
||||||
|
y_max = 75,
|
||||||
decoration = "farming:mint_4",
|
decoration = "farming:mint_4",
|
||||||
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
spawn_by = {"group:water", "group:sand"},
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
--[[
|
--[[
|
||||||
Original textures from Crops Plus mod
|
Original textures from Crops Plus mod
|
||||||
Copyright (C) 2018 Grizzly Adam
|
Copyright (C) 2018 Grizzly Adam
|
||||||
https://forum.core.net/viewtopic.php?f=9&t=19488
|
https://forum.minetest.net/viewtopic.php?f=9&t=19488
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:onion", {
|
minetest.register_craftitem("farming:onion", {
|
||||||
description = S("Onion"),
|
description = S("Onion"),
|
||||||
inventory_image = "crops_onion.png",
|
inventory_image = "crops_onion.png",
|
||||||
groups = {compostability = 48, seed = 2, food_onion = 1},
|
groups = {compostability = 48, seed = 2, food_onion = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
|
||||||
@ -49,22 +49,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:onion_1", table.copy(def))
|
minetest.register_node("farming:onion_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"crops_onion_plant_2.png"}
|
def.tiles = {"crops_onion_plant_2.png"}
|
||||||
core.register_node("farming:onion_2", table.copy(def))
|
minetest.register_node("farming:onion_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"crops_onion_plant_3.png"}
|
def.tiles = {"crops_onion_plant_3.png"}
|
||||||
core.register_node("farming:onion_3", table.copy(def))
|
minetest.register_node("farming:onion_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"crops_onion_plant_4.png"}
|
def.tiles = {"crops_onion_plant_4.png"}
|
||||||
core.register_node("farming:onion_4", table.copy(def))
|
minetest.register_node("farming:onion_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
@ -72,13 +72,15 @@ def.tiles = {"crops_onion_plant_5.png"}
|
|||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 5, items = {
|
||||||
{items = {"farming:onion 2"}, rarity = 1},
|
{items = {"farming:onion"}, rarity = 1},
|
||||||
|
{items = {"farming:onion"}, rarity = 1},
|
||||||
{items = {"farming:onion"}, rarity = 2},
|
{items = {"farming:onion"}, rarity = 2},
|
||||||
{items = {"farming:onion"}, rarity = 4}
|
{items = {"farming:onion"}, rarity = 2},
|
||||||
|
{items = {"farming:onion"}, rarity = 5}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:onion_5", table.copy(def))
|
minetest.register_node("farming:onion_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -92,11 +94,9 @@ farming.registered_plants["farming:onion"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -106,6 +106,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 28,
|
y_min = 5,
|
||||||
|
y_max = 28,
|
||||||
decoration = "farming:onion_5"
|
decoration = "farming:onion_5"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:parsley", {
|
minetest.register_craftitem("farming:parsley", {
|
||||||
description = S("Parsley"),
|
description = S("Parsley"),
|
||||||
inventory_image = "farming_parsley.png",
|
inventory_image = "farming_parsley.png",
|
||||||
groups = {compostability = 48, seed = 2, food_parsley = 1},
|
groups = {compostability = 48, seed = 2, food_parsley = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1")
|
||||||
@ -40,12 +40,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:parsley_1", table.copy(def))
|
minetest.register_node("farming:parsley_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_parsley_2.png"}
|
def.tiles = {"farming_parsley_2.png"}
|
||||||
core.register_node("farming:parsley_2", table.copy(def))
|
minetest.register_node("farming:parsley_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3 (final)
|
-- stage 3 (final)
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ def.drop = {
|
|||||||
{items = {"farming:parsley"}, rarity = 3}
|
{items = {"farming:parsley"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:parsley_3", table.copy(def))
|
minetest.register_node("farming:parsley_3", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -73,12 +73,9 @@ farming.registered_plants["farming:parsley"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt",
|
|
||||||
"ethereal:grove_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -88,6 +85,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 10, y_max = 40,
|
y_min = 10,
|
||||||
|
y_max = 40,
|
||||||
decoration = "farming:parsley_3"
|
decoration = "farming:parsley_3"
|
||||||
})
|
})
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
-- Textures for peas and their crop were done by Andrey01
|
-- Textures for peas and their crop were done by Andrey01
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:pea_pod", {
|
minetest.register_craftitem("farming:pea_pod", {
|
||||||
description = S("Pea Pod"),
|
description = S("Pea Pod"),
|
||||||
inventory_image = "farming_pea_pod.png",
|
inventory_image = "farming_pea_pod.png",
|
||||||
groups = {compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1},
|
groups = {compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
|
||||||
@ -20,7 +20,7 @@ farming.add_eatable("farming:pea_pod", 1)
|
|||||||
|
|
||||||
-- replacement for separate peas item that was removed
|
-- replacement for separate peas item that was removed
|
||||||
|
|
||||||
core.register_alias("farming:peas", "farming:pea_pod")
|
minetest.register_alias("farming:peas", "farming:pea_pod")
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
@ -48,22 +48,22 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:pea_1", table.copy(def))
|
minetest.register_node("farming:pea_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pea_2.png"}
|
def.tiles = {"farming_pea_2.png"}
|
||||||
core.register_node("farming:pea_2", table.copy(def))
|
minetest.register_node("farming:pea_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pea_3.png"}
|
def.tiles = {"farming_pea_3.png"}
|
||||||
core.register_node("farming:pea_3", table.copy(def))
|
minetest.register_node("farming:pea_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_pea_4.png"}
|
def.tiles = {"farming_pea_4.png"}
|
||||||
core.register_node("farming:pea_4", table.copy(def))
|
minetest.register_node("farming:pea_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
@ -71,13 +71,14 @@ def.tiles = {"farming_pea_5.png"}
|
|||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 5, items = {
|
||||||
{items = {"farming:pea_pod 2"}, rarity = 1},
|
{items = {"farming:pea_pod"}, rarity = 1},
|
||||||
{items = {"farming:pea_pod"}, rarity = 2},
|
{items = {"farming:pea_pod"}, rarity = 2},
|
||||||
{items = {"farming:pea_pod"}, rarity = 3}
|
{items = {"farming:pea_pod"}, rarity = 3},
|
||||||
|
{items = {"farming:pea_pod"}, rarity = 5}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:pea_5", table.copy(def))
|
minetest.register_node("farming:pea_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -91,11 +92,9 @@ farming.registered_plants["farming:pea_pod"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -105,6 +104,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 25, y_max = 55,
|
y_min = 25,
|
||||||
|
y_max = 55,
|
||||||
decoration = "farming:pea_5"
|
decoration = "farming:pea_5"
|
||||||
})
|
})
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
--[[
|
--[[
|
||||||
Original textures from Crops Plus mod
|
Original textures from Crops Plus mod
|
||||||
Copyright (C) 2018 Grizzly Adam
|
Copyright (C) 2018 Grizzly Adam
|
||||||
https://forum.core.net/viewtopic.php?f=9&t=19488
|
https://forum.minetest.net/viewtopic.php?f=9&t=19488
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_craftitem("farming:peppercorn", {
|
minetest.register_craftitem("farming:peppercorn", {
|
||||||
description = S("Peppercorn"),
|
description = S("Peppercorn"),
|
||||||
inventory_image = "crops_peppercorn.png",
|
inventory_image = "crops_peppercorn.png",
|
||||||
groups = {compostability = 48, seed = 1, food_peppercorn = 1, flammable = 3},
|
groups = {compostability = 48, seed = 1, food_peppercorn = 1, flammable = 3},
|
||||||
@ -21,10 +21,10 @@ core.register_craftitem("farming:peppercorn", {
|
|||||||
|
|
||||||
-- green pepper
|
-- green pepper
|
||||||
|
|
||||||
core.register_craftitem("farming:pepper", {
|
minetest.register_craftitem("farming:pepper", {
|
||||||
description = S("Green Pepper"),
|
description = S("Green Pepper"),
|
||||||
inventory_image = "crops_pepper.png",
|
inventory_image = "crops_pepper.png",
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {food_pepper = 1, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ farming.add_eatable("farming:pepper", 2)
|
|||||||
|
|
||||||
-- yellow pepper
|
-- yellow pepper
|
||||||
|
|
||||||
core.register_craftitem("farming:pepper_yellow", {
|
minetest.register_craftitem("farming:pepper_yellow", {
|
||||||
description = S("Yellow Pepper"),
|
description = S("Yellow Pepper"),
|
||||||
inventory_image = "crops_pepper_yellow.png",
|
inventory_image = "crops_pepper_yellow.png",
|
||||||
on_use = core.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
groups = {food_pepper = 1, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ farming.add_eatable("farming:pepper_yellow", 3)
|
|||||||
|
|
||||||
-- red pepper
|
-- red pepper
|
||||||
|
|
||||||
core.register_craftitem("farming:pepper_red", {
|
minetest.register_craftitem("farming:pepper_red", {
|
||||||
description = S("Red Pepper"),
|
description = S("Red Pepper"),
|
||||||
inventory_image = "crops_pepper_red.png",
|
inventory_image = "crops_pepper_red.png",
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
groups = {food_pepper = 1, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ farming.add_eatable("farming:pepper_red", 4)
|
|||||||
|
|
||||||
-- pepper to peppercorn recipe
|
-- pepper to peppercorn recipe
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
output = "farming:peppercorn",
|
output = "farming:peppercorn",
|
||||||
recipe = {{"group:food_pepper"}}
|
recipe = {{"group:food_pepper"}}
|
||||||
})
|
})
|
||||||
@ -85,60 +85,60 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:pepper_1", table.copy(def))
|
minetest.register_node("farming:pepper_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_2.png"}
|
def.tiles = {"crops_pepper_plant_2.png"}
|
||||||
core.register_node("farming:pepper_2", table.copy(def))
|
minetest.register_node("farming:pepper_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_3.png"}
|
def.tiles = {"crops_pepper_plant_3.png"}
|
||||||
core.register_node("farming:pepper_3", table.copy(def))
|
minetest.register_node("farming:pepper_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_4.png"}
|
def.tiles = {"crops_pepper_plant_4.png"}
|
||||||
core.register_node("farming:pepper_4", table.copy(def))
|
minetest.register_node("farming:pepper_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (green pepper)
|
-- stage 5 (green pepper)
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_5.png"}
|
def.tiles = {"crops_pepper_plant_5.png"}
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 2, items = {
|
||||||
{items = {"farming:pepper 2"}, rarity = 1},
|
{items = {"farming:pepper 2"}, rarity = 1},
|
||||||
{items = {"farming:pepper"}, rarity = 2},
|
{items = {"farming:pepper"}, rarity = 2},
|
||||||
{items = {"farming:pepper"}, rarity = 3}
|
{items = {"farming:pepper"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:pepper_5", table.copy(def))
|
minetest.register_node("farming:pepper_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6 (yellow pepper)
|
-- stage 6 (yellow pepper)
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_6.png"}
|
def.tiles = {"crops_pepper_plant_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 2, items = {
|
||||||
{items = {"farming:pepper_yellow 2"}, rarity = 1},
|
{items = {"farming:pepper_yellow 2"}, rarity = 1},
|
||||||
{items = {"farming:pepper_yellow"}, rarity = 2},
|
{items = {"farming:pepper_yellow"}, rarity = 2},
|
||||||
{items = {"farming:pepper_yellow"}, rarity = 3}
|
{items = {"farming:pepper_yellow"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:pepper_6", table.copy(def))
|
minetest.register_node("farming:pepper_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7 (red pepper - final)
|
-- stage 7 (red pepper - final)
|
||||||
|
|
||||||
def.tiles = {"crops_pepper_plant_7.png"}
|
def.tiles = {"crops_pepper_plant_7.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 2, items = {
|
||||||
{items = {"farming:pepper_red 2"}, rarity = 1},
|
{items = {"farming:pepper_red 2"}, rarity = 1},
|
||||||
{items = {"farming:pepper_red"}, rarity = 2},
|
{items = {"farming:pepper_red"}, rarity = 2},
|
||||||
{items = {"farming:pepper_red"}, rarity = 3}
|
{items = {"farming:pepper_red"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:pepper_7", table.copy(def))
|
minetest.register_node("farming:pepper_7", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -152,12 +152,16 @@ farming.registered_plants["farming:pepper"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
grow_on = mg and {"default:dirt_with_grass"} or {
|
||||||
|
"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = def.grow_on,
|
||||||
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
|
||||||
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -167,7 +171,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 35,
|
y_min = 5,
|
||||||
|
y_max = 35,
|
||||||
decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"},
|
decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"},
|
||||||
spawn_by = "group:tree", num_spawn_by = 1
|
spawn_by = "group:tree",
|
||||||
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_craftitem("farming:pineapple_top", {
|
minetest.register_craftitem("farming:pineapple_top", {
|
||||||
description = S("Pineapple Top"),
|
description = S("Pineapple Top"),
|
||||||
inventory_image = "farming_pineapple_top.png",
|
inventory_image = "farming_pineapple_top.png",
|
||||||
groups = {compostability = 48, seed = 2, flammable = 2},
|
groups = {compostability = 48, seed = 2, flammable = 2},
|
||||||
@ -15,7 +15,7 @@ core.register_craftitem("farming:pineapple_top", {
|
|||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_node("farming:pineapple", {
|
minetest.register_node("farming:pineapple", {
|
||||||
description = S("Pineapple"),
|
description = S("Pineapple"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_pineapple.png"},
|
tiles = {"farming_pineapple.png"},
|
||||||
@ -60,37 +60,37 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:pineapple_1", table.copy(def))
|
minetest.register_node("farming:pineapple_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_2.png"}
|
def.tiles = {"farming_pineapple_2.png"}
|
||||||
core.register_node("farming:pineapple_2", table.copy(def))
|
minetest.register_node("farming:pineapple_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_3.png"}
|
def.tiles = {"farming_pineapple_3.png"}
|
||||||
core.register_node("farming:pineapple_3", table.copy(def))
|
minetest.register_node("farming:pineapple_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_4.png"}
|
def.tiles = {"farming_pineapple_4.png"}
|
||||||
core.register_node("farming:pineapple_4", table.copy(def))
|
minetest.register_node("farming:pineapple_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_5.png"}
|
def.tiles = {"farming_pineapple_5.png"}
|
||||||
core.register_node("farming:pineapple_5", table.copy(def))
|
minetest.register_node("farming:pineapple_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_6.png"}
|
def.tiles = {"farming_pineapple_6.png"}
|
||||||
core.register_node("farming:pineapple_6", table.copy(def))
|
minetest.register_node("farming:pineapple_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_7.png"}
|
def.tiles = {"farming_pineapple_7.png"}
|
||||||
core.register_node("farming:pineapple_7", table.copy(def))
|
minetest.register_node("farming:pineapple_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -100,10 +100,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:pineapple"}, rarity = 1},
|
{items = {"farming:pineapple"}, rarity = 1},
|
||||||
{items = {"farming:pineapple"}, rarity = 3}
|
{items = {"farming:pineapple"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:pineapple_8", table.copy(def))
|
minetest.register_node("farming:pineapple_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -117,18 +117,18 @@ farming.registered_plants["farming:pineapple"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
local spawn_on = {
|
local mg = farming.mapgen == "v6"
|
||||||
"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass",
|
|
||||||
"mcl_core:dirt_with_grass"
|
def = {
|
||||||
|
grow_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
||||||
|
"default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass"},
|
||||||
|
grow_near = mg and "group:sand" or nil,
|
||||||
|
num = mg and 1 or -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if farming.mapgen == "v6" then
|
minetest.register_decoration({
|
||||||
spawn_on = {"default:dirt_with_grass"}
|
|
||||||
end
|
|
||||||
|
|
||||||
core.register_decoration({
|
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = spawn_on,
|
place_on = def.grow_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -138,6 +138,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 11, y_max = 30,
|
y_min = 11,
|
||||||
decoration = "farming:pineapple_8"
|
y_max = 30,
|
||||||
|
decoration = {"farming:pineapple_8"},
|
||||||
|
spawn_by = def.grow_near,
|
||||||
|
num_spawn_by = def.num
|
||||||
})
|
})
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
Original textures from DocFarming mod
|
Original textures from DocFarming mod
|
||||||
https://forum.core.net/viewtopic.php?id=3948
|
https://forum.minetest.net/viewtopic.php?id=3948
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:potato", {
|
minetest.register_craftitem("farming:potato", {
|
||||||
description = S("Potato"),
|
description = S("Potato"),
|
||||||
inventory_image = "farming_potato.png",
|
inventory_image = "farming_potato.png",
|
||||||
groups = {compostability = 48, seed = 2, food_potato = 1},
|
groups = {compostability = 48, seed = 2, food_potato = 1},
|
||||||
@ -23,9 +23,9 @@ core.register_craftitem("farming:potato", {
|
|||||||
if user then
|
if user then
|
||||||
|
|
||||||
if math.random(3) == 1 then
|
if math.random(3) == 1 then
|
||||||
return core.do_item_eat(-1, nil, itemstack, user, pointed_thing)
|
return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing)
|
||||||
else
|
else
|
||||||
return core.do_item_eat(1, nil, itemstack, user, pointed_thing)
|
return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -57,12 +57,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:potato_1", table.copy(def))
|
minetest.register_node("farming:potato_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_potato_2.png"}
|
def.tiles = {"farming_potato_2.png"}
|
||||||
core.register_node("farming:potato_2", table.copy(def))
|
minetest.register_node("farming:potato_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ def.drop = {
|
|||||||
{items = {"farming:potato"}, rarity = 3}
|
{items = {"farming:potato"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:potato_3", table.copy(def))
|
minetest.register_node("farming:potato_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -83,11 +83,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:potato 2"}, rarity = 1},
|
{items = {"farming:potato 2"}, rarity = 1},
|
||||||
{items = {"farming:potato"}, rarity = 2},
|
{items = {"farming:potato 3"}, rarity = 2}
|
||||||
{items = {"farming:potato"}, rarity = 3}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:potato_4", table.copy(def))
|
minetest.register_node("farming:potato_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -101,12 +100,9 @@ farming.registered_plants["farming:potato"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
|
||||||
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -116,6 +112,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 40,
|
y_min = 15,
|
||||||
|
y_max = 40,
|
||||||
decoration = "farming:potato_3"
|
decoration = "farming:potato_3"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_craftitem("farming:pumpkin_slice", {
|
minetest.register_craftitem("farming:pumpkin_slice", {
|
||||||
description = S("Pumpkin Slice"),
|
description = S("Pumpkin Slice"),
|
||||||
inventory_image = "farming_pumpkin_slice.png",
|
inventory_image = "farming_pumpkin_slice.png",
|
||||||
groups = {compostability = 48, seed = 2, food_pumpkin_slice = 1},
|
groups = {compostability = 48, seed = 2, food_pumpkin_slice = 1},
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
|
||||||
@ -40,41 +40,41 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:pumpkin_1", table.copy(def))
|
minetest.register_node("farming:pumpkin_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_2.png"}
|
def.tiles = {"farming_pumpkin_2.png"}
|
||||||
core.register_node("farming:pumpkin_2", table.copy(def))
|
minetest.register_node("farming:pumpkin_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_3.png"}
|
def.tiles = {"farming_pumpkin_3.png"}
|
||||||
core.register_node("farming:pumpkin_3", table.copy(def))
|
minetest.register_node("farming:pumpkin_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_4.png"}
|
def.tiles = {"farming_pumpkin_4.png"}
|
||||||
core.register_node("farming:pumpkin_4", table.copy(def))
|
minetest.register_node("farming:pumpkin_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_5.png"}
|
def.tiles = {"farming_pumpkin_5.png"}
|
||||||
core.register_node("farming:pumpkin_5", table.copy(def))
|
minetest.register_node("farming:pumpkin_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_6.png"}
|
def.tiles = {"farming_pumpkin_6.png"}
|
||||||
core.register_node("farming:pumpkin_6", table.copy(def))
|
minetest.register_node("farming:pumpkin_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_7.png"}
|
def.tiles = {"farming_pumpkin_7.png"}
|
||||||
core.register_node("farming:pumpkin_7", table.copy(def))
|
minetest.register_node("farming:pumpkin_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
core.register_node("farming:pumpkin_8", {
|
minetest.register_node("farming:pumpkin_8", {
|
||||||
description = S("Pumpkin"),
|
description = S("Pumpkin"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
||||||
@ -89,12 +89,12 @@ core.register_node("farming:pumpkin_8", {
|
|||||||
drop = "farming:pumpkin_8",
|
drop = "farming:pumpkin_8",
|
||||||
sounds = farming.node_sound_wood_defaults(),
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = core.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -108,12 +108,17 @@ farming.registered_plants["farming:pumpkin"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
y_max = mg and 20 or 6,
|
||||||
|
near = mg and "group:water" or nil,
|
||||||
|
num = mg and 1 or -1,
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "default:dirt_with_rainforest_litter",
|
|
||||||
"mcl_core:dirt_with_grass"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -123,7 +128,9 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 3,
|
y_min = 1,
|
||||||
|
y_max = def.y_max,
|
||||||
decoration = "farming:pumpkin_8",
|
decoration = "farming:pumpkin_8",
|
||||||
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
spawn_by = def.near,
|
||||||
|
num_spawn_by = def.num
|
||||||
})
|
})
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:raspberries", {
|
minetest.register_craftitem("farming:raspberries", {
|
||||||
description = S("Raspberries"),
|
description = S("Raspberries"),
|
||||||
inventory_image = "farming_raspberries.png",
|
inventory_image = "farming_raspberries.png",
|
||||||
groups = {
|
groups = {
|
||||||
compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1,
|
compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1,
|
||||||
food_berry = 1
|
food_berry = 1
|
||||||
},
|
},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
||||||
@ -42,17 +42,17 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:raspberry_1", table.copy(def))
|
minetest.register_node("farming:raspberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_raspberry_2.png"}
|
def.tiles = {"farming_raspberry_2.png"}
|
||||||
core.register_node("farming:raspberry_2", table.copy(def))
|
minetest.register_node("farming:raspberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_raspberry_3.png"}
|
def.tiles = {"farming_raspberry_3.png"}
|
||||||
core.register_node("farming:raspberry_3", table.copy(def))
|
minetest.register_node("farming:raspberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ def.drop = {
|
|||||||
{items = {"farming:raspberries"}, rarity = 3}
|
{items = {"farming:raspberries"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:raspberry_4", table.copy(def))
|
minetest.register_node("farming:raspberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -80,11 +80,9 @@ farming.registered_plants["farming:raspberries"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -94,6 +92,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 15,
|
y_min = 3,
|
||||||
|
y_max = 15,
|
||||||
decoration = "farming:raspberry_4"
|
decoration = "farming:raspberry_4"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:rhubarb", {
|
minetest.register_craftitem("farming:rhubarb", {
|
||||||
description = S("Rhubarb"),
|
description = S("Rhubarb"),
|
||||||
inventory_image = "farming_rhubarb.png",
|
inventory_image = "farming_rhubarb.png",
|
||||||
groups = {compostability = 48, seed = 2, food_rhubarb = 1},
|
groups = {compostability = 48, seed = 2, food_rhubarb = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
|
||||||
@ -42,12 +42,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:rhubarb_1", table.copy(def))
|
minetest.register_node("farming:rhubarb_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_rhubarb_2.png"}
|
def.tiles = {"farming_rhubarb_2.png"}
|
||||||
core.register_node("farming:rhubarb_2", table.copy(def))
|
minetest.register_node("farming:rhubarb_2", table.copy(def))
|
||||||
|
|
||||||
-- stage3
|
-- stage3
|
||||||
|
|
||||||
@ -55,10 +55,9 @@ def.tiles = {"farming_rhubarb_3.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:rhubarb"}, rarity = 1},
|
{items = {"farming:rhubarb"}, rarity = 1},
|
||||||
{items = {"farming:rhubarb"}, rarity = 3}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:rhubarb_3", table.copy(def))
|
minetest.register_node("farming:rhubarb_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
@ -72,7 +71,7 @@ def.drop = {
|
|||||||
{items = {"farming:rhubarb"}, rarity = 3}
|
{items = {"farming:rhubarb"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:rhubarb_4", table.copy(def))
|
minetest.register_node("farming:rhubarb_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -86,11 +85,9 @@ farming.registered_plants["farming:rhubarb"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -100,6 +97,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3, y_max = 20,
|
y_min = 3,
|
||||||
|
y_max = 20,
|
||||||
decoration = "farming:rhubarb_3"
|
decoration = "farming:rhubarb_3"
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- rice seed
|
-- rice seed
|
||||||
|
|
||||||
core.register_node("farming:seed_rice", {
|
minetest.register_node("farming:seed_rice", {
|
||||||
description = S("Rice Seed"),
|
description = S("Rice Seed"),
|
||||||
tiles = {"farming_rice_seed.png"},
|
tiles = {"farming_rice_seed.png"},
|
||||||
inventory_image = "farming_rice_seed.png",
|
inventory_image = "farming_rice_seed.png",
|
||||||
@ -27,13 +27,13 @@ core.register_node("farming:seed_rice", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:rice_1", param2 = 3})
|
minetest.set_node(pos, {name = "farming:rice_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- rice item
|
-- rice item
|
||||||
|
|
||||||
core.register_craftitem("farming:rice", {
|
minetest.register_craftitem("farming:rice", {
|
||||||
description = S("Rice"),
|
description = S("Rice"),
|
||||||
inventory_image = "farming_rice.png",
|
inventory_image = "farming_rice.png",
|
||||||
groups = {seed = 2, food_rice = 1, flammable = 2, compostability = 65},
|
groups = {seed = 2, food_rice = 1, flammable = 2, compostability = 65},
|
||||||
@ -41,7 +41,7 @@ core.register_craftitem("farming:rice", {
|
|||||||
|
|
||||||
-- dry rice seed to give edible rice
|
-- dry rice seed to give edible rice
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
cooktime = 1,
|
cooktime = 1,
|
||||||
output = "farming:rice",
|
output = "farming:rice",
|
||||||
@ -74,37 +74,42 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:rice_1", table.copy(def))
|
minetest.register_node("farming:rice_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_rice_2.png"}
|
def.tiles = {"farming_rice_2.png"}
|
||||||
core.register_node("farming:rice_2", table.copy(def))
|
minetest.register_node("farming:rice_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_rice_3.png"}
|
def.tiles = {"farming_rice_3.png"}
|
||||||
core.register_node("farming:rice_3", table.copy(def))
|
minetest.register_node("farming:rice_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_rice_4.png"}
|
def.tiles = {"farming_rice_4.png"}
|
||||||
core.register_node("farming:rice_4", table.copy(def))
|
minetest.register_node("farming:rice_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_rice_5.png"}
|
def.tiles = {"farming_rice_5.png"}
|
||||||
core.register_node("farming:rice_5", table.copy(def))
|
def.drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"farming:rice"}, rarity = 2}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
minetest.register_node("farming:rice_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_rice_6.png"}
|
def.tiles = {"farming_rice_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_rice"}, rarity = 2}
|
{items = {"farming:rice"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:rice_6", table.copy(def))
|
minetest.register_node("farming:rice_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -112,10 +117,11 @@ def.tiles = {"farming_rice_7.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_rice"}, rarity = 1},
|
{items = {"farming:seed_rice"}, rarity = 1},
|
||||||
|
{items = {"farming:seed_rice"}, rarity = 2},
|
||||||
{items = {"farming:seed_rice"}, rarity = 3}
|
{items = {"farming:seed_rice"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:rice_7", table.copy(def))
|
minetest.register_node("farming:rice_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -125,12 +131,11 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_rice 2"}, rarity = 1},
|
{items = {"farming:seed_rice 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_rice"}, rarity = 2},
|
{items = {"farming:seed_rice 2"}, rarity = 2},
|
||||||
{items = {"farming:seed_rice"}, rarity = 3},
|
{items = {"farming:seed_rice"}, rarity = 3}
|
||||||
{items = {"farming:seed_rice"}, rarity = 4}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:rice_8", table.copy(def))
|
minetest.register_node("farming:rice_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
--= A nice addition from Ademant's grain mod :)
|
--= A nice addition from Ademant's grain mod :)
|
||||||
|
|
||||||
@ -15,18 +15,16 @@ farming.register_plant("farming:rye", {
|
|||||||
|
|
||||||
-- override rye item
|
-- override rye item
|
||||||
|
|
||||||
core.override_item("farming:rye", {
|
minetest.override_item("farming:rye", {
|
||||||
description = S("Rye"),
|
description = S("Rye"),
|
||||||
groups = {food_rye = 1, flammable = 4, compostability = 65}
|
groups = {food_rye = 1, flammable = 4, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- override rye crop
|
-- override rye crop
|
||||||
|
|
||||||
core.override_item("farming:rye_1", {drop = {}})
|
minetest.override_item("farming:rye_1", {drop = {}})
|
||||||
core.override_item("farming:rye_2", {drop = {}})
|
minetest.override_item("farming:rye_2", {drop = {}})
|
||||||
core.override_item("farming:rye_3", {drop = {}})
|
minetest.override_item("farming:rye_3", {drop = {}})
|
||||||
core.override_item("farming:rye_4", {drop = {}})
|
|
||||||
core.override_item("farming:rye_5", {drop = {}})
|
|
||||||
|
|
||||||
-- Oats
|
-- Oats
|
||||||
|
|
||||||
@ -40,15 +38,13 @@ farming.register_plant("farming:oat", {
|
|||||||
|
|
||||||
-- override oat item
|
-- override oat item
|
||||||
|
|
||||||
core.override_item("farming:oat", {
|
minetest.override_item("farming:oat", {
|
||||||
description = S("Oats"),
|
description = S("Oats"),
|
||||||
groups = {food_oats = 1, flammable = 4, compostability = 65}
|
groups = {food_oats = 1, flammable = 4, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- override oat crop
|
-- override oat crop
|
||||||
|
|
||||||
core.override_item("farming:oat_1", {drop = {}})
|
minetest.override_item("farming:oat_1", {drop = {}})
|
||||||
core.override_item("farming:oat_2", {drop = {}})
|
minetest.override_item("farming:oat_2", {drop = {}})
|
||||||
core.override_item("farming:oat_3", {drop = {}})
|
minetest.override_item("farming:oat_3", {drop = {}})
|
||||||
core.override_item("farming:oat_4", {drop = {}})
|
|
||||||
core.override_item("farming:oat_5", {drop = {}})
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:soy_pod", {
|
minetest.register_craftitem("farming:soy_pod", {
|
||||||
description = S("Soy Pod"),
|
description = S("Soy Pod"),
|
||||||
inventory_image = "farming_soy_pod.png",
|
inventory_image = "farming_soy_pod.png",
|
||||||
groups = {compostability = 48, seed = 2, food_soy = 1, food_soy_pod = 1, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_soy = 1, food_soy_pod = 1, flammable = 2},
|
||||||
@ -15,7 +15,7 @@ core.register_craftitem("farming:soy_pod", {
|
|||||||
|
|
||||||
-- replacement for soy beans that was removed
|
-- replacement for soy beans that was removed
|
||||||
|
|
||||||
core.register_alias("farming:soy_beans", "farming:soy_pod")
|
minetest.register_alias("farming:soy_beans", "farming:soy_pod")
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
@ -43,43 +43,44 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:soy_1", table.copy(def))
|
minetest.register_node("farming:soy_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_soy_2.png"}
|
def.tiles = {"farming_soy_2.png"}
|
||||||
core.register_node("farming:soy_2", table.copy(def))
|
minetest.register_node("farming:soy_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_soy_3.png"}
|
def.tiles = {"farming_soy_3.png"}
|
||||||
core.register_node("farming:soy_3", table.copy(def))
|
minetest.register_node("farming:soy_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_soy_4.png"}
|
def.tiles = {"farming_soy_4.png"}
|
||||||
core.register_node("farming:soy_4", table.copy(def))
|
minetest.register_node("farming:soy_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_soy_5.png"}
|
def.tiles = {"farming_soy_5.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 1, items = {
|
||||||
{items = {"farming:soy_pod"}, rarity = 2}
|
{items = {"farming:soy_pod"}, rarity = 1},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:soy_5", table.copy(def))
|
minetest.register_node("farming:soy_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_soy_6.png"}
|
def.tiles = {"farming_soy_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 3, items = {
|
||||||
{items = {"farming:soy_pod"}, rarity = 1},
|
{items = {"farming:soy_pod"}, rarity = 1},
|
||||||
|
{items = {"farming:soy_pod"}, rarity = 2},
|
||||||
{items = {"farming:soy_pod"}, rarity = 3}
|
{items = {"farming:soy_pod"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:soy_6", table.copy(def))
|
minetest.register_node("farming:soy_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7 (final)
|
-- stage 7 (final)
|
||||||
|
|
||||||
@ -87,14 +88,15 @@ def.tiles = {"farming_soy_7.png"}
|
|||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
max_items = 5, items = {
|
||||||
{items = {"farming:soy_pod 2"}, rarity = 1},
|
{items = {"farming:soy_pod"}, rarity = 1},
|
||||||
{items = {"farming:soy_pod"}, rarity = 2},
|
{items = {"farming:soy_pod"}, rarity = 2},
|
||||||
{items = {"farming:soy_pod"}, rarity = 3},
|
{items = {"farming:soy_pod"}, rarity = 3},
|
||||||
{items = {"farming:soy_pod"}, rarity = 4}
|
{items = {"farming:soy_pod"}, rarity = 4},
|
||||||
|
{items = {"farming:soy_pod"}, rarity = 5}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:soy_7", table.copy(def))
|
minetest.register_node("farming:soy_7", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -108,13 +110,17 @@ farming.registered_plants["farming:soy_pod"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
local mg = farming.mapgen == "v6"
|
||||||
|
|
||||||
|
def = {
|
||||||
|
spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
||||||
|
"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass",
|
||||||
|
"mcl_core:dirt_with_grass"}
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = def.spawn_on,
|
||||||
"default:dirt_with_grass", "default:dirt_with_dry_grass",
|
|
||||||
"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass",
|
|
||||||
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -124,6 +130,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 20, y_max = 50,
|
y_min = 20,
|
||||||
|
y_max = 50,
|
||||||
decoration = "farming:soy_6"
|
decoration = "farming:soy_6"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:spinach", {
|
minetest.register_craftitem("farming:spinach", {
|
||||||
description = S("Spinach"),
|
description = S("Spinach"),
|
||||||
inventory_image = "farming_spinach.png",
|
inventory_image = "farming_spinach.png",
|
||||||
groups = {compostability = 48, seed = 2, food_spinach = 1},
|
groups = {compostability = 48, seed = 2, food_spinach = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:spinach_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:spinach_1")
|
||||||
@ -40,12 +40,12 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:spinach_1", table.copy(def))
|
minetest.register_node("farming:spinach_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_spinach_2.png"}
|
def.tiles = {"farming_spinach_2.png"}
|
||||||
core.register_node("farming:spinach_2", table.copy(def))
|
minetest.register_node("farming:spinach_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ def.drop = {
|
|||||||
{items = {"farming:spinach"}, rarity = 3}
|
{items = {"farming:spinach"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:spinach_3", table.copy(def))
|
minetest.register_node("farming:spinach_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
@ -66,12 +66,11 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:spinach 2"}, rarity = 1},
|
{items = {"farming:spinach 2"}, rarity = 1},
|
||||||
{items = {"farming:spinach"}, rarity = 2},
|
{items = {"farming:spinach 2"}, rarity = 2},
|
||||||
{items = {"farming:spinach"}, rarity = 3},
|
{items = {"farming:spinach 2"}, rarity = 3}
|
||||||
{items = {"farming:spinach"}, rarity = 4}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:spinach_4", table.copy(def))
|
minetest.register_node("farming:spinach_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -85,19 +84,21 @@ farming.registered_plants["farming:spinach"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = -0.1,
|
||||||
scale = farming.spinach,
|
scale = farming.spinach,
|
||||||
spread = {x = 100, y = 100, z = 100},
|
spread = {x = 100, y = 100, z = 100},
|
||||||
seed = 910,
|
seed = 910,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1, y_max = 100,
|
biomes = {"deciduous_forest"},
|
||||||
decoration = "farming:spinach_3",
|
y_max = 31000,
|
||||||
|
y_min = 1,
|
||||||
|
decoration = "farming:spinach_4",
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem(":ethereal:strawberry", {
|
minetest.register_craftitem(":ethereal:strawberry", {
|
||||||
description = S("Strawberry"),
|
description = S("Strawberry"),
|
||||||
inventory_image = "ethereal_strawberry.png",
|
inventory_image = "ethereal_strawberry.png",
|
||||||
groups = {compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1},
|
groups = {compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1")
|
||||||
@ -43,43 +43,49 @@ local def = {
|
|||||||
|
|
||||||
--stage 1
|
--stage 1
|
||||||
|
|
||||||
core.register_node(":ethereal:strawberry_1", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_2.png"}
|
def.tiles = {"ethereal_strawberry_2.png"}
|
||||||
core.register_node(":ethereal:strawberry_2", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_3.png"}
|
def.tiles = {"ethereal_strawberry_3.png"}
|
||||||
core.register_node(":ethereal:strawberry_3", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_4.png"}
|
def.tiles = {"ethereal_strawberry_4.png"}
|
||||||
core.register_node(":ethereal:strawberry_4", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_5.png"}
|
def.tiles = {"ethereal_strawberry_5.png"}
|
||||||
core.register_node(":ethereal:strawberry_5", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_6.png"}
|
def.tiles = {"ethereal_strawberry_6.png"}
|
||||||
core.register_node(":ethereal:strawberry_6", table.copy(def))
|
def.drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"ethereal:strawberry 1"}, rarity = 2},
|
||||||
|
{items = {"ethereal:strawberry 2"}, rarity = 3}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
minetest.register_node(":ethereal:strawberry_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_7.png"}
|
def.tiles = {"ethereal_strawberry_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"ethereal:strawberry"}, rarity = 1},
|
{items = {"ethereal:strawberry 1"}, rarity = 1},
|
||||||
{items = {"ethereal:strawberry"}, rarity = 3}
|
{items = {"ethereal:strawberry 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node(":ethereal:strawberry_7", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -89,12 +95,10 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"ethereal:strawberry 2"}, rarity = 1},
|
{items = {"ethereal:strawberry 2"}, rarity = 1},
|
||||||
{items = {"ethereal:strawberry"}, rarity = 2},
|
{items = {"ethereal:strawberry 3"}, rarity = 3}
|
||||||
{items = {"ethereal:strawberry"}, rarity = 3},
|
|
||||||
{items = {"ethereal:strawberry"}, rarity = 4},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node(":ethereal:strawberry_8", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -108,11 +112,9 @@ farming.registered_plants["ethereal:strawberry"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -122,6 +124,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 15, y_max = 55,
|
y_min = 20,
|
||||||
|
y_max = 55,
|
||||||
decoration = "ethereal:strawberry_7"
|
decoration = "ethereal:strawberry_7"
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_sunflower", {
|
minetest.register_node("farming:seed_sunflower", {
|
||||||
description = S("Sunflower Seeds"),
|
description = S("Sunflower Seeds"),
|
||||||
tiles = {"farming_sunflower_seeds.png"},
|
tiles = {"farming_sunflower_seeds.png"},
|
||||||
inventory_image = "farming_sunflower_seeds.png",
|
inventory_image = "farming_sunflower_seeds.png",
|
||||||
@ -27,15 +27,15 @@ core.register_node("farming:seed_sunflower", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:sunflower_1", param2 = 1})
|
minetest.set_node(pos, {name = "farming:sunflower_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_alias("farming:sunflower_seeds", "farming:seed_sunflower")
|
minetest.register_alias("farming:sunflower_seeds", "farming:seed_sunflower")
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:sunflower", {
|
minetest.register_craftitem("farming:sunflower", {
|
||||||
description = S("Sunflower"),
|
description = S("Sunflower"),
|
||||||
inventory_image = "farming_sunflower.png",
|
inventory_image = "farming_sunflower.png",
|
||||||
groups = {flammable = 2}
|
groups = {flammable = 2}
|
||||||
@ -43,7 +43,7 @@ core.register_craftitem("farming:sunflower", {
|
|||||||
|
|
||||||
-- turn item into seeds
|
-- turn item into seeds
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
output = "farming:seed_sunflower 5",
|
output = "farming:seed_sunflower 5",
|
||||||
recipe = {{"farming:sunflower"}}
|
recipe = {{"farming:sunflower"}}
|
||||||
})
|
})
|
||||||
@ -72,38 +72,38 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:sunflower_1", table.copy(def))
|
minetest.register_node("farming:sunflower_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_2.png"}
|
def.tiles = {"farming_sunflower_2.png"}
|
||||||
core.register_node("farming:sunflower_2", table.copy(def))
|
minetest.register_node("farming:sunflower_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_3.png"}
|
def.tiles = {"farming_sunflower_3.png"}
|
||||||
core.register_node("farming:sunflower_3", table.copy(def))
|
minetest.register_node("farming:sunflower_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_4.png"}
|
def.tiles = {"farming_sunflower_4.png"}
|
||||||
core.register_node("farming:sunflower_4", table.copy(def))
|
minetest.register_node("farming:sunflower_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_5.png"}
|
def.tiles = {"farming_sunflower_5.png"}
|
||||||
core.register_node("farming:sunflower_5", table.copy(def))
|
minetest.register_node("farming:sunflower_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_6.png"}
|
def.tiles = {"farming_sunflower_6.png"}
|
||||||
def.visual_scale = 1.9
|
def.visual_scale = 1.9
|
||||||
core.register_node("farming:sunflower_6", table.copy(def))
|
minetest.register_node("farming:sunflower_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_7.png"}
|
def.tiles = {"farming_sunflower_7.png"}
|
||||||
core.register_node("farming:sunflower_7", table.copy(def))
|
minetest.register_node("farming:sunflower_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ def.drop = {
|
|||||||
{items = {"farming:sunflower"}, rarity = 6}
|
{items = {"farming:sunflower"}, rarity = 6}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:sunflower_8", table.copy(def))
|
minetest.register_node("farming:sunflower_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -130,11 +130,9 @@ farming.registered_plants["farming:sunflower"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -144,6 +142,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 10, y_max = 40,
|
y_min = 10,
|
||||||
|
y_max = 40,
|
||||||
decoration = "farming:sunflower_8"
|
decoration = "farming:sunflower_8"
|
||||||
})
|
})
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9)
|
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:tomato", {
|
minetest.register_craftitem("farming:tomato", {
|
||||||
description = S("Tomato"),
|
description = S("Tomato"),
|
||||||
inventory_image = "farming_tomato.png",
|
inventory_image = "farming_tomato.png",
|
||||||
groups = {compostability = 45, seed = 2, food_tomato = 1},
|
groups = {compostability = 45, seed = 2, food_tomato = 1},
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
|
||||||
@ -45,32 +45,32 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:tomato_1", table.copy(def))
|
minetest.register_node("farming:tomato_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_2.png"}
|
def.tiles = {"farming_tomato_2.png"}
|
||||||
core.register_node("farming:tomato_2", table.copy(def))
|
minetest.register_node("farming:tomato_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_3.png"}
|
def.tiles = {"farming_tomato_3.png"}
|
||||||
core.register_node("farming:tomato_3", table.copy(def))
|
minetest.register_node("farming:tomato_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_4.png"}
|
def.tiles = {"farming_tomato_4.png"}
|
||||||
core.register_node("farming:tomato_4", table.copy(def))
|
minetest.register_node("farming:tomato_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_5.png"}
|
def.tiles = {"farming_tomato_5.png"}
|
||||||
core.register_node("farming:tomato_5", table.copy(def))
|
minetest.register_node("farming:tomato_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_6.png"}
|
def.tiles = {"farming_tomato_6.png"}
|
||||||
core.register_node("farming:tomato_6", table.copy(def))
|
minetest.register_node("farming:tomato_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ def.drop = {
|
|||||||
{items = {"farming:tomato"}, rarity = 3}
|
{items = {"farming:tomato"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:tomato_7", table.copy(def))
|
minetest.register_node("farming:tomato_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -90,13 +90,12 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:tomato 2"}, rarity = 1},
|
{items = {"farming:tomato 3"}, rarity = 1},
|
||||||
{items = {"farming:tomato"}, rarity = 2},
|
{items = {"farming:tomato 2"}, rarity = 2},
|
||||||
{items = {"farming:tomato"}, rarity = 3},
|
{items = {"farming:tomato 1"}, rarity = 3}
|
||||||
{items = {"farming:tomato"}, rarity = 4}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:tomato_8", table.copy(def))
|
minetest.register_node("farming:tomato_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -110,11 +109,9 @@ farming.registered_plants["farming:tomato"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -124,6 +121,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 25,
|
y_min = 5,
|
||||||
|
y_max = 25,
|
||||||
decoration = "farming:tomato_7"
|
decoration = "farming:tomato_7"
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- item/seed
|
-- item/seed
|
||||||
|
|
||||||
core.register_craftitem("farming:vanilla", {
|
minetest.register_craftitem("farming:vanilla", {
|
||||||
description = S("Vanilla"),
|
description = S("Vanilla"),
|
||||||
inventory_image = "farming_vanilla.png",
|
inventory_image = "farming_vanilla.png",
|
||||||
groups = {compostability = 48, seed = 2, food_vanilla = 1},
|
groups = {compostability = 48, seed = 2, food_vanilla = 1},
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1")
|
||||||
@ -40,33 +40,33 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:vanilla_1", table.copy(def))
|
minetest.register_node("farming:vanilla_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_2.png"}
|
def.tiles = {"farming_vanilla_2.png"}
|
||||||
core.register_node("farming:vanilla_2", table.copy(def))
|
minetest.register_node("farming:vanilla_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_3.png"}
|
def.tiles = {"farming_vanilla_3.png"}
|
||||||
core.register_node("farming:vanilla_3", table.copy(def))
|
minetest.register_node("farming:vanilla_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_4.png"}
|
def.tiles = {"farming_vanilla_4.png"}
|
||||||
core.register_node("farming:vanilla_4", table.copy(def))
|
minetest.register_node("farming:vanilla_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_5.png"}
|
def.tiles = {"farming_vanilla_5.png"}
|
||||||
core.register_node("farming:vanilla_5", table.copy(def))
|
minetest.register_node("farming:vanilla_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_6.png"}
|
def.tiles = {"farming_vanilla_6.png"}
|
||||||
def.visual_scale = 1.9
|
def.visual_scale = 1.9
|
||||||
core.register_node("farming:vanilla_6", table.copy(def))
|
minetest.register_node("farming:vanilla_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
@ -74,10 +74,11 @@ def.tiles = {"farming_vanilla_7.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:vanilla"}, rarity = 1},
|
{items = {"farming:vanilla"}, rarity = 1},
|
||||||
|
{items = {"farming:vanilla"}, rarity = 2},
|
||||||
{items = {"farming:vanilla"}, rarity = 3}
|
{items = {"farming:vanilla"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:vanilla_7", table.copy(def))
|
minetest.register_node("farming:vanilla_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -87,12 +88,12 @@ def.selection_box = farming.select_final
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:vanilla 2"}, rarity = 1},
|
{items = {"farming:vanilla 2"}, rarity = 1},
|
||||||
{items = {"farming:vanilla"}, rarity = 2},
|
{items = {"farming:vanilla 2"}, rarity = 2},
|
||||||
{items = {"farming:vanilla"}, rarity = 3},
|
{items = {"farming:vanilla 2"}, rarity = 2},
|
||||||
{items = {"farming:vanilla"}, rarity = 4}
|
{items = {"farming:vanilla 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:vanilla_8", table.copy(def))
|
minetest.register_node("farming:vanilla_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
@ -106,11 +107,9 @@ farming.registered_plants["farming:vanilla"] = {
|
|||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
|
|
||||||
core.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {
|
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
||||||
"default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt"
|
|
||||||
},
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -120,6 +119,7 @@ core.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5, y_max = 35,
|
y_min = 5,
|
||||||
|
y_max = 35,
|
||||||
decoration = "farming:vanilla_7"
|
decoration = "farming:vanilla_7"
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- seed
|
-- seed
|
||||||
|
|
||||||
core.register_node("farming:seed_wheat", {
|
minetest.register_node("farming:seed_wheat", {
|
||||||
description = S("Wheat Seed"),
|
description = S("Wheat Seed"),
|
||||||
tiles = {"farming_wheat_seed.png"},
|
tiles = {"farming_wheat_seed.png"},
|
||||||
inventory_image = "farming_wheat_seed.png",
|
inventory_image = "farming_wheat_seed.png",
|
||||||
@ -26,13 +26,13 @@ core.register_node("farming:seed_wheat", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
core.set_node(pos, {name = "farming:wheat_1", param2 = 3})
|
minetest.set_node(pos, {name = "farming:wheat_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- item
|
-- item
|
||||||
|
|
||||||
core.register_craftitem("farming:wheat", {
|
minetest.register_craftitem("farming:wheat", {
|
||||||
description = S("Wheat"),
|
description = S("Wheat"),
|
||||||
inventory_image = "farming_wheat.png",
|
inventory_image = "farming_wheat.png",
|
||||||
groups = {food_wheat = 1, flammable = 4}
|
groups = {food_wheat = 1, flammable = 4}
|
||||||
@ -64,27 +64,33 @@ local def = {
|
|||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
|
|
||||||
core.register_node("farming:wheat_1", table.copy(def))
|
minetest.register_node("farming:wheat_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_2.png"}
|
def.tiles = {"farming_wheat_2.png"}
|
||||||
core.register_node("farming:wheat_2", table.copy(def))
|
minetest.register_node("farming:wheat_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_3.png"}
|
def.tiles = {"farming_wheat_3.png"}
|
||||||
core.register_node("farming:wheat_3", table.copy(def))
|
minetest.register_node("farming:wheat_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_4.png"}
|
def.tiles = {"farming_wheat_4.png"}
|
||||||
core.register_node("farming:wheat_4", table.copy(def))
|
minetest.register_node("farming:wheat_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_5.png"}
|
def.tiles = {"farming_wheat_5.png"}
|
||||||
core.register_node("farming:wheat_5", table.copy(def))
|
def.drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"farming:wheat"}, rarity = 2},
|
||||||
|
{items = {"farming:seed_wheat"}, rarity = 2}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
minetest.register_node("farming:wheat_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
@ -92,21 +98,23 @@ def.tiles = {"farming_wheat_6.png"}
|
|||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:wheat"}, rarity = 2},
|
{items = {"farming:wheat"}, rarity = 2},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 2}
|
{items = {"farming:seed_wheat"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:wheat_6", table.copy(def))
|
minetest.register_node("farming:wheat_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_7.png"}
|
def.tiles = {"farming_wheat_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:wheat"}, rarity = 2},
|
{items = {"farming:wheat"}, rarity = 1},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 1}
|
{items = {"farming:wheat"}, rarity = 3},
|
||||||
|
{items = {"farming:seed_wheat"}, rarity = 1},
|
||||||
|
{items = {"farming:seed_wheat"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:wheat_7", table.copy(def))
|
minetest.register_node("farming:wheat_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
@ -115,13 +123,13 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:wheat 2"}, rarity = 1},
|
{items = {"farming:wheat"}, rarity = 1},
|
||||||
{items = {"farming:wheat"}, rarity = 2},
|
{items = {"farming:wheat"}, rarity = 3},
|
||||||
{items = {"farming:seed_wheat 2"}, rarity = 1},
|
{items = {"farming:seed_wheat"}, rarity = 1},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 2}
|
{items = {"farming:seed_wheat"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.register_node("farming:wheat_8", table.copy(def))
|
minetest.register_node("farming:wheat_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
|
@ -9,41 +9,40 @@
|
|||||||
farming.asparagus = 0.002
|
farming.asparagus = 0.002
|
||||||
farming.eggplant = 0.002
|
farming.eggplant = 0.002
|
||||||
farming.spinach = 0.002
|
farming.spinach = 0.002
|
||||||
farming.carrot = 0.002
|
farming.carrot = 0.001
|
||||||
farming.potato = 0.002
|
farming.potato = 0.001
|
||||||
farming.tomato = 0.002
|
farming.tomato = 0.001
|
||||||
farming.cucumber = 0.002
|
farming.cucumber = 0.001
|
||||||
farming.corn = 0.002
|
farming.corn = 0.001
|
||||||
farming.coffee = 0.002
|
farming.coffee = 0.001
|
||||||
farming.melon = 0.009
|
farming.melon = 0.001
|
||||||
farming.pumpkin = 0.009
|
farming.pumpkin = 0.001
|
||||||
farming.cocoa = true -- true or false only
|
farming.cocoa = true -- true or false only
|
||||||
farming.raspberry = 0.002
|
farming.raspberry = 0.001
|
||||||
farming.blueberry = 0.002
|
farming.blueberry = 0.001
|
||||||
farming.rhubarb = 0.002
|
farming.rhubarb = 0.001
|
||||||
farming.beans = 0.002
|
farming.beans = 0.001
|
||||||
farming.grapes = 0.002
|
farming.grapes = 0.001
|
||||||
farming.barley = true -- true or false only
|
farming.barley = true -- true or false only
|
||||||
farming.chili = 0.003
|
farming.chili = 0.003
|
||||||
farming.hemp = 0.003
|
farming.hemp = 0.003
|
||||||
farming.garlic = 0.002
|
farming.garlic = 0.001
|
||||||
farming.onion = 0.002
|
farming.onion = 0.001
|
||||||
farming.pepper = 0.002
|
farming.pepper = 0.002
|
||||||
farming.pineapple = 0.003
|
farming.pineapple = 0.001
|
||||||
farming.peas = 0.002
|
farming.peas = 0.001
|
||||||
farming.beetroot = 0.002
|
farming.beetroot = 0.001
|
||||||
farming.mint = 0.005
|
farming.mint = 0.005
|
||||||
farming.cabbage = 0.002
|
farming.cabbage = 0.001
|
||||||
farming.blackberry = 0.002
|
farming.blackberry = 0.002
|
||||||
farming.lettuce = 0.002
|
farming.lettuce = 0.001
|
||||||
farming.soy = 0.002
|
farming.soy = 0.001
|
||||||
farming.vanilla = 0.002
|
farming.vanilla = 0.001
|
||||||
farming.artichoke = 0.002
|
farming.artichoke = 0.001
|
||||||
farming.parsley = 0.002
|
farming.parsley = 0.002
|
||||||
farming.sunflower = 0.002
|
farming.sunflower = 0.001
|
||||||
farming.ginger = 0.002
|
farming.ginger = 0.002
|
||||||
farming.cotton = 0.003
|
farming.strawberry = not minetest.get_modpath("ethereal") and 0.002
|
||||||
farming.strawberry = 0.002
|
|
||||||
farming.grains = true -- true or false only
|
farming.grains = true -- true or false only
|
||||||
farming.rice = true
|
farming.rice = true
|
||||||
|
|
||||||
|
16
grass.lua
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
local rarity_lookup = {[1] = 50, [2] = 50, [3] = 50, [4] = 5, [5] = 5}
|
local rarity_lookup = {[1] = 50, [2] = 50, [3] = 50, [4] = 5, [5] = 5}
|
||||||
|
|
||||||
if core.registered_nodes["default:grass_1"] then
|
if minetest.registered_nodes["default:grass_1"] then
|
||||||
|
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
|
|
||||||
core.override_item("default:grass_" .. i, {
|
minetest.override_item("default:grass_" .. i, {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -22,11 +22,11 @@ end
|
|||||||
|
|
||||||
-- override dry grass to drop barley and rye seeds
|
-- override dry grass to drop barley and rye seeds
|
||||||
|
|
||||||
if core.registered_nodes["default:dry_grass_1"] then
|
if minetest.registered_nodes["default:dry_grass_1"] then
|
||||||
|
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
|
|
||||||
core.override_item("default:dry_grass_" .. i, {
|
minetest.override_item("default:dry_grass_" .. i, {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -41,9 +41,9 @@ end
|
|||||||
|
|
||||||
-- override jungle grass to drop cotton and rice seeds
|
-- override jungle grass to drop cotton and rice seeds
|
||||||
|
|
||||||
if core.registered_nodes["default:junglegrass"] then
|
if minetest.registered_nodes["default:junglegrass"] then
|
||||||
|
|
||||||
core.override_item("default:junglegrass", {
|
minetest.override_item("default:junglegrass", {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -55,11 +55,11 @@ if core.registered_nodes["default:junglegrass"] then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- override mineclone tallgrass to drop all of the above seeds
|
-- override mineclone tallgrass to drop all sof the above seeds
|
||||||
|
|
||||||
if farming.mcl then
|
if farming.mcl then
|
||||||
|
|
||||||
core.override_item("mcl_flowers:tallgrass", {
|
minetest.override_item("mcl_flowers:tallgrass", {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
|
151
hoes.lua
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
-- translation and mod check
|
-- translation and mod check
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
local mod_tr = core.get_modpath("toolranks")
|
local mod_tr = minetest.get_modpath("toolranks")
|
||||||
|
|
||||||
-- Hoe registration function
|
-- Hoe registration function
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ farming.register_hoe = function(name, def)
|
|||||||
def.groups.hoe = 1
|
def.groups.hoe = 1
|
||||||
|
|
||||||
-- Register the tool
|
-- Register the tool
|
||||||
core.register_tool(name, {
|
minetest.register_tool(name, {
|
||||||
description = def.description,
|
description = def.description,
|
||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
groups = def.groups,
|
groups = def.groups,
|
||||||
@ -37,11 +37,14 @@ farming.register_hoe = function(name, def)
|
|||||||
|
|
||||||
-- Register its recipe
|
-- Register its recipe
|
||||||
if def.recipe then
|
if def.recipe then
|
||||||
core.register_craft({ output = name:sub(2), recipe = def.recipe })
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = name:sub(2),
|
||||||
|
recipe = def.recipe
|
||||||
|
})
|
||||||
elseif def.material then
|
elseif def.material then
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
output = name:sub(2),
|
output = name:sub(2),
|
||||||
recipe = {
|
recipe = {
|
||||||
{def.material, def.material, ""},
|
{def.material, def.material, ""},
|
||||||
@ -62,43 +65,43 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
|||||||
-- am I going to hoe the top of a dirt node?
|
-- am I going to hoe the top of a dirt node?
|
||||||
if pt.type == "node" and pt.above.y == pt.under.y + 1 then
|
if pt.type == "node" and pt.above.y == pt.under.y + 1 then
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
local upos = pointed_thing.under
|
local upos = pointed_thing.under
|
||||||
|
|
||||||
if core.is_protected(upos, user:get_player_name()) then
|
if minetest.is_protected(upos, user:get_player_name()) then
|
||||||
core.record_protection_violation(upos, user:get_player_name())
|
minetest.record_protection_violation(upos, user:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local p = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z}
|
local p = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z}
|
||||||
local above = core.get_node(p)
|
local above = minetest.get_node(p)
|
||||||
|
|
||||||
-- return if any of the nodes is not registered
|
-- return if any of the nodes is not registered
|
||||||
if not core.registered_nodes[under.name]
|
if not minetest.registered_nodes[under.name]
|
||||||
or not core.registered_nodes[above.name] then return end
|
or not minetest.registered_nodes[above.name] then return end
|
||||||
|
|
||||||
-- check if the node above the pointed thing is air
|
-- check if the node above the pointed thing is air
|
||||||
if above.name ~= "air" then return end
|
if above.name ~= "air" then return end
|
||||||
|
|
||||||
-- check if pointing at dirt
|
-- check if pointing at dirt
|
||||||
if core.get_item_group(under.name, "soil") ~= 1 then return end
|
if minetest.get_item_group(under.name, "soil") ~= 1 then return end
|
||||||
|
|
||||||
-- check if (wet) soil defined
|
-- check if (wet) soil defined
|
||||||
local ndef = core.registered_nodes[under.name]
|
local ndef = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if ndef.soil == nil or ndef.soil.wet == nil or ndef.soil.dry == nil then
|
if ndef.soil == nil or ndef.soil.wet == nil or ndef.soil.dry == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.is_protected(pt.under, user:get_player_name()) then
|
if minetest.is_protected(pt.under, user:get_player_name()) then
|
||||||
core.record_protection_violation(pt.under, user:get_player_name())
|
minetest.record_protection_violation(pt.under, user:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- turn the node into soil, wear out item and play sound
|
-- turn the node into soil, wear out item and play sound
|
||||||
core.set_node(pt.under, {name = ndef.soil.dry}) ; is_used = true
|
minetest.set_node(pt.under, {name = ndef.soil.dry}) ; is_used = true
|
||||||
|
|
||||||
core.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}, true)
|
minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local wdef = itemstack:get_definition()
|
local wdef = itemstack:get_definition()
|
||||||
@ -135,7 +138,7 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
||||||
core.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5}, true)
|
minetest.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5}, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -151,7 +154,7 @@ farming.register_hoe(":farming:hoe_wood", {
|
|||||||
material = "group:wood"
|
material = "group:wood"
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "farming:hoe_wood",
|
recipe = "farming:hoe_wood",
|
||||||
burntime = 5
|
burntime = 5
|
||||||
@ -201,27 +204,27 @@ farming.register_hoe(":farming:hoe_diamond", {
|
|||||||
|
|
||||||
if mod_tr then
|
if mod_tr then
|
||||||
|
|
||||||
core.override_item("farming:hoe_wood", {
|
minetest.override_item("farming:hoe_wood", {
|
||||||
original_description = S("Wood Hoe"),
|
original_description = S("Wood Hoe"),
|
||||||
description = toolranks.create_description(S("Wood Hoe"))})
|
description = toolranks.create_description(S("Wood Hoe"))})
|
||||||
|
|
||||||
core.override_item("farming:hoe_stone", {
|
minetest.override_item("farming:hoe_stone", {
|
||||||
original_description = S("Stone Hoe"),
|
original_description = S("Stone Hoe"),
|
||||||
description = toolranks.create_description(S("Stone Hoe"))})
|
description = toolranks.create_description(S("Stone Hoe"))})
|
||||||
|
|
||||||
core.override_item("farming:hoe_steel", {
|
minetest.override_item("farming:hoe_steel", {
|
||||||
original_description = S("Steel Hoe"),
|
original_description = S("Steel Hoe"),
|
||||||
description = toolranks.create_description(S("Steel Hoe"))})
|
description = toolranks.create_description(S("Steel Hoe"))})
|
||||||
|
|
||||||
core.override_item("farming:hoe_bronze", {
|
minetest.override_item("farming:hoe_bronze", {
|
||||||
original_description = S("Bronze Hoe"),
|
original_description = S("Bronze Hoe"),
|
||||||
description = toolranks.create_description(S("Bronze Hoe"))})
|
description = toolranks.create_description(S("Bronze Hoe"))})
|
||||||
|
|
||||||
core.override_item("farming:hoe_mese", {
|
minetest.override_item("farming:hoe_mese", {
|
||||||
original_description = S("Mese Hoe"),
|
original_description = S("Mese Hoe"),
|
||||||
description = toolranks.create_description(S("Mese Hoe"))})
|
description = toolranks.create_description(S("Mese Hoe"))})
|
||||||
|
|
||||||
core.override_item("farming:hoe_diamond", {
|
minetest.override_item("farming:hoe_diamond", {
|
||||||
original_description = S("Diamond Hoe"),
|
original_description = S("Diamond Hoe"),
|
||||||
description = toolranks.create_description(S("Diamond Hoe"))})
|
description = toolranks.create_description(S("Diamond Hoe"))})
|
||||||
end
|
end
|
||||||
@ -231,60 +234,82 @@ end
|
|||||||
local function hoe_area(pos, player)
|
local function hoe_area(pos, player)
|
||||||
|
|
||||||
-- check for protection
|
-- check for protection
|
||||||
if core.is_protected(pos, player:get_player_name()) then
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
core.record_protection_violation(pos, player:get_player_name())
|
minetest.record_protection_violation(pos, player:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local r = 5 -- radius
|
local r = 5 -- radius
|
||||||
|
|
||||||
-- remove flora (grass, flowers etc.)
|
-- remove flora (grass, flowers etc.)
|
||||||
local res = core.find_nodes_in_area(
|
local res = minetest.find_nodes_in_area(
|
||||||
{x = pos.x - r, y = pos.y - 1, z = pos.z - r},
|
{x = pos.x - r, y = pos.y - 1, z = pos.z - r},
|
||||||
{x = pos.x + r, y = pos.y + 1, z = pos.z + r},
|
{x = pos.x + r, y = pos.y + 2, z = pos.z + r}, {"group:flora"})
|
||||||
{"group:flora", "group:grass", "group:dry_grass", "default:dry_shrub"})
|
|
||||||
|
|
||||||
for n = 1, #res do
|
for n = 1, #res do
|
||||||
core.swap_node(res[n], {name = "air"})
|
minetest.swap_node(res[n], {name = "air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- replace dirt with tilled soil
|
-- replace dirt with tilled soil
|
||||||
res = core.find_nodes_in_area_under_air(
|
res = minetest.find_nodes_in_area_under_air(
|
||||||
{x = pos.x - r, y = pos.y - 1, z = pos.z - r},
|
{x = pos.x - r, y = pos.y - 1, z = pos.z - r},
|
||||||
{x = pos.x + r, y = pos.y + 2, z = pos.z + r},
|
{x = pos.x + r, y = pos.y + 2, z = pos.z + r},
|
||||||
{"group:soil", "ethereal:dry_dirt"})
|
{"group:soil"})
|
||||||
|
|
||||||
for n = 1, #res do
|
for n = 1, #res do
|
||||||
core.swap_node(res[n], {name = "farming:soil"})
|
minetest.swap_node(res[n], {name = "farming:soil"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- throwable hoe bomb entity
|
-- throwable hoe bomb entity
|
||||||
|
|
||||||
core.register_entity("farming:hoebomb_entity", {
|
minetest.register_entity("farming:hoebomb_entity", {
|
||||||
|
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
physical = true,
|
physical = true,
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
visual_size = {x = 1.0, y = 1.0},
|
visual_size = {x = 1.0, y = 1.0},
|
||||||
textures = {"farming_hoe_bomb.png"},
|
textures = {"farming_hoe_bomb.png"},
|
||||||
collisionbox = {-0.2,-0.2,-0.2,0.2,0.2,0.2}
|
collisionbox = {-0.1,-0.1,-0.1,0.1,0.1,0.1}
|
||||||
},
|
},
|
||||||
|
|
||||||
on_step = function(self, dtime, moveresult)
|
lastpos = {},
|
||||||
|
player = "",
|
||||||
|
|
||||||
|
on_step = function(self, dtime)
|
||||||
|
|
||||||
if not self.player then
|
if not self.player then
|
||||||
self.object:remove() ; return
|
|
||||||
end
|
|
||||||
|
|
||||||
if moveresult.collides then
|
|
||||||
|
|
||||||
local pos = vector.round(self.object:get_pos())
|
|
||||||
|
|
||||||
pos.y = pos.y - 1 ; hoe_area(pos, self.player)
|
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
|
if self.lastpos.x ~= nil then
|
||||||
|
|
||||||
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- only when potion hits something physical
|
||||||
|
if vel.x == 0 or vel.y == 0 or vel.z == 0 then
|
||||||
|
|
||||||
|
if self.player ~= "" then
|
||||||
|
|
||||||
|
-- round up coords to fix glitching through doors
|
||||||
|
self.lastpos = vector.round(self.lastpos)
|
||||||
|
|
||||||
|
hoe_area(self.lastpos, self.player)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.object:remove()
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self.lastpos = pos
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -294,7 +319,7 @@ local function throw_potion(itemstack, player)
|
|||||||
|
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
|
|
||||||
local obj = core.add_entity({
|
local obj = minetest.add_entity({
|
||||||
x = pos.x, y = pos.y + 1.5, z = pos.z}, "farming:hoebomb_entity")
|
x = pos.x, y = pos.y + 1.5, z = pos.z}, "farming:hoebomb_entity")
|
||||||
|
|
||||||
if not obj then return end
|
if not obj then return end
|
||||||
@ -311,7 +336,7 @@ end
|
|||||||
|
|
||||||
-- hoe bomb item
|
-- hoe bomb item
|
||||||
|
|
||||||
core.register_craftitem("farming:hoe_bomb", {
|
minetest.register_craftitem("farming:hoe_bomb", {
|
||||||
description = S("Hoe Bomb (use or throw on grassy areas to hoe land)"),
|
description = S("Hoe Bomb (use or throw on grassy areas to hoe land)"),
|
||||||
inventory_image = "farming_hoe_bomb.png",
|
inventory_image = "farming_hoe_bomb.png",
|
||||||
groups = {flammable = 2, not_in_creative_inventory = 1},
|
groups = {flammable = 2, not_in_creative_inventory = 1},
|
||||||
@ -319,7 +344,7 @@ core.register_craftitem("farming:hoe_bomb", {
|
|||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
hoe_area(pointed_thing.under, user)
|
hoe_area(pointed_thing.above, user)
|
||||||
else
|
else
|
||||||
throw_potion(itemstack, user)
|
throw_potion(itemstack, user)
|
||||||
|
|
||||||
@ -357,7 +382,7 @@ end
|
|||||||
|
|
||||||
-- Mithril Scythe (special item)
|
-- Mithril Scythe (special item)
|
||||||
|
|
||||||
core.register_tool("farming:scythe_mithril", {
|
minetest.register_tool("farming:scythe_mithril", {
|
||||||
description = S("Mithril Scythe (Use to harvest and replant crops)"),
|
description = S("Mithril Scythe (Use to harvest and replant crops)"),
|
||||||
inventory_image = "farming_scythe_mithril.png",
|
inventory_image = "farming_scythe_mithril.png",
|
||||||
sound = {breaks = "default_tool_breaks"},
|
sound = {breaks = "default_tool_breaks"},
|
||||||
@ -369,19 +394,19 @@ core.register_tool("farming:scythe_mithril", {
|
|||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
local name = placer:get_player_name()
|
local name = placer:get_player_name()
|
||||||
|
|
||||||
if core.is_protected(pos, name) then return end
|
if minetest.is_protected(pos, name) then return end
|
||||||
|
|
||||||
local node = core.get_node_or_nil(pos)
|
local node = minetest.get_node_or_nil(pos)
|
||||||
|
|
||||||
if not node then return end
|
if not node then return end
|
||||||
|
|
||||||
local def = core.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
if not def or not def.drop or not def.groups or not def.groups.plant then
|
if not def or not def.drop or not def.groups or not def.groups.plant then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local drops = core.get_node_drops(node.name, "")
|
local drops = minetest.get_node_drops(node.name, "")
|
||||||
|
|
||||||
if not drops or #drops == 0 or (#drops == 1 and drops[1] == "") then
|
if not drops or #drops == 0 or (#drops == 1 and drops[1] == "") then
|
||||||
return
|
return
|
||||||
@ -406,7 +431,7 @@ core.register_tool("farming:scythe_mithril", {
|
|||||||
|
|
||||||
if dropped_item then
|
if dropped_item then
|
||||||
|
|
||||||
local obj = core.add_item(pos, dropped_item)
|
local obj = minetest.add_item(pos, dropped_item)
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
|
|
||||||
@ -422,18 +447,18 @@ core.register_tool("farming:scythe_mithril", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- play sound
|
-- play sound
|
||||||
core.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}, true)
|
minetest.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}, true)
|
||||||
|
|
||||||
-- replace with seed or crop_1
|
-- replace with seed or crop_1
|
||||||
local replace = mname .. ":" .. pname .. "1"
|
local replace = mname .. ":" .. pname .. "1"
|
||||||
|
|
||||||
if core.registered_nodes[replace] then
|
if minetest.registered_nodes[replace] then
|
||||||
|
|
||||||
local p2 = core.registered_nodes[replace].place_param2 or 1
|
local p2 = minetest.registered_nodes[replace].place_param2 or 1
|
||||||
|
|
||||||
core.set_node(pos, {name = replace, param2 = p2})
|
minetest.set_node(pos, {name = replace, param2 = p2})
|
||||||
else
|
else
|
||||||
core.set_node(pos, {name = "air"})
|
minetest.set_node(pos, {name = "air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
if not farming.is_creative(name) then
|
if not farming.is_creative(name) then
|
||||||
@ -447,9 +472,9 @@ core.register_tool("farming:scythe_mithril", {
|
|||||||
|
|
||||||
-- if moreores found add mithril scythe recipe
|
-- if moreores found add mithril scythe recipe
|
||||||
|
|
||||||
if core.get_modpath("moreores") then
|
if minetest.get_modpath("moreores") then
|
||||||
|
|
||||||
core.register_craft({
|
minetest.register_craft({
|
||||||
output = "farming:scythe_mithril",
|
output = "farming:scythe_mithril",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "moreores:mithril_ingot", "moreores:mithril_ingot"},
|
{"", "moreores:mithril_ingot", "moreores:mithril_ingot"},
|
||||||
|
209
init.lua
@ -6,23 +6,22 @@
|
|||||||
|
|
||||||
-- Translation support
|
-- Translation support
|
||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- global
|
-- global
|
||||||
|
|
||||||
farming = {
|
farming = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20250717",
|
version = "20240912",
|
||||||
path = core.get_modpath("farming"),
|
path = minetest.get_modpath("farming"),
|
||||||
select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||||
select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}},
|
select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}},
|
||||||
registered_plants = {},
|
registered_plants = {},
|
||||||
min_light = 12, max_light = 15,
|
min_light = 12, max_light = 15,
|
||||||
mapgen = core.get_mapgen_setting("mg_name"),
|
mapgen = minetest.get_mapgen_setting("mg_name"),
|
||||||
use_utensils = core.settings:get_bool("farming_use_utensils") ~= false,
|
use_utensils = minetest.settings:get_bool("farming_use_utensils") ~= false,
|
||||||
mtg = core.get_modpath("default"),
|
mtg = minetest.get_modpath("default"),
|
||||||
eth = core.get_modpath("ethereal"),
|
mcl = minetest.get_modpath("mcl_core"),
|
||||||
mcl = core.get_modpath("mcl_core"),
|
|
||||||
mcl_hardness = 0.01,
|
mcl_hardness = 0.01,
|
||||||
translate = S
|
translate = S
|
||||||
}
|
}
|
||||||
@ -50,17 +49,17 @@ sound_helper("node_sound_glass_defaults")
|
|||||||
|
|
||||||
-- check for creative mode or priv
|
-- check for creative mode or priv
|
||||||
|
|
||||||
local creative_mode_cache = core.settings:get_bool("creative_mode")
|
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
||||||
|
|
||||||
function farming.is_creative(name)
|
function farming.is_creative(name)
|
||||||
return creative_mode_cache or core.check_player_privs(name, {creative = true})
|
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- stats, locals, settings, function helper
|
-- stats, locals, settings, function helper
|
||||||
|
|
||||||
local statistics = dofile(farming.path .. "/statistics.lua")
|
local statistics = dofile(farming.path .. "/statistics.lua")
|
||||||
local random, floor = math.random, math.floor
|
local random, floor = math.random, math.floor
|
||||||
local time_speed = tonumber(core.settings:get("time_speed")) or 72
|
local time_speed = tonumber(minetest.settings:get("time_speed")) or 72
|
||||||
local SECS_PER_CYCLE = (time_speed > 0 and (24 * 60 * 60) / time_speed) or 0
|
local SECS_PER_CYCLE = (time_speed > 0 and (24 * 60 * 60) / time_speed) or 0
|
||||||
local function clamp(x, min, max) return (x < min and min) or (x > max and max) or x end
|
local function clamp(x, min, max) return (x < min and min) or (x > max and max) or x end
|
||||||
|
|
||||||
@ -69,7 +68,7 @@ local function clamp(x, min, max) return (x < min and min) or (x > max and max)
|
|||||||
|
|
||||||
local function day_or_night_time(dt, count_day)
|
local function day_or_night_time(dt, count_day)
|
||||||
|
|
||||||
local t_day = core.get_timeofday()
|
local t_day = minetest.get_timeofday()
|
||||||
local t1_day = t_day - dt / SECS_PER_CYCLE
|
local t1_day = t_day - dt / SECS_PER_CYCLE
|
||||||
local t1_c, t2_c -- t1_c < t2_c and t2_c always in [0, 1)
|
local t1_c, t2_c -- t1_c < t2_c and t2_c always in [0, 1)
|
||||||
|
|
||||||
@ -107,14 +106,14 @@ end
|
|||||||
|
|
||||||
-- Growth Logic
|
-- Growth Logic
|
||||||
|
|
||||||
local STAGE_LENGTH_AVG = tonumber(core.settings:get("farming_stage_length")) or 200
|
local STAGE_LENGTH_AVG = tonumber(minetest.settings:get("farming_stage_length")) or 200
|
||||||
local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6
|
local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6
|
||||||
|
|
||||||
-- quick start seed timer
|
-- quick start seed timer
|
||||||
|
|
||||||
function farming.start_seed_timer(pos)
|
farming.start_seed_timer = function(pos)
|
||||||
|
|
||||||
local timer = core.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
local grow_time = floor(random(STAGE_LENGTH_DEV, STAGE_LENGTH_AVG))
|
local grow_time = floor(random(STAGE_LENGTH_DEV, STAGE_LENGTH_AVG))
|
||||||
|
|
||||||
timer:start(grow_time)
|
timer:start(grow_time)
|
||||||
@ -130,7 +129,7 @@ local function plant_name_stage(node)
|
|||||||
|
|
||||||
if node.name then name = node.name
|
if node.name then name = node.name
|
||||||
elseif node.x and node.y and node.z then
|
elseif node.x and node.y and node.z then
|
||||||
node = core.get_node_or_nil(node)
|
node = minetest.get_node_or_nil(node)
|
||||||
name = node and node.name
|
name = node and node.name
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -170,7 +169,7 @@ farming.plant_stages = plant_stages
|
|||||||
local function reg_plant_stages(plant_name, stage, force_last)
|
local function reg_plant_stages(plant_name, stage, force_last)
|
||||||
|
|
||||||
local node_name = plant_name and plant_name .. "_" .. stage
|
local node_name = plant_name and plant_name .. "_" .. stage
|
||||||
local node_def = node_name and core.registered_nodes[node_name]
|
local node_def = node_name and minetest.registered_nodes[node_name]
|
||||||
|
|
||||||
if not node_def then return nil end
|
if not node_def then return nil end
|
||||||
|
|
||||||
@ -178,7 +177,7 @@ local function reg_plant_stages(plant_name, stage, force_last)
|
|||||||
|
|
||||||
if stages then return stages end
|
if stages then return stages end
|
||||||
|
|
||||||
if core.get_item_group(node_name, "growing") > 0 then
|
if minetest.get_item_group(node_name, "growing") > 0 then
|
||||||
|
|
||||||
local ns = reg_plant_stages(plant_name, stage + 1, true)
|
local ns = reg_plant_stages(plant_name, stage + 1, true)
|
||||||
local stages_left = (ns and { ns.name, unpack(ns.stages_left) }) or {}
|
local stages_left = (ns and { ns.name, unpack(ns.stages_left) }) or {}
|
||||||
@ -195,7 +194,7 @@ local function reg_plant_stages(plant_name, stage, force_last)
|
|||||||
local old_constr = node_def.on_construct
|
local old_constr = node_def.on_construct
|
||||||
local old_destr = node_def.on_destruct
|
local old_destr = node_def.on_destruct
|
||||||
|
|
||||||
core.override_item(node_name, {
|
minetest.override_item(node_name, {
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
|
||||||
@ -206,7 +205,7 @@ local function reg_plant_stages(plant_name, stage, force_last)
|
|||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
|
|
||||||
core.get_node_timer(pos):stop()
|
minetest.get_node_timer(pos):stop()
|
||||||
|
|
||||||
if old_destr then old_destr(pos) end
|
if old_destr then old_destr(pos) end
|
||||||
end,
|
end,
|
||||||
@ -254,7 +253,7 @@ local function set_growing(pos, stages_left)
|
|||||||
|
|
||||||
if not stages_left then return end
|
if not stages_left then return end
|
||||||
|
|
||||||
local timer = core.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
|
|
||||||
if stages_left > 0 then
|
if stages_left > 0 then
|
||||||
|
|
||||||
@ -285,9 +284,9 @@ end
|
|||||||
|
|
||||||
-- register crops nodes and add timer functions
|
-- register crops nodes and add timer functions
|
||||||
|
|
||||||
core.after(0, function()
|
minetest.after(0, function()
|
||||||
|
|
||||||
for _, node_def in pairs(core.registered_nodes) do
|
for _, node_def in pairs(minetest.registered_nodes) do
|
||||||
register_plant_node(node_def)
|
register_plant_node(node_def)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -295,19 +294,43 @@ end)
|
|||||||
-- Just in case a growing type or added node is missed (also catches existing
|
-- Just in case a growing type or added node is missed (also catches existing
|
||||||
-- nodes added to map before timers were incorporated).
|
-- nodes added to map before timers were incorporated).
|
||||||
|
|
||||||
core.register_lbm({
|
minetest.register_abm({
|
||||||
label = "Start crop timer",
|
label = "Start crop timer",
|
||||||
name = "farming:start_crop_timer",
|
|
||||||
nodenames = {"group:growing"},
|
nodenames = {"group:growing"},
|
||||||
run_at_every_load = false,
|
interval = 300,
|
||||||
|
chance = 1,
|
||||||
|
catch_up = false,
|
||||||
|
|
||||||
action = function(pos, node, dtime_s)
|
action = function(pos, node)
|
||||||
|
|
||||||
local timer = core.get_node_timer(pos)
|
-- skip if node timer already active
|
||||||
|
if minetest.get_node_timer(pos):is_started() then return end
|
||||||
|
|
||||||
if timer:is_started() then return end
|
-- check if group:growing node is a seed
|
||||||
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
farming.start_seed_timer(pos)
|
if def and def.groups and def.groups.seed then
|
||||||
|
|
||||||
|
if def.on_timer then -- start node timer if found
|
||||||
|
|
||||||
|
farming.start_seed_timer(pos)
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local next_stage = def.next_plant
|
||||||
|
|
||||||
|
def = minetest.registered_nodes[next_stage]
|
||||||
|
|
||||||
|
if def then -- switch seed without timer to stage_1 of crop
|
||||||
|
|
||||||
|
local p2 = def.place_param2 or 1
|
||||||
|
|
||||||
|
minetest.set_node(pos, {name = next_stage, param2 = p2})
|
||||||
|
end
|
||||||
|
else
|
||||||
|
farming.handle_growth(pos, node) -- start normal crop timer
|
||||||
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -315,9 +338,9 @@ core.register_lbm({
|
|||||||
|
|
||||||
farming.can_grow = function(pos)
|
farming.can_grow = function(pos)
|
||||||
|
|
||||||
local below = core.get_node({x = pos.x, y = pos.y -1, z = pos.z})
|
local below = minetest.get_node({x = pos.x, y = pos.y -1, z = pos.z})
|
||||||
|
|
||||||
return core.get_item_group(below.name, "soil") >= 3
|
return minetest.get_item_group(below.name, "soil") >= 3
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Plant timer function that grows plants under the right conditions.
|
-- Plant timer function that grows plants under the right conditions.
|
||||||
@ -332,8 +355,8 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
|||||||
|
|
||||||
if max_growth <= 0 then return false end
|
if max_growth <= 0 then return false end
|
||||||
|
|
||||||
local chk1 = core.registered_nodes[node_name].growth_check -- old
|
local chk1 = minetest.registered_nodes[node_name].growth_check -- old
|
||||||
local chk2 = core.registered_nodes[node_name].can_grow -- new
|
local chk2 = minetest.registered_nodes[node_name].can_grow -- new
|
||||||
|
|
||||||
if chk1 then -- custom farming redo growth_check function
|
if chk1 then -- custom farming redo growth_check function
|
||||||
|
|
||||||
@ -352,19 +375,19 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
|||||||
|
|
||||||
if lambda < 0.1 then return true end
|
if lambda < 0.1 then return true end
|
||||||
|
|
||||||
local MIN_LIGHT = core.registered_nodes[node_name].minlight or farming.min_light
|
local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or farming.min_light
|
||||||
local MAX_LIGHT = core.registered_nodes[node_name].maxlight or farming.max_light
|
local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or farming.max_light
|
||||||
|
|
||||||
if max_growth == 1 or lambda < 2.0 then
|
if max_growth == 1 or lambda < 2.0 then
|
||||||
|
|
||||||
local light = (core.get_node_light(light_pos) or 0)
|
local light = (minetest.get_node_light(light_pos) or 0)
|
||||||
|
|
||||||
if light < MIN_LIGHT or light > MAX_LIGHT then return true end
|
if light < MIN_LIGHT or light > MAX_LIGHT then return true end
|
||||||
|
|
||||||
growth = 1
|
growth = 1
|
||||||
else
|
else
|
||||||
local night_light = core.get_node_light(light_pos, 0) or 0
|
local night_light = (minetest.get_node_light(light_pos, 0) or 0)
|
||||||
local day_light = core.get_node_light(light_pos, 0.5) or 0
|
local day_light = (minetest.get_node_light(light_pos, 0.5) or 0)
|
||||||
local night_growth = night_light >= MIN_LIGHT and night_light <= MAX_LIGHT
|
local night_growth = night_light >= MIN_LIGHT and night_light <= MAX_LIGHT
|
||||||
local day_growth = day_light >= MIN_LIGHT and day_light <= MAX_LIGHT
|
local day_growth = day_light >= MIN_LIGHT and day_light <= MAX_LIGHT
|
||||||
|
|
||||||
@ -384,11 +407,11 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
|||||||
if growth < 1 then return true end
|
if growth < 1 then return true end
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.registered_nodes[stages.stages_left[growth]] then
|
if minetest.registered_nodes[stages.stages_left[growth]] then
|
||||||
|
|
||||||
local p2 = core.registered_nodes[stages.stages_left[growth] ].place_param2 or 1
|
local p2 = minetest.registered_nodes[stages.stages_left[growth] ].place_param2 or 1
|
||||||
|
|
||||||
core.set_node(pos, {name = stages.stages_left[growth], param2 = p2})
|
minetest.set_node(pos, {name = stages.stages_left[growth], param2 = p2})
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -428,47 +451,47 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not itemstack or not pt or pt.type ~= "node" then return end
|
if not itemstack or not pt or pt.type ~= "node" then return end
|
||||||
|
|
||||||
local under = core.get_node(pt.under)
|
local under = minetest.get_node(pt.under)
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
-- am I right-clicking on something that has a custom on_place set?
|
||||||
-- thanks to Krock for helping with this issue :)
|
-- thanks to Krock for helping with this issue :)
|
||||||
local def = core.registered_nodes[under.name]
|
local def = minetest.registered_nodes[under.name]
|
||||||
|
|
||||||
if placer and itemstack and def and def.on_rightclick then
|
if placer and itemstack and def and def.on_rightclick then
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
||||||
end
|
end
|
||||||
|
|
||||||
local above = core.get_node(pt.above)
|
local above = minetest.get_node(pt.above)
|
||||||
|
|
||||||
-- check if pointing at the top of the node
|
-- check if pointing at the top of the node
|
||||||
if pt.above.y ~= pt.under.y + 1 then return end
|
if pt.above.y ~= pt.under.y + 1 then return end
|
||||||
|
|
||||||
-- return if any of the nodes is not registered
|
-- return if any of the nodes is not registered
|
||||||
if not core.registered_nodes[under.name]
|
if not minetest.registered_nodes[under.name]
|
||||||
or not core.registered_nodes[above.name] then return end
|
or not minetest.registered_nodes[above.name] then return end
|
||||||
|
|
||||||
-- can I replace above node, and am I pointing directly at soil
|
-- can I replace above node, and am I pointing directly at soil
|
||||||
if not core.registered_nodes[above.name].buildable_to
|
if not minetest.registered_nodes[above.name].buildable_to
|
||||||
or core.get_item_group(under.name, "soil") < 2
|
or minetest.get_item_group(under.name, "soil") < 2
|
||||||
or core.get_item_group(above.name, "plant") ~= 0 then return end
|
or minetest.get_item_group(above.name, "plant") ~= 0 then return end
|
||||||
|
|
||||||
-- is player planting seed?
|
-- is player planting seed?
|
||||||
local name = placer and placer:get_player_name() or ""
|
local name = placer and placer:get_player_name() or ""
|
||||||
|
|
||||||
-- if not protected then add node and remove 1 item from the itemstack
|
-- if not protected then add node and remove 1 item from the itemstack
|
||||||
if not core.is_protected(pt.above, name) then
|
if not minetest.is_protected(pt.above, name) then
|
||||||
|
|
||||||
local p2 = core.registered_nodes[plantname].place_param2 or 1
|
local p2 = minetest.registered_nodes[plantname].place_param2 or 1
|
||||||
|
|
||||||
core.set_node(pt.above, {name = plantname, param2 = p2})
|
minetest.set_node(pt.above, {name = plantname, param2 = p2})
|
||||||
|
|
||||||
farming.start_seed_timer(pt.above)
|
farming.start_seed_timer(pt.above)
|
||||||
|
|
||||||
core.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
||||||
|
|
||||||
core.log("action", string.format("%s planted %s at %s",
|
minetest.log("action", string.format("%s planted %s at %s",
|
||||||
(placer and placer:is_player() and placer:get_player_name() or "A mod"),
|
(placer and placer:is_player() and placer:get_player_name() or "A mod"),
|
||||||
itemstack:get_name(), core.pos_to_string(pt.above)
|
itemstack:get_name(), minetest.pos_to_string(pt.above)
|
||||||
))
|
))
|
||||||
|
|
||||||
if placer and itemstack
|
if placer and itemstack
|
||||||
@ -481,7 +504,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
|||||||
-- check for refill
|
-- check for refill
|
||||||
if itemstack:get_count() == 0 then
|
if itemstack:get_count() == 0 then
|
||||||
|
|
||||||
core.after(0.2, farming.refill_plant,
|
minetest.after(0.2, farming.refill_plant,
|
||||||
placer, name, placer:get_wield_index())
|
placer, name, placer:get_wield_index())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -492,7 +515,7 @@ end
|
|||||||
|
|
||||||
-- Function to register plants (default farming compatibility)
|
-- Function to register plants (default farming compatibility)
|
||||||
|
|
||||||
function farming.register_plant(name, def)
|
farming.register_plant = function(name, def)
|
||||||
|
|
||||||
if not def.steps then return nil end
|
if not def.steps then return nil end
|
||||||
|
|
||||||
@ -506,7 +529,7 @@ function farming.register_plant(name, def)
|
|||||||
def.maxlight = def.maxlight or 15
|
def.maxlight = def.maxlight or 15
|
||||||
|
|
||||||
-- Register seed
|
-- Register seed
|
||||||
core.register_node(":" .. mname .. ":seed_" .. pname, {
|
minetest.register_node(":" .. mname .. ":seed_" .. pname, {
|
||||||
|
|
||||||
description = def.description,
|
description = def.description,
|
||||||
tiles = {def.inventory_image},
|
tiles = {def.inventory_image},
|
||||||
@ -524,16 +547,15 @@ function farming.register_plant(name, def)
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
fertility = def.fertility or {},
|
|
||||||
place_param2 = 1, -- place seed flat
|
place_param2 = 1, -- place seed flat
|
||||||
next_plant = mname .. ":" .. pname .. "_1",
|
next_plant = mname .. ":" .. pname .. "_1",
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
|
|
||||||
local def = core.registered_nodes[mname .. ":" .. pname .. "_1"]
|
local def = minetest.registered_nodes[mname .. ":" .. pname .. "_1"]
|
||||||
|
|
||||||
if def then
|
if def then
|
||||||
core.set_node(pos, {name = def.name, param2 = def.place_param2})
|
minetest.swap_node(pos, {name = def.next_plant, param2 = def.place_param2})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -545,7 +567,7 @@ function farming.register_plant(name, def)
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Register harvest
|
-- Register harvest
|
||||||
core.register_craftitem(":" .. mname .. ":" .. pname, {
|
minetest.register_craftitem(":" .. mname .. ":" .. pname, {
|
||||||
description = pname:gsub("^%l", string.upper),
|
description = pname:gsub("^%l", string.upper),
|
||||||
inventory_image = mname .. "_" .. pname .. ".png",
|
inventory_image = mname .. "_" .. pname .. ".png",
|
||||||
groups = def.groups or {flammable = 2},
|
groups = def.groups or {flammable = 2},
|
||||||
@ -592,7 +614,7 @@ function farming.register_plant(name, def)
|
|||||||
|
|
||||||
local desc = pname:gsub("^%l", string.upper)
|
local desc = pname:gsub("^%l", string.upper)
|
||||||
|
|
||||||
core.register_node(node_name, {
|
minetest.register_node(node_name, {
|
||||||
description = S(desc) .. S(" Crop"),
|
description = S(desc) .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
waving = 1,
|
waving = 1,
|
||||||
@ -633,41 +655,40 @@ end
|
|||||||
farming.asparagus = 0.002
|
farming.asparagus = 0.002
|
||||||
farming.eggplant = 0.002
|
farming.eggplant = 0.002
|
||||||
farming.spinach = 0.002
|
farming.spinach = 0.002
|
||||||
farming.carrot = 0.002
|
farming.carrot = 0.001
|
||||||
farming.potato = 0.002
|
farming.potato = 0.001
|
||||||
farming.tomato = 0.002
|
farming.tomato = 0.001
|
||||||
farming.cucumber = 0.002
|
farming.cucumber = 0.001
|
||||||
farming.corn = 0.002
|
farming.corn = 0.001
|
||||||
farming.coffee = 0.002
|
farming.coffee = 0.001
|
||||||
farming.melon = 0.009
|
farming.melon = 0.001
|
||||||
farming.pumpkin = 0.009
|
farming.pumpkin = 0.001
|
||||||
farming.cocoa = true
|
farming.cocoa = true
|
||||||
farming.raspberry = 0.002
|
farming.raspberry = 0.001
|
||||||
farming.blueberry = 0.002
|
farming.blueberry = 0.001
|
||||||
farming.rhubarb = 0.002
|
farming.rhubarb = 0.001
|
||||||
farming.beans = 0.002
|
farming.beans = 0.001
|
||||||
farming.grapes = 0.002
|
farming.grapes = 0.001
|
||||||
farming.barley = true
|
farming.barley = true
|
||||||
farming.chili = 0.003
|
farming.chili = 0.003
|
||||||
farming.hemp = 0.003
|
farming.hemp = 0.003
|
||||||
farming.garlic = 0.002
|
farming.garlic = 0.001
|
||||||
farming.onion = 0.002
|
farming.onion = 0.001
|
||||||
farming.pepper = 0.002
|
farming.pepper = 0.002
|
||||||
farming.pineapple = 0.003
|
farming.pineapple = 0.001
|
||||||
farming.peas = 0.002
|
farming.peas = 0.001
|
||||||
farming.beetroot = 0.002
|
farming.beetroot = 0.001
|
||||||
farming.mint = 0.005
|
farming.mint = 0.005
|
||||||
farming.cabbage = 0.002
|
farming.cabbage = 0.001
|
||||||
farming.blackberry = 0.002
|
farming.blackberry = 0.002
|
||||||
farming.soy = 0.002
|
farming.soy = 0.001
|
||||||
farming.vanilla = 0.002
|
farming.vanilla = 0.001
|
||||||
farming.lettuce = 0.002
|
farming.lettuce = 0.001
|
||||||
farming.artichoke = 0.002
|
farming.artichoke = 0.001
|
||||||
farming.parsley = 0.002
|
farming.parsley = 0.002
|
||||||
farming.sunflower = 0.002
|
farming.sunflower = 0.001
|
||||||
farming.ginger = 0.002
|
farming.ginger = 0.002
|
||||||
farming.strawberry = 0.002
|
farming.strawberry = 0.002
|
||||||
farming.cotton = 0.003
|
|
||||||
farming.grains = true
|
farming.grains = true
|
||||||
farming.rice = true
|
farming.rice = true
|
||||||
|
|
||||||
@ -679,7 +700,7 @@ if input then dofile(farming.path .. "/farming.conf") ; input:close() end
|
|||||||
|
|
||||||
-- load new world-specific settings if found inside world folder
|
-- load new world-specific settings if found inside world folder
|
||||||
|
|
||||||
local worldpath = core.get_worldpath()
|
local worldpath = minetest.get_worldpath()
|
||||||
|
|
||||||
input = io.open(worldpath .. "/farming.conf", "r")
|
input = io.open(worldpath .. "/farming.conf", "r")
|
||||||
|
|
||||||
@ -689,7 +710,7 @@ if input then dofile(worldpath .. "/farming.conf") ; input:close() end
|
|||||||
|
|
||||||
function farming.add_eatable(item, hp)
|
function farming.add_eatable(item, hp)
|
||||||
|
|
||||||
local def = core.registered_items[item]
|
local def = minetest.registered_items[item]
|
||||||
|
|
||||||
if def then
|
if def then
|
||||||
|
|
||||||
@ -697,7 +718,7 @@ function farming.add_eatable(item, hp)
|
|||||||
|
|
||||||
groups.eatable = hp ; groups.flammable = 2
|
groups.eatable = hp ; groups.flammable = 2
|
||||||
|
|
||||||
core.override_item(item, {groups = groups})
|
minetest.override_item(item, {groups = groups})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -707,7 +728,7 @@ dofile(farming.path .. "/item_list.lua")
|
|||||||
|
|
||||||
-- setup soil, register hoes, override grass
|
-- setup soil, register hoes, override grass
|
||||||
|
|
||||||
if core.get_modpath("default") then
|
if minetest.get_modpath("default") then
|
||||||
dofile(farming.path .. "/soil.lua")
|
dofile(farming.path .. "/soil.lua")
|
||||||
dofile(farming.path .. "/hoes.lua")
|
dofile(farming.path .. "/hoes.lua")
|
||||||
end
|
end
|
||||||
@ -789,7 +810,7 @@ if not farming.mcl then
|
|||||||
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
|
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.get_modpath("lucky_block") then
|
if minetest.get_modpath("lucky_block") then
|
||||||
dofile(farming.path .. "/lucky_block.lua")
|
dofile(farming.path .. "/lucky_block.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
305
item_food.lua
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
local a = farming.recipe_items
|
||||||
|
|
||||||
-- Flour
|
-- Flour
|
||||||
|
|
||||||
core.register_craftitem("farming:flour", {
|
minetest.register_craftitem("farming:flour", {
|
||||||
description = S("Flour"),
|
description = S("Flour"),
|
||||||
inventory_image = "farming_flour.png",
|
inventory_image = "farming_flour.png",
|
||||||
groups = {food_flour = 1, flammable = 1}
|
groups = {food_flour = 1, flammable = 1}
|
||||||
@ -12,10 +12,10 @@ core.register_craftitem("farming:flour", {
|
|||||||
|
|
||||||
-- Garlic bulb
|
-- Garlic bulb
|
||||||
|
|
||||||
core.register_craftitem("farming:garlic", {
|
minetest.register_craftitem("farming:garlic", {
|
||||||
description = S("Garlic"),
|
description = S("Garlic"),
|
||||||
inventory_image = "crops_garlic.png",
|
inventory_image = "crops_garlic.png",
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
groups = {food_garlic = 1, compostability = 55}
|
groups = {food_garlic = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ farming.add_eatable("farming:garlic", 1)
|
|||||||
|
|
||||||
-- Garlic braid
|
-- Garlic braid
|
||||||
|
|
||||||
core.register_node("farming:garlic_braid", {
|
minetest.register_node("farming:garlic_braid", {
|
||||||
description = S("Garlic Braid"),
|
description = S("Garlic Braid"),
|
||||||
inventory_image = "crops_garlic_braid.png",
|
inventory_image = "crops_garlic_braid.png",
|
||||||
wield_image = "crops_garlic_braid.png",
|
wield_image = "crops_garlic_braid.png",
|
||||||
@ -49,29 +49,29 @@ core.register_node("farming:garlic_braid", {
|
|||||||
|
|
||||||
-- Corn on the cob (texture by TenPlus1)
|
-- Corn on the cob (texture by TenPlus1)
|
||||||
|
|
||||||
core.register_craftitem("farming:corn_cob", {
|
minetest.register_craftitem("farming:corn_cob", {
|
||||||
description = S("Corn on the Cob"),
|
description = S("Corn on the Cob"),
|
||||||
inventory_image = "farming_corn_cob.png",
|
inventory_image = "farming_corn_cob.png",
|
||||||
groups = {compostability = 65, food_corn_cooked = 1},
|
groups = {compostability = 65, food_corn_cooked = 1},
|
||||||
on_use = core.item_eat(5)
|
on_use = minetest.item_eat(5)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:corn_cob", 5)
|
farming.add_eatable("farming:corn_cob", 5)
|
||||||
|
|
||||||
-- Popcorn
|
-- Popcorn
|
||||||
|
|
||||||
core.register_craftitem("farming:popcorn", {
|
minetest.register_craftitem("farming:popcorn", {
|
||||||
description = S("Popcorn"),
|
description = S("Popcorn"),
|
||||||
inventory_image = "farming_popcorn.png",
|
inventory_image = "farming_popcorn.png",
|
||||||
groups = {compostability = 55, food_popcorn = 1},
|
groups = {compostability = 55, food_popcorn = 1},
|
||||||
on_use = core.item_eat(4)
|
on_use = minetest.item_eat(4)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:popcorn", 4)
|
farming.add_eatable("farming:popcorn", 4)
|
||||||
|
|
||||||
-- Cornstarch
|
-- Cornstarch
|
||||||
|
|
||||||
core.register_craftitem("farming:cornstarch", {
|
minetest.register_craftitem("farming:cornstarch", {
|
||||||
description = S("Cornstarch"),
|
description = S("Cornstarch"),
|
||||||
inventory_image = "farming_cornstarch.png",
|
inventory_image = "farming_cornstarch.png",
|
||||||
groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2, compostability = 65}
|
groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2, compostability = 65}
|
||||||
@ -79,7 +79,7 @@ core.register_craftitem("farming:cornstarch", {
|
|||||||
|
|
||||||
-- Cup of coffee
|
-- Cup of coffee
|
||||||
|
|
||||||
core.register_node("farming:coffee_cup", {
|
minetest.register_node("farming:coffee_cup", {
|
||||||
description = S("Cup of Coffee"),
|
description = S("Cup of Coffee"),
|
||||||
drawtype = "torchlike",
|
drawtype = "torchlike",
|
||||||
tiles = {"farming_coffee_cup.png"},
|
tiles = {"farming_coffee_cup.png"},
|
||||||
@ -93,28 +93,28 @@ core.register_node("farming:coffee_cup", {
|
|||||||
},
|
},
|
||||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, drink = 1, handy = 1},
|
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, drink = 1, handy = 1},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_use = core.item_eat(2, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||||
sounds = farming.node_sound_glass_defaults()
|
sounds = farming.node_sound_glass_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:coffee_cup", 2)
|
farming.add_eatable("farming:coffee_cup", 2)
|
||||||
|
|
||||||
core.register_alias("farming:coffee_cup_hot", "farming:coffee_cup")
|
minetest.register_alias("farming:coffee_cup_hot", "farming:coffee_cup")
|
||||||
core.register_alias("farming:drinking_cup", "vessels:drinking_glass")
|
minetest.register_alias("farming:drinking_cup", "vessels:drinking_glass")
|
||||||
|
|
||||||
-- Bar of of dark chocolate (thx to Ice Pandora for her deviantart.com chocolate tutorial)
|
-- Bar of of dark chocolate (thx to Ice Pandora for her deviantart.com chocolate tutorial)
|
||||||
|
|
||||||
core.register_craftitem("farming:chocolate_dark", {
|
minetest.register_craftitem("farming:chocolate_dark", {
|
||||||
description = S("Bar of Dark Chocolate"),
|
description = S("Bar of Dark Chocolate"),
|
||||||
inventory_image = "farming_chocolate_dark.png",
|
inventory_image = "farming_chocolate_dark.png",
|
||||||
on_use = core.item_eat(3)
|
on_use = minetest.item_eat(3)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:chocolate_dark", 3)
|
farming.add_eatable("farming:chocolate_dark", 3)
|
||||||
|
|
||||||
-- Chocolate block (not edible)
|
-- Chocolate block (not edible)
|
||||||
|
|
||||||
core.register_node("farming:chocolate_block", {
|
minetest.register_node("farming:chocolate_block", {
|
||||||
description = S("Chocolate Block"),
|
description = S("Chocolate Block"),
|
||||||
tiles = {"farming_chocolate_block.png"},
|
tiles = {"farming_chocolate_block.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -124,10 +124,10 @@ core.register_node("farming:chocolate_block", {
|
|||||||
|
|
||||||
-- Bowl of chili
|
-- Bowl of chili
|
||||||
|
|
||||||
core.register_craftitem("farming:chili_bowl", {
|
minetest.register_craftitem("farming:chili_bowl", {
|
||||||
description = S("Bowl of Chili"),
|
description = S("Bowl of Chili"),
|
||||||
inventory_image = "farming_chili_bowl.png",
|
inventory_image = "farming_chili_bowl.png",
|
||||||
on_use = core.item_eat(8, a.bowl),
|
on_use = minetest.item_eat(8, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -135,19 +135,19 @@ farming.add_eatable("farming:chili_bowl", 8)
|
|||||||
|
|
||||||
-- Chili powder
|
-- Chili powder
|
||||||
|
|
||||||
core.register_craftitem("farming:chili_powder", {
|
minetest.register_craftitem("farming:chili_powder", {
|
||||||
description = S("Chili Powder"),
|
description = S("Chili Powder"),
|
||||||
on_use = core.item_eat(-1),
|
on_use = minetest.item_eat(-1),
|
||||||
inventory_image = "farming_chili_powder.png",
|
inventory_image = "farming_chili_powder.png",
|
||||||
groups = {compostability = 45}
|
groups = {compostability = 45}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Carrot juice
|
-- Carrot juice
|
||||||
|
|
||||||
core.register_craftitem("farming:carrot_juice", {
|
minetest.register_craftitem("farming:carrot_juice", {
|
||||||
description = S("Carrot Juice"),
|
description = S("Carrot Juice"),
|
||||||
inventory_image = "farming_carrot_juice.png",
|
inventory_image = "farming_carrot_juice.png",
|
||||||
on_use = core.item_eat(4, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(4, "vessels:drinking_glass"),
|
||||||
groups = {vessel = 1, drink = 1}
|
groups = {vessel = 1, drink = 1}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -155,10 +155,10 @@ farming.add_eatable("farming:carrot_juice", 4)
|
|||||||
|
|
||||||
-- Blueberry Pie
|
-- Blueberry Pie
|
||||||
|
|
||||||
core.register_craftitem("farming:blueberry_pie", {
|
minetest.register_craftitem("farming:blueberry_pie", {
|
||||||
description = S("Blueberry Pie"),
|
description = S("Blueberry Pie"),
|
||||||
inventory_image = "farming_blueberry_pie.png",
|
inventory_image = "farming_blueberry_pie.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 75}
|
groups = {compostability = 75}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -166,10 +166,10 @@ farming.add_eatable("farming:blueberry_pie", 6)
|
|||||||
|
|
||||||
-- Blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image)
|
-- Blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image)
|
||||||
|
|
||||||
core.register_craftitem("farming:muffin_blueberry", {
|
minetest.register_craftitem("farming:muffin_blueberry", {
|
||||||
description = S("Blueberry Muffin"),
|
description = S("Blueberry Muffin"),
|
||||||
inventory_image = "farming_blueberry_muffin.png",
|
inventory_image = "farming_blueberry_muffin.png",
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -177,21 +177,21 @@ farming.add_eatable("farming:muffin_blueberry", 2)
|
|||||||
|
|
||||||
-- Tomato soup
|
-- Tomato soup
|
||||||
|
|
||||||
core.register_craftitem("farming:tomato_soup", {
|
minetest.register_craftitem("farming:tomato_soup", {
|
||||||
description = S("Tomato Soup"),
|
description = S("Tomato Soup"),
|
||||||
inventory_image = "farming_tomato_soup.png",
|
inventory_image = "farming_tomato_soup.png",
|
||||||
groups = {compostability = 65, drink = 1},
|
groups = {compostability = 65},
|
||||||
on_use = core.item_eat(8, "farming:bowl")
|
on_use = minetest.item_eat(8, "farming:bowl")
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:tomato_soup", 8)
|
farming.add_eatable("farming:tomato_soup", 8)
|
||||||
|
|
||||||
-- sliced bread
|
-- sliced bread
|
||||||
|
|
||||||
core.register_craftitem("farming:bread_slice", {
|
minetest.register_craftitem("farming:bread_slice", {
|
||||||
description = S("Sliced Bread"),
|
description = S("Sliced Bread"),
|
||||||
inventory_image = "farming_bread_slice.png",
|
inventory_image = "farming_bread_slice.png",
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
groups = {food_bread_slice = 1, compostability = 65}
|
groups = {food_bread_slice = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -199,10 +199,10 @@ farming.add_eatable("farming:bread_slice", 1)
|
|||||||
|
|
||||||
-- toast
|
-- toast
|
||||||
|
|
||||||
core.register_craftitem("farming:toast", {
|
minetest.register_craftitem("farming:toast", {
|
||||||
description = S("Toast"),
|
description = S("Toast"),
|
||||||
inventory_image = "farming_toast.png",
|
inventory_image = "farming_toast.png",
|
||||||
on_use = core.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
groups = {food_toast = 1, compostability = 65}
|
groups = {food_toast = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -210,10 +210,10 @@ farming.add_eatable("farming:toast", 1)
|
|||||||
|
|
||||||
-- toast sandwich
|
-- toast sandwich
|
||||||
|
|
||||||
core.register_craftitem("farming:toast_sandwich", {
|
minetest.register_craftitem("farming:toast_sandwich", {
|
||||||
description = S("Toast Sandwich"),
|
description = S("Toast Sandwich"),
|
||||||
inventory_image = "farming_toast_sandwich.png",
|
inventory_image = "farming_toast_sandwich.png",
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
groups = {compostability = 85}
|
groups = {compostability = 85}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ farming.add_eatable("farming:toast_sandwich", 4)
|
|||||||
|
|
||||||
-- glass of water
|
-- glass of water
|
||||||
|
|
||||||
core.register_craftitem("farming:glass_water", {
|
minetest.register_craftitem("farming:glass_water", {
|
||||||
description = S("Glass of Water"),
|
description = S("Glass of Water"),
|
||||||
inventory_image = "farming_water_glass.png",
|
inventory_image = "farming_water_glass.png",
|
||||||
groups = {food_glass_water = 1, flammable = 3, vessel = 1}
|
groups = {food_glass_water = 1, flammable = 3, vessel = 1}
|
||||||
@ -229,7 +229,7 @@ core.register_craftitem("farming:glass_water", {
|
|||||||
|
|
||||||
-- Sugar cube
|
-- Sugar cube
|
||||||
|
|
||||||
core.register_node("farming:sugar_cube", {
|
minetest.register_node("farming:sugar_cube", {
|
||||||
description = S("Sugar Cube"),
|
description = S("Sugar Cube"),
|
||||||
tiles = {"farming_sugar_cube.png"},
|
tiles = {"farming_sugar_cube.png"},
|
||||||
groups = {shovely = 1, handy = 1, crumbly = 2},
|
groups = {shovely = 1, handy = 1, crumbly = 2},
|
||||||
@ -242,7 +242,7 @@ core.register_node("farming:sugar_cube", {
|
|||||||
|
|
||||||
-- Sugar caramel
|
-- Sugar caramel
|
||||||
|
|
||||||
core.register_craftitem("farming:caramel", {
|
minetest.register_craftitem("farming:caramel", {
|
||||||
description = S("Caramel"),
|
description = S("Caramel"),
|
||||||
inventory_image = "farming_caramel.png",
|
inventory_image = "farming_caramel.png",
|
||||||
groups = {compostability = 40}
|
groups = {compostability = 40}
|
||||||
@ -250,7 +250,7 @@ core.register_craftitem("farming:caramel", {
|
|||||||
|
|
||||||
-- Salt
|
-- Salt
|
||||||
|
|
||||||
core.register_node("farming:salt", {
|
minetest.register_node("farming:salt", {
|
||||||
description = S("Salt"),
|
description = S("Salt"),
|
||||||
inventory_image = "farming_salt.png",
|
inventory_image = "farming_salt.png",
|
||||||
wield_image = "farming_salt.png",
|
wield_image = "farming_salt.png",
|
||||||
@ -308,7 +308,7 @@ core.register_node("farming:salt", {
|
|||||||
|
|
||||||
-- Salt Crystal
|
-- Salt Crystal
|
||||||
|
|
||||||
core.register_node("farming:salt_crystal", {
|
minetest.register_node("farming:salt_crystal", {
|
||||||
description = S("Salt crystal"),
|
description = S("Salt crystal"),
|
||||||
inventory_image = "farming_salt_crystal.png",
|
inventory_image = "farming_salt_crystal.png",
|
||||||
wield_image = "farming_salt_crystal.png",
|
wield_image = "farming_salt_crystal.png",
|
||||||
@ -329,7 +329,7 @@ core.register_node("farming:salt_crystal", {
|
|||||||
|
|
||||||
-- Mayonnaise
|
-- Mayonnaise
|
||||||
|
|
||||||
core.register_node("farming:mayonnaise", {
|
minetest.register_node("farming:mayonnaise", {
|
||||||
description = S("Mayonnaise"),
|
description = S("Mayonnaise"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_mayo.png"},
|
tiles = {"farming_mayo.png"},
|
||||||
@ -338,7 +338,7 @@ core.register_node("farming:mayonnaise", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
on_use = core.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.45, 0.25}
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.45, 0.25}
|
||||||
@ -354,7 +354,7 @@ farming.add_eatable("farming:mayonnaise", 3)
|
|||||||
|
|
||||||
-- Rose Water
|
-- Rose Water
|
||||||
|
|
||||||
core.register_node("farming:rose_water", {
|
minetest.register_node("farming:rose_water", {
|
||||||
description = S("Rose Water"),
|
description = S("Rose Water"),
|
||||||
inventory_image = "farming_rose_water.png",
|
inventory_image = "farming_rose_water.png",
|
||||||
wield_image = "farming_rose_water.png",
|
wield_image = "farming_rose_water.png",
|
||||||
@ -374,50 +374,50 @@ core.register_node("farming:rose_water", {
|
|||||||
|
|
||||||
-- Turkish Delight
|
-- Turkish Delight
|
||||||
|
|
||||||
core.register_craftitem("farming:turkish_delight", {
|
minetest.register_craftitem("farming:turkish_delight", {
|
||||||
description = S("Turkish Delight"),
|
description = S("Turkish Delight"),
|
||||||
inventory_image = "farming_turkish_delight.png",
|
inventory_image = "farming_turkish_delight.png",
|
||||||
groups = {compostability = 85},
|
groups = {compostability = 85},
|
||||||
on_use = core.item_eat(2)
|
on_use = minetest.item_eat(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:turkish_delight", 2)
|
farming.add_eatable("farming:turkish_delight", 2)
|
||||||
|
|
||||||
-- Garlic Bread
|
-- Garlic Bread
|
||||||
|
|
||||||
core.register_craftitem("farming:garlic_bread", {
|
minetest.register_craftitem("farming:garlic_bread", {
|
||||||
description = S("Garlic Bread"),
|
description = S("Garlic Bread"),
|
||||||
inventory_image = "farming_garlic_bread.png",
|
inventory_image = "farming_garlic_bread.png",
|
||||||
groups = {compostability = 65},
|
groups = {compostability = 65},
|
||||||
on_use = core.item_eat(2)
|
on_use = minetest.item_eat(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:garlic_bread", 2)
|
farming.add_eatable("farming:garlic_bread", 2)
|
||||||
|
|
||||||
-- Donuts (thanks to Bockwurst for making the donut images)
|
-- Donuts (thanks to Bockwurst for making the donut images)
|
||||||
|
|
||||||
core.register_craftitem("farming:donut", {
|
minetest.register_craftitem("farming:donut", {
|
||||||
description = S("Donut"),
|
description = S("Donut"),
|
||||||
inventory_image = "farming_donut.png",
|
inventory_image = "farming_donut.png",
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:donut", 4)
|
farming.add_eatable("farming:donut", 4)
|
||||||
|
|
||||||
core.register_craftitem("farming:donut_chocolate", {
|
minetest.register_craftitem("farming:donut_chocolate", {
|
||||||
description = S("Chocolate Donut"),
|
description = S("Chocolate Donut"),
|
||||||
inventory_image = "farming_donut_chocolate.png",
|
inventory_image = "farming_donut_chocolate.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:donut_chocolate", 6)
|
farming.add_eatable("farming:donut_chocolate", 6)
|
||||||
|
|
||||||
core.register_craftitem("farming:donut_apple", {
|
minetest.register_craftitem("farming:donut_apple", {
|
||||||
description = S("Apple Donut"),
|
description = S("Apple Donut"),
|
||||||
inventory_image = "farming_donut_apple.png",
|
inventory_image = "farming_donut_apple.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -425,10 +425,10 @@ farming.add_eatable("farming:donut_apple", 6)
|
|||||||
|
|
||||||
-- Porridge Oats
|
-- Porridge Oats
|
||||||
|
|
||||||
core.register_craftitem("farming:porridge", {
|
minetest.register_craftitem("farming:porridge", {
|
||||||
description = S("Porridge"),
|
description = S("Porridge"),
|
||||||
inventory_image = "farming_porridge.png",
|
inventory_image = "farming_porridge.png",
|
||||||
on_use = core.item_eat(6, a.bowl),
|
on_use = minetest.item_eat(6, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -436,10 +436,10 @@ farming.add_eatable("farming:porridge", 6)
|
|||||||
|
|
||||||
-- Jaffa Cake
|
-- Jaffa Cake
|
||||||
|
|
||||||
core.register_craftitem("farming:jaffa_cake", {
|
minetest.register_craftitem("farming:jaffa_cake", {
|
||||||
description = S("Jaffa Cake"),
|
description = S("Jaffa Cake"),
|
||||||
inventory_image = "farming_jaffa_cake.png",
|
inventory_image = "farming_jaffa_cake.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -447,10 +447,10 @@ farming.add_eatable("farming:jaffa_cake", 6)
|
|||||||
|
|
||||||
-- Apple Pie
|
-- Apple Pie
|
||||||
|
|
||||||
core.register_craftitem("farming:apple_pie", {
|
minetest.register_craftitem("farming:apple_pie", {
|
||||||
description = S("Apple Pie"),
|
description = S("Apple Pie"),
|
||||||
inventory_image = "farming_apple_pie.png",
|
inventory_image = "farming_apple_pie.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 75}
|
groups = {compostability = 75}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ farming.add_eatable("farming:apple_pie", 6)
|
|||||||
|
|
||||||
-- Cactus Juice
|
-- Cactus Juice
|
||||||
|
|
||||||
core.register_craftitem("farming:cactus_juice", {
|
minetest.register_craftitem("farming:cactus_juice", {
|
||||||
description = S("Cactus Juice"),
|
description = S("Cactus Juice"),
|
||||||
inventory_image = "farming_cactus_juice.png",
|
inventory_image = "farming_cactus_juice.png",
|
||||||
groups = {vessel = 1, drink = 1, compostability = 55},
|
groups = {vessel = 1, drink = 1, compostability = 55},
|
||||||
@ -469,7 +469,7 @@ core.register_craftitem("farming:cactus_juice", {
|
|||||||
|
|
||||||
local num = math.random(5) == 1 and -1 or 2
|
local num = math.random(5) == 1 and -1 or 2
|
||||||
|
|
||||||
return core.do_item_eat(num, "vessels:drinking_glass",
|
return minetest.do_item_eat(num, "vessels:drinking_glass",
|
||||||
itemstack, user, pointed_thing)
|
itemstack, user, pointed_thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -479,7 +479,7 @@ farming.add_eatable("farming:cactus_juice", 1)
|
|||||||
|
|
||||||
-- Pasta
|
-- Pasta
|
||||||
|
|
||||||
core.register_craftitem("farming:pasta", {
|
minetest.register_craftitem("farming:pasta", {
|
||||||
description = S("Pasta"),
|
description = S("Pasta"),
|
||||||
inventory_image = "farming_pasta.png",
|
inventory_image = "farming_pasta.png",
|
||||||
groups = {compostability = 65, food_pasta = 1}
|
groups = {compostability = 65, food_pasta = 1}
|
||||||
@ -487,10 +487,10 @@ core.register_craftitem("farming:pasta", {
|
|||||||
|
|
||||||
-- Mac & Cheese
|
-- Mac & Cheese
|
||||||
|
|
||||||
core.register_craftitem("farming:mac_and_cheese", {
|
minetest.register_craftitem("farming:mac_and_cheese", {
|
||||||
description = S("Mac & Cheese"),
|
description = S("Mac & Cheese"),
|
||||||
inventory_image = "farming_mac_and_cheese.png",
|
inventory_image = "farming_mac_and_cheese.png",
|
||||||
on_use = core.item_eat(6, a.bowl),
|
on_use = minetest.item_eat(6, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -498,10 +498,10 @@ farming.add_eatable("farming:mac_and_cheese", 6)
|
|||||||
|
|
||||||
-- Spaghetti
|
-- Spaghetti
|
||||||
|
|
||||||
core.register_craftitem("farming:spaghetti", {
|
minetest.register_craftitem("farming:spaghetti", {
|
||||||
description = S("Spaghetti"),
|
description = S("Spaghetti"),
|
||||||
inventory_image = "farming_spaghetti.png",
|
inventory_image = "farming_spaghetti.png",
|
||||||
on_use = core.item_eat(8),
|
on_use = minetest.item_eat(8),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -509,10 +509,10 @@ farming.add_eatable("farming:spaghetti", 8)
|
|||||||
|
|
||||||
-- Korean Bibimbap
|
-- Korean Bibimbap
|
||||||
|
|
||||||
core.register_craftitem("farming:bibimbap", {
|
minetest.register_craftitem("farming:bibimbap", {
|
||||||
description = S("Bibimbap"),
|
description = S("Bibimbap"),
|
||||||
inventory_image = "farming_bibimbap.png",
|
inventory_image = "farming_bibimbap.png",
|
||||||
on_use = core.item_eat(8, a.bowl),
|
on_use = minetest.item_eat(8, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -520,10 +520,10 @@ farming.add_eatable("farming:bibimbap", 8)
|
|||||||
|
|
||||||
-- Burger
|
-- Burger
|
||||||
|
|
||||||
core.register_craftitem("farming:burger", {
|
minetest.register_craftitem("farming:burger", {
|
||||||
description = S("Burger"),
|
description = S("Burger"),
|
||||||
inventory_image = "farming_burger.png",
|
inventory_image = "farming_burger.png",
|
||||||
on_use = core.item_eat(16),
|
on_use = minetest.item_eat(16),
|
||||||
groups = {compostability = 95}
|
groups = {compostability = 95}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -531,10 +531,10 @@ farming.add_eatable("farming:burger", 16)
|
|||||||
|
|
||||||
-- Salad
|
-- Salad
|
||||||
|
|
||||||
core.register_craftitem("farming:salad", {
|
minetest.register_craftitem("farming:salad", {
|
||||||
description = S("Salad"),
|
description = S("Salad"),
|
||||||
inventory_image = "farming_salad.png",
|
inventory_image = "farming_salad.png",
|
||||||
on_use = core.item_eat(8, a.bowl),
|
on_use = minetest.item_eat(8, a.bowl),
|
||||||
groups = {compostability = 45}
|
groups = {compostability = 45}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -542,10 +542,10 @@ farming.add_eatable("farming:salad", 8)
|
|||||||
|
|
||||||
-- Triple Berry Smoothie
|
-- Triple Berry Smoothie
|
||||||
|
|
||||||
core.register_craftitem("farming:smoothie_berry", {
|
minetest.register_craftitem("farming:smoothie_berry", {
|
||||||
description = S("Triple Berry Smoothie"),
|
description = S("Triple Berry Smoothie"),
|
||||||
inventory_image = "farming_berry_smoothie.png",
|
inventory_image = "farming_berry_smoothie.png",
|
||||||
on_use = core.item_eat(6, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(6, "vessels:drinking_glass"),
|
||||||
groups = {vessel = 1, drink = 1, compostability = 65}
|
groups = {vessel = 1, drink = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -553,10 +553,10 @@ farming.add_eatable("farming:smoothie_berry", 6)
|
|||||||
|
|
||||||
-- Patatas a la importancia
|
-- Patatas a la importancia
|
||||||
|
|
||||||
core.register_craftitem("farming:spanish_potatoes", {
|
minetest.register_craftitem("farming:spanish_potatoes", {
|
||||||
description = S("Spanish Potatoes"),
|
description = S("Spanish Potatoes"),
|
||||||
inventory_image = "farming_spanish_potatoes.png",
|
inventory_image = "farming_spanish_potatoes.png",
|
||||||
on_use = core.item_eat(8, a.bowl),
|
on_use = minetest.item_eat(8, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -564,10 +564,10 @@ farming.add_eatable("farming:spanish_potatoes", 8)
|
|||||||
|
|
||||||
-- Potato omelette
|
-- Potato omelette
|
||||||
|
|
||||||
core.register_craftitem("farming:potato_omelet", {
|
minetest.register_craftitem("farming:potato_omelet", {
|
||||||
description = S("Potato omelette"),
|
description = S("Potato omelette"),
|
||||||
inventory_image = "farming_potato_omelet.png",
|
inventory_image = "farming_potato_omelet.png",
|
||||||
on_use = core.item_eat(6, a.bowl),
|
on_use = minetest.item_eat(6, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -575,10 +575,10 @@ farming.add_eatable("farming:potato_omelet", 6)
|
|||||||
|
|
||||||
-- Paella
|
-- Paella
|
||||||
|
|
||||||
core.register_craftitem("farming:paella", {
|
minetest.register_craftitem("farming:paella", {
|
||||||
description = S("Paella"),
|
description = S("Paella"),
|
||||||
inventory_image = "farming_paella.png",
|
inventory_image = "farming_paella.png",
|
||||||
on_use = core.item_eat(8, a.bowl),
|
on_use = minetest.item_eat(8, a.bowl),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -586,10 +586,10 @@ farming.add_eatable("farming:paella", 8)
|
|||||||
|
|
||||||
-- Vanilla Flan
|
-- Vanilla Flan
|
||||||
|
|
||||||
core.register_craftitem("farming:flan", {
|
minetest.register_craftitem("farming:flan", {
|
||||||
description = S("Vanilla Flan"),
|
description = S("Vanilla Flan"),
|
||||||
inventory_image = "farming_vanilla_flan.png",
|
inventory_image = "farming_vanilla_flan.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -597,10 +597,10 @@ farming.add_eatable("farming:flan", 6)
|
|||||||
|
|
||||||
-- Vegan Cheese
|
-- Vegan Cheese
|
||||||
|
|
||||||
core.register_craftitem("farming:cheese_vegan", {
|
minetest.register_craftitem("farming:cheese_vegan", {
|
||||||
description = S("Vegan Cheese"),
|
description = S("Vegan Cheese"),
|
||||||
inventory_image = "farming_cheese_vegan.png",
|
inventory_image = "farming_cheese_vegan.png",
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {compostability = 65, food_cheese = 1}
|
groups = {compostability = 65, food_cheese = 1}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ farming.add_eatable("farming:cheese_vegan", 2)
|
|||||||
|
|
||||||
-- Vegan Butter
|
-- Vegan Butter
|
||||||
|
|
||||||
core.register_craftitem("farming:butter_vegan", {
|
minetest.register_craftitem("farming:butter_vegan", {
|
||||||
description = S("Vegan Butter"),
|
description = S("Vegan Butter"),
|
||||||
inventory_image = "farming_vegan_butter.png",
|
inventory_image = "farming_vegan_butter.png",
|
||||||
groups = {food_butter = 1}
|
groups = {food_butter = 1}
|
||||||
@ -616,10 +616,10 @@ core.register_craftitem("farming:butter_vegan", {
|
|||||||
|
|
||||||
-- Onigiri
|
-- Onigiri
|
||||||
|
|
||||||
core.register_craftitem("farming:onigiri", {
|
minetest.register_craftitem("farming:onigiri", {
|
||||||
description = S("Onigiri"),
|
description = S("Onigiri"),
|
||||||
inventory_image = "farming_onigiri.png",
|
inventory_image = "farming_onigiri.png",
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -627,10 +627,10 @@ farming.add_eatable("farming:onigiri", 2)
|
|||||||
|
|
||||||
-- Gyoza
|
-- Gyoza
|
||||||
|
|
||||||
core.register_craftitem("farming:gyoza", {
|
minetest.register_craftitem("farming:gyoza", {
|
||||||
description = S("Gyoza"),
|
description = S("Gyoza"),
|
||||||
inventory_image = "farming_gyoza.png",
|
inventory_image = "farming_gyoza.png",
|
||||||
on_use = core.item_eat(4),
|
on_use = minetest.item_eat(4),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -638,10 +638,10 @@ farming.add_eatable("farming:gyoza", 4)
|
|||||||
|
|
||||||
-- Mochi
|
-- Mochi
|
||||||
|
|
||||||
core.register_craftitem("farming:mochi", {
|
minetest.register_craftitem("farming:mochi", {
|
||||||
description = S("Mochi"),
|
description = S("Mochi"),
|
||||||
inventory_image = "farming_mochi.png",
|
inventory_image = "farming_mochi.png",
|
||||||
on_use = core.item_eat(3),
|
on_use = minetest.item_eat(3),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -649,49 +649,48 @@ farming.add_eatable("farming:mochi", 3)
|
|||||||
|
|
||||||
-- Gingerbread Man
|
-- Gingerbread Man
|
||||||
|
|
||||||
core.register_craftitem("farming:gingerbread_man", {
|
minetest.register_craftitem("farming:gingerbread_man", {
|
||||||
description = S("Gingerbread Man"),
|
description = S("Gingerbread Man"),
|
||||||
inventory_image = "farming_gingerbread_man.png",
|
inventory_image = "farming_gingerbread_man.png",
|
||||||
on_use = core.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {compostability = 85}
|
groups = {compostability = 85}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:gingerbread_man", 2)
|
farming.add_eatable("farming:gingerbread_man", 2)
|
||||||
|
|
||||||
-- Mint tea
|
-- Mint tea
|
||||||
core.register_craftitem("farming:mint_tea", {
|
minetest.register_craftitem("farming:mint_tea", {
|
||||||
description = S("Mint Tea"),
|
description = S("Mint Tea"),
|
||||||
inventory_image = "farming_mint_tea.png",
|
inventory_image = "farming_mint_tea.png",
|
||||||
on_use = core.item_eat(2, a.drinking_glass),
|
on_use = minetest.item_eat(2, a.drinking_glass)
|
||||||
groups = {drink = 1}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:mint_tea", 2)
|
farming.add_eatable("farming:mint_tea", 2)
|
||||||
|
|
||||||
-- Onion soup
|
-- Onion soup
|
||||||
core.register_craftitem("farming:onion_soup", {
|
minetest.register_craftitem("farming:onion_soup", {
|
||||||
description = S("Onion Soup"),
|
description = S("Onion Soup"),
|
||||||
inventory_image = "farming_onion_soup.png",
|
inventory_image = "farming_onion_soup.png",
|
||||||
groups = {compostability = 65, drink = 1},
|
groups = {compostability = 65},
|
||||||
on_use = core.item_eat(6, a.bowl)
|
on_use = minetest.item_eat(6, a.bowl)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:onion_soup", 6)
|
farming.add_eatable("farming:onion_soup", 6)
|
||||||
|
|
||||||
-- Pea soup
|
-- Pea soup
|
||||||
|
|
||||||
core.register_craftitem("farming:pea_soup", {
|
minetest.register_craftitem("farming:pea_soup", {
|
||||||
description = S("Pea Soup"),
|
description = S("Pea Soup"),
|
||||||
inventory_image = "farming_pea_soup.png",
|
inventory_image = "farming_pea_soup.png",
|
||||||
groups = {compostability = 65, drink = 1},
|
groups = {compostability = 65},
|
||||||
on_use = core.item_eat(4, a.bowl)
|
on_use = minetest.item_eat(4, a.bowl)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:pea_soup", 4)
|
farming.add_eatable("farming:pea_soup", 4)
|
||||||
|
|
||||||
-- Ground pepper
|
-- Ground pepper
|
||||||
|
|
||||||
core.register_node("farming:pepper_ground", {
|
minetest.register_node("farming:pepper_ground", {
|
||||||
description = S("Ground Pepper"),
|
description = S("Ground Pepper"),
|
||||||
inventory_image = "crops_pepper_ground.png",
|
inventory_image = "crops_pepper_ground.png",
|
||||||
wield_image = "crops_pepper_ground.png",
|
wield_image = "crops_pepper_ground.png",
|
||||||
@ -712,21 +711,21 @@ core.register_node("farming:pepper_ground", {
|
|||||||
|
|
||||||
-- pineapple ring
|
-- pineapple ring
|
||||||
|
|
||||||
core.register_craftitem("farming:pineapple_ring", {
|
minetest.register_craftitem("farming:pineapple_ring", {
|
||||||
description = S("Pineapple Ring"),
|
description = S("Pineapple Ring"),
|
||||||
inventory_image = "farming_pineapple_ring.png",
|
inventory_image = "farming_pineapple_ring.png",
|
||||||
groups = {food_pineapple_ring = 1, compostability = 45},
|
groups = {food_pineapple_ring = 1, compostability = 45},
|
||||||
on_use = core.item_eat(1)
|
on_use = minetest.item_eat(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:pineapple_ring", 1)
|
farming.add_eatable("farming:pineapple_ring", 1)
|
||||||
|
|
||||||
-- Pineapple juice
|
-- Pineapple juice
|
||||||
|
|
||||||
core.register_craftitem("farming:pineapple_juice", {
|
minetest.register_craftitem("farming:pineapple_juice", {
|
||||||
description = S("Pineapple Juice"),
|
description = S("Pineapple Juice"),
|
||||||
inventory_image = "farming_pineapple_juice.png",
|
inventory_image = "farming_pineapple_juice.png",
|
||||||
on_use = core.item_eat(4, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(4, "vessels:drinking_glass"),
|
||||||
groups = {vessel = 1, drink = 1, compostability = 35}
|
groups = {vessel = 1, drink = 1, compostability = 35}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -734,27 +733,27 @@ farming.add_eatable("farming:pineapple_juice", 4)
|
|||||||
|
|
||||||
-- Potato & cucumber Salad
|
-- Potato & cucumber Salad
|
||||||
|
|
||||||
core.register_craftitem("farming:potato_salad", {
|
minetest.register_craftitem("farming:potato_salad", {
|
||||||
description = S("Cucumber and Potato Salad"),
|
description = S("Cucumber and Potato Salad"),
|
||||||
inventory_image = "farming_potato_salad.png",
|
inventory_image = "farming_potato_salad.png",
|
||||||
on_use = core.item_eat(10, "farming:bowl")
|
on_use = minetest.item_eat(10, "farming:bowl")
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:potato_salad", 10)
|
farming.add_eatable("farming:potato_salad", 10)
|
||||||
|
|
||||||
-- Pumpkin dough
|
-- Pumpkin dough
|
||||||
|
|
||||||
core.register_craftitem("farming:pumpkin_dough", {
|
minetest.register_craftitem("farming:pumpkin_dough", {
|
||||||
description = S("Pumpkin Dough"),
|
description = S("Pumpkin Dough"),
|
||||||
inventory_image = "farming_pumpkin_dough.png"
|
inventory_image = "farming_pumpkin_dough.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Pumpkin bread
|
-- Pumpkin bread
|
||||||
|
|
||||||
core.register_craftitem("farming:pumpkin_bread", {
|
minetest.register_craftitem("farming:pumpkin_bread", {
|
||||||
description = S("Pumpkin Bread"),
|
description = S("Pumpkin Bread"),
|
||||||
inventory_image = "farming_pumpkin_bread.png",
|
inventory_image = "farming_pumpkin_bread.png",
|
||||||
on_use = core.item_eat(8),
|
on_use = minetest.item_eat(8),
|
||||||
groups = {food_bread = 1}
|
groups = {food_bread = 1}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -762,10 +761,10 @@ farming.add_eatable("farming:pumpkin_bread", 8)
|
|||||||
|
|
||||||
-- Raspberry smoothie
|
-- Raspberry smoothie
|
||||||
|
|
||||||
core.register_craftitem("farming:smoothie_raspberry", {
|
minetest.register_craftitem("farming:smoothie_raspberry", {
|
||||||
description = S("Raspberry Smoothie"),
|
description = S("Raspberry Smoothie"),
|
||||||
inventory_image = "farming_raspberry_smoothie.png",
|
inventory_image = "farming_raspberry_smoothie.png",
|
||||||
on_use = core.item_eat(2, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||||
groups = {vessel = 1, drink = 1, compostability = 65}
|
groups = {vessel = 1, drink = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -773,10 +772,10 @@ farming.add_eatable("farming:smoothie_raspberry", 2)
|
|||||||
|
|
||||||
-- Rhubarb pie
|
-- Rhubarb pie
|
||||||
|
|
||||||
core.register_craftitem("farming:rhubarb_pie", {
|
minetest.register_craftitem("farming:rhubarb_pie", {
|
||||||
description = S("Rhubarb Pie"),
|
description = S("Rhubarb Pie"),
|
||||||
inventory_image = "farming_rhubarb_pie.png",
|
inventory_image = "farming_rhubarb_pie.png",
|
||||||
on_use = core.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
groups = {compostability = 65}
|
groups = {compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -784,37 +783,38 @@ farming.add_eatable("farming:rhubarb_pie", 6)
|
|||||||
|
|
||||||
-- Rice flour
|
-- Rice flour
|
||||||
|
|
||||||
core.register_craftitem("farming:rice_flour", {
|
minetest.register_craftitem("farming:rice_flour", {
|
||||||
description = S("Rice Flour"),
|
description = S("Rice Flour"),
|
||||||
inventory_image = "farming_rice_flour.png",
|
inventory_image = "farming_rice_flour.png",
|
||||||
groups = {food_rice_flour = 1, food_flour = 1, flammable = 1, compostability = 65}
|
groups = {food_rice_flour = 1, flammable = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Rice bread
|
-- Rice bread
|
||||||
|
|
||||||
core.register_craftitem("farming:rice_bread", {
|
minetest.register_craftitem("farming:rice_bread", {
|
||||||
description = S("Rice Bread"),
|
description = S("Rice Bread"),
|
||||||
inventory_image = "farming_rice_bread.png",
|
inventory_image = "farming_rice_bread.png",
|
||||||
on_use = core.item_eat(5),
|
on_use = minetest.item_eat(5),
|
||||||
groups = {food_rice_bread = 1, food_bread = 1, compostability = 65}
|
groups = {food_rice_bread = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:rice_bread", 5)
|
farming.add_eatable("farming:rice_bread", 5)
|
||||||
|
|
||||||
-- Multigrain flour
|
-- Multigrain flour
|
||||||
|
|
||||||
core.register_craftitem("farming:flour_multigrain", {
|
minetest.register_craftitem("farming:flour_multigrain", {
|
||||||
description = S("Multigrain Flour"),
|
description = S("Multigrain Flour"),
|
||||||
inventory_image = "farming_flour_multigrain.png",
|
inventory_image = "farming_flour_multigrain.png",
|
||||||
groups = {food_flour = 1, flammable = 1},
|
groups = {food_flour = 1, flammable = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Multigrain bread
|
-- Multigrain bread
|
||||||
|
|
||||||
core.register_craftitem("farming:bread_multigrain", {
|
minetest.register_craftitem("farming:bread_multigrain", {
|
||||||
description = S("Multigrain Bread"),
|
description = S("Multigrain Bread"),
|
||||||
inventory_image = "farming_bread_multigrain.png",
|
inventory_image = "farming_bread_multigrain.png",
|
||||||
on_use = core.item_eat(7),
|
on_use = minetest.item_eat(7),
|
||||||
groups = {food_bread = 1, compostability = 65}
|
groups = {food_bread = 1, compostability = 65}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -822,7 +822,7 @@ farming.add_eatable("farming:bread_multigrain", 7)
|
|||||||
|
|
||||||
-- Soy sauce
|
-- Soy sauce
|
||||||
|
|
||||||
core.register_node("farming:soy_sauce", {
|
minetest.register_node("farming:soy_sauce", {
|
||||||
description = S("Soy Sauce"),
|
description = S("Soy Sauce"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_soy_sauce.png"},
|
tiles = {"farming_soy_sauce.png"},
|
||||||
@ -843,7 +843,7 @@ core.register_node("farming:soy_sauce", {
|
|||||||
|
|
||||||
-- Soy milk
|
-- Soy milk
|
||||||
|
|
||||||
core.register_node("farming:soy_milk", {
|
minetest.register_node("farming:soy_milk", {
|
||||||
description = S("Soy Milk"),
|
description = S("Soy Milk"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_soy_milk_glass.png"},
|
tiles = {"farming_soy_milk_glass.png"},
|
||||||
@ -854,7 +854,7 @@ core.register_node("farming:soy_milk", {
|
|||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||||
},
|
},
|
||||||
on_use = core.item_eat(2, "vessels:drinking_glass"),
|
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||||
groups = {
|
groups = {
|
||||||
vessel = 1, food_milk_glass = 1, dig_immediate = 3, handy = 1,
|
vessel = 1, food_milk_glass = 1, dig_immediate = 3, handy = 1,
|
||||||
attached_node = 1, drink = 1, compostability = 65
|
attached_node = 1, drink = 1, compostability = 65
|
||||||
@ -867,42 +867,42 @@ farming.add_eatable("farming:soy_milk", 2)
|
|||||||
|
|
||||||
-- Tofu
|
-- Tofu
|
||||||
|
|
||||||
core.register_craftitem("farming:tofu", {
|
minetest.register_craftitem("farming:tofu", {
|
||||||
description = S("Tofu"),
|
description = S("Tofu"),
|
||||||
inventory_image = "farming_tofu.png",
|
inventory_image = "farming_tofu.png",
|
||||||
groups = {
|
groups = {
|
||||||
food_tofu = 1, food_meat_raw = 1, compostability = 65,
|
food_tofu = 1, food_meat_raw = 1, compostability = 65,
|
||||||
},
|
},
|
||||||
on_use = core.item_eat(3)
|
on_use = minetest.item_eat(3)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:tofu", 3)
|
farming.add_eatable("farming:tofu", 3)
|
||||||
|
|
||||||
-- Cooked tofu
|
-- Cooked tofu
|
||||||
|
|
||||||
core.register_craftitem("farming:tofu_cooked", {
|
minetest.register_craftitem("farming:tofu_cooked", {
|
||||||
description = S("Cooked Tofu"),
|
description = S("Cooked Tofu"),
|
||||||
inventory_image = "farming_tofu_cooked.png",
|
inventory_image = "farming_tofu_cooked.png",
|
||||||
groups = {food_meat = 1, compostability = 65},
|
groups = {food_meat = 1, compostability = 65},
|
||||||
on_use = core.item_eat(6)
|
on_use = minetest.item_eat(6)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:tofu_cooked", 6)
|
farming.add_eatable("farming:tofu_cooked", 6)
|
||||||
|
|
||||||
-- Toasted sunflower seeds
|
-- Toasted sunflower seeds
|
||||||
|
|
||||||
core.register_craftitem("farming:sunflower_seeds_toasted", {
|
minetest.register_craftitem("farming:sunflower_seeds_toasted", {
|
||||||
description = S("Toasted Sunflower Seeds"),
|
description = S("Toasted Sunflower Seeds"),
|
||||||
inventory_image = "farming_sunflower_seeds_toasted.png",
|
inventory_image = "farming_sunflower_seeds_toasted.png",
|
||||||
groups = {food_sunflower_seeds_toasted = 1, compostability = 65},
|
groups = {food_sunflower_seeds_toasted = 1, compostability = 65},
|
||||||
on_use = core.item_eat(1)
|
on_use = minetest.item_eat(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:sunflower_seeds_toasted", 1)
|
farming.add_eatable("farming:sunflower_seeds_toasted", 1)
|
||||||
|
|
||||||
-- Sunflower oil
|
-- Sunflower oil
|
||||||
|
|
||||||
core.register_node("farming:sunflower_oil", {
|
minetest.register_node("farming:sunflower_oil", {
|
||||||
description = S("Bottle of Sunflower Oil"),
|
description = S("Bottle of Sunflower Oil"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_sunflower_oil.png"},
|
tiles = {"farming_sunflower_oil.png"},
|
||||||
@ -923,10 +923,10 @@ core.register_node("farming:sunflower_oil", {
|
|||||||
|
|
||||||
-- Sunflower seed bread
|
-- Sunflower seed bread
|
||||||
|
|
||||||
core.register_craftitem("farming:sunflower_bread", {
|
minetest.register_craftitem("farming:sunflower_bread", {
|
||||||
description = S("Sunflower Seed Bread"),
|
description = S("Sunflower Seed Bread"),
|
||||||
inventory_image = "farming_sunflower_bread.png",
|
inventory_image = "farming_sunflower_bread.png",
|
||||||
on_use = core.item_eat(8),
|
on_use = minetest.item_eat(8),
|
||||||
groups = {food_bread = 1}
|
groups = {food_bread = 1}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -934,7 +934,7 @@ farming.add_eatable("farming:sunflower_bread", 8)
|
|||||||
|
|
||||||
-- Vanilla extract
|
-- Vanilla extract
|
||||||
|
|
||||||
core.register_node("farming:vanilla_extract", {
|
minetest.register_node("farming:vanilla_extract", {
|
||||||
description = S("Vanilla Extract"),
|
description = S("Vanilla Extract"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_vanilla_extract.png"},
|
tiles = {"farming_vanilla_extract.png"},
|
||||||
@ -952,10 +952,10 @@ core.register_node("farming:vanilla_extract", {
|
|||||||
|
|
||||||
-- Jerusalem Artichokes with miso butter
|
-- Jerusalem Artichokes with miso butter
|
||||||
|
|
||||||
core.register_craftitem("farming:jerusalem_artichokes", {
|
minetest.register_craftitem("farming:jerusalem_artichokes", {
|
||||||
description = S("Jerusalem Artichokes"),
|
description = S("Jerusalem Artichokes"),
|
||||||
inventory_image = "farming_jerusalem_artichokes.png",
|
inventory_image = "farming_jerusalem_artichokes.png",
|
||||||
on_use = core.item_eat(11, a.bowl)
|
on_use = minetest.item_eat(11, a.bowl)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("ethereal:jerusalem_artichokes", 11)
|
farming.add_eatable("ethereal:jerusalem_artichokes", 11)
|
||||||
@ -966,10 +966,10 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Bread
|
-- Bread
|
||||||
|
|
||||||
core.register_craftitem("farming:bread", {
|
minetest.register_craftitem("farming:bread", {
|
||||||
description = S("Bread"),
|
description = S("Bread"),
|
||||||
inventory_image = "farming_bread.png",
|
inventory_image = "farming_bread.png",
|
||||||
on_use = core.item_eat(5),
|
on_use = minetest.item_eat(5),
|
||||||
groups = {food_bread = 1}
|
groups = {food_bread = 1}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -977,7 +977,7 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Cocoa beans
|
-- Cocoa beans
|
||||||
|
|
||||||
core.register_craftitem("farming:cocoa_beans", {
|
minetest.register_craftitem("farming:cocoa_beans", {
|
||||||
description = S("Cocoa Beans"),
|
description = S("Cocoa Beans"),
|
||||||
inventory_image = "farming_cocoa_beans.png",
|
inventory_image = "farming_cocoa_beans.png",
|
||||||
groups = {compostability = 65, food_cocoa = 1, flammable = 2}
|
groups = {compostability = 65, food_cocoa = 1, flammable = 2}
|
||||||
@ -985,38 +985,37 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Chocolate cookie
|
-- Chocolate cookie
|
||||||
|
|
||||||
core.register_craftitem("farming:cookie", {
|
minetest.register_craftitem("farming:cookie", {
|
||||||
description = S("Cookie"),
|
description = S("Cookie"),
|
||||||
inventory_image = "farming_cookie.png",
|
inventory_image = "farming_cookie.png",
|
||||||
on_use = core.item_eat(2)
|
on_use = minetest.item_eat(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:cookie", 2)
|
farming.add_eatable("farming:cookie", 2)
|
||||||
|
|
||||||
-- Golden carrot
|
-- Golden carrot
|
||||||
|
|
||||||
core.register_craftitem("farming:carrot_gold", {
|
minetest.register_craftitem("farming:carrot_gold", {
|
||||||
description = S("Golden Carrot"),
|
description = S("Golden Carrot"),
|
||||||
inventory_image = "farming_carrot_gold.png",
|
inventory_image = "farming_carrot_gold.png",
|
||||||
on_use = core.item_eat(10)
|
on_use = minetest.item_eat(10)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:carrot_gold", 10)
|
farming.add_eatable("farming:carrot_gold", 10)
|
||||||
|
|
||||||
-- Beetroot soup
|
-- Beetroot soup
|
||||||
|
|
||||||
core.register_craftitem("farming:beetroot_soup", {
|
minetest.register_craftitem("farming:beetroot_soup", {
|
||||||
description = S("Beetroot Soup"),
|
description = S("Beetroot Soup"),
|
||||||
inventory_image = "farming_beetroot_soup.png",
|
inventory_image = "farming_beetroot_soup.png",
|
||||||
on_use = core.item_eat(6, "farming:bowl"),
|
on_use = minetest.item_eat(6, "farming:bowl")
|
||||||
groups = {drink = 1}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:beetroot_soup", 6)
|
farming.add_eatable("farming:beetroot_soup", 6)
|
||||||
|
|
||||||
-- Sugar
|
-- Sugar
|
||||||
|
|
||||||
core.register_craftitem("farming:sugar", {
|
minetest.register_craftitem("farming:sugar", {
|
||||||
description = S("Sugar"),
|
description = S("Sugar"),
|
||||||
inventory_image = "farming_sugar.png",
|
inventory_image = "farming_sugar.png",
|
||||||
groups = {food_sugar = 1, flammable = 3}
|
groups = {food_sugar = 1, flammable = 3}
|
||||||
@ -1024,10 +1023,10 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Baked potato
|
-- Baked potato
|
||||||
|
|
||||||
core.register_craftitem("farming:baked_potato", {
|
minetest.register_craftitem("farming:baked_potato", {
|
||||||
description = S("Baked Potato"),
|
description = S("Baked Potato"),
|
||||||
inventory_image = "farming_baked_potato.png",
|
inventory_image = "farming_baked_potato.png",
|
||||||
on_use = core.item_eat(6)
|
on_use = minetest.item_eat(6)
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.add_eatable("farming:baked_potato", 6)
|
farming.add_eatable("farming:baked_potato", 6)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
local function add_groups(item, groups)
|
local function add_groups(item, groups)
|
||||||
|
|
||||||
local def = core.registered_items[item]
|
local def = minetest.registered_items[item]
|
||||||
|
|
||||||
if def then
|
if def then
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ local function add_groups(item, groups)
|
|||||||
grps[k] = v
|
grps[k] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
core.override_item(item, {groups = grps})
|
minetest.override_item(item, {groups = grps})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- saucepan
|
-- saucepan
|
||||||
|
|
||||||
core.register_craftitem("farming:saucepan", {
|
minetest.register_craftitem("farming:saucepan", {
|
||||||
description = S("Saucepan"),
|
description = S("Saucepan"),
|
||||||
inventory_image = "farming_saucepan.png",
|
inventory_image = "farming_saucepan.png",
|
||||||
groups = {food_saucepan = 1, flammable = 2}
|
groups = {food_saucepan = 1, flammable = 2}
|
||||||
@ -11,7 +11,7 @@ core.register_craftitem("farming:saucepan", {
|
|||||||
|
|
||||||
-- cooking pot
|
-- cooking pot
|
||||||
|
|
||||||
core.register_craftitem("farming:pot", {
|
minetest.register_craftitem("farming:pot", {
|
||||||
description = S("Cooking Pot"),
|
description = S("Cooking Pot"),
|
||||||
inventory_image = "farming_pot.png",
|
inventory_image = "farming_pot.png",
|
||||||
groups = {food_pot = 1, flammable = 2}
|
groups = {food_pot = 1, flammable = 2}
|
||||||
@ -19,7 +19,7 @@ core.register_craftitem("farming:pot", {
|
|||||||
|
|
||||||
-- baking tray
|
-- baking tray
|
||||||
|
|
||||||
core.register_craftitem("farming:baking_tray", {
|
minetest.register_craftitem("farming:baking_tray", {
|
||||||
description = S("Baking Tray"),
|
description = S("Baking Tray"),
|
||||||
inventory_image = "farming_baking_tray.png",
|
inventory_image = "farming_baking_tray.png",
|
||||||
groups = {food_baking_tray = 1, flammable = 2}
|
groups = {food_baking_tray = 1, flammable = 2}
|
||||||
@ -27,7 +27,7 @@ core.register_craftitem("farming:baking_tray", {
|
|||||||
|
|
||||||
-- skillet
|
-- skillet
|
||||||
|
|
||||||
core.register_craftitem("farming:skillet", {
|
minetest.register_craftitem("farming:skillet", {
|
||||||
description = S("Skillet"),
|
description = S("Skillet"),
|
||||||
inventory_image = "farming_skillet.png",
|
inventory_image = "farming_skillet.png",
|
||||||
groups = {food_skillet = 1, flammable = 2}
|
groups = {food_skillet = 1, flammable = 2}
|
||||||
@ -35,7 +35,7 @@ core.register_craftitem("farming:skillet", {
|
|||||||
|
|
||||||
-- mortar & pestle
|
-- mortar & pestle
|
||||||
|
|
||||||
core.register_craftitem("farming:mortar_pestle", {
|
minetest.register_craftitem("farming:mortar_pestle", {
|
||||||
description = S("Mortar and Pestle"),
|
description = S("Mortar and Pestle"),
|
||||||
inventory_image = "farming_mortar_pestle.png",
|
inventory_image = "farming_mortar_pestle.png",
|
||||||
groups = {food_mortar_pestle = 1, flammable = 2}
|
groups = {food_mortar_pestle = 1, flammable = 2}
|
||||||
@ -43,7 +43,7 @@ core.register_craftitem("farming:mortar_pestle", {
|
|||||||
|
|
||||||
-- cutting board
|
-- cutting board
|
||||||
|
|
||||||
core.register_craftitem("farming:cutting_board", {
|
minetest.register_craftitem("farming:cutting_board", {
|
||||||
description = S("Cutting Board"),
|
description = S("Cutting Board"),
|
||||||
inventory_image = "farming_cutting_board.png",
|
inventory_image = "farming_cutting_board.png",
|
||||||
groups = {food_cutting_board = 1, flammable = 2}
|
groups = {food_cutting_board = 1, flammable = 2}
|
||||||
@ -51,7 +51,7 @@ core.register_craftitem("farming:cutting_board", {
|
|||||||
|
|
||||||
-- juicer
|
-- juicer
|
||||||
|
|
||||||
core.register_craftitem("farming:juicer", {
|
minetest.register_craftitem("farming:juicer", {
|
||||||
description = S("Juicer"),
|
description = S("Juicer"),
|
||||||
inventory_image = "farming_juicer.png",
|
inventory_image = "farming_juicer.png",
|
||||||
groups = {food_juicer = 1, flammable = 2}
|
groups = {food_juicer = 1, flammable = 2}
|
||||||
@ -59,7 +59,7 @@ core.register_craftitem("farming:juicer", {
|
|||||||
|
|
||||||
-- glass mixing bowl
|
-- glass mixing bowl
|
||||||
|
|
||||||
core.register_craftitem("farming:mixing_bowl", {
|
minetest.register_craftitem("farming:mixing_bowl", {
|
||||||
description = S("Glass Mixing Bowl"),
|
description = S("Glass Mixing Bowl"),
|
||||||
inventory_image = "farming_mixing_bowl.png",
|
inventory_image = "farming_mixing_bowl.png",
|
||||||
groups = {food_mixing_bowl = 1, flammable = 2}
|
groups = {food_mixing_bowl = 1, flammable = 2}
|
||||||
@ -67,7 +67,7 @@ core.register_craftitem("farming:mixing_bowl", {
|
|||||||
|
|
||||||
-- Ethanol (thanks to JKMurray for this idea)
|
-- Ethanol (thanks to JKMurray for this idea)
|
||||||
|
|
||||||
core.register_node("farming:bottle_ethanol", {
|
minetest.register_node("farming:bottle_ethanol", {
|
||||||
description = S("Bottle of Ethanol"),
|
description = S("Bottle of Ethanol"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_bottle_ethanol.png"},
|
tiles = {"farming_bottle_ethanol.png"},
|
||||||
@ -86,7 +86,7 @@ core.register_node("farming:bottle_ethanol", {
|
|||||||
|
|
||||||
-- straw
|
-- straw
|
||||||
|
|
||||||
core.register_node("farming:straw", {
|
minetest.register_node("farming:straw", {
|
||||||
description = S("Straw"),
|
description = S("Straw"),
|
||||||
tiles = {"farming_straw.png"},
|
tiles = {"farming_straw.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
@ -96,45 +96,9 @@ core.register_node("farming:straw", {
|
|||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
-- weed
|
|
||||||
|
|
||||||
core.register_node("farming:weed", {
|
|
||||||
description = S("Weed"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_weed.png"},
|
|
||||||
inventory_image = "farming_weed.png",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "meshoptions",
|
|
||||||
place_param2 = 2,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
waving = 1,
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {snappy = 3, flammable = 4, plant = 1, attached_node = 1},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
-- weed bale
|
|
||||||
|
|
||||||
core.register_node("farming:weed_bale", {
|
|
||||||
description = S("Weed Bale"),
|
|
||||||
tiles = {
|
|
||||||
"farming_weed_bale_top.png", "farming_weed_bale_top.png",
|
|
||||||
"farming_weed_bale_side.png"
|
|
||||||
},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30},
|
|
||||||
sounds = farming.node_sound_leaves_defaults(),
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
-- hemp oil
|
-- hemp oil
|
||||||
|
|
||||||
core.register_node("farming:hemp_oil", {
|
minetest.register_node("farming:hemp_oil", {
|
||||||
description = S("Bottle of Hemp Oil"),
|
description = S("Bottle of Hemp Oil"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_hemp_oil.png"},
|
tiles = {"farming_hemp_oil.png"},
|
||||||
@ -144,7 +108,8 @@ core.register_node("farming:hemp_oil", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
type = "fixed",
|
||||||
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||||
},
|
},
|
||||||
groups = {
|
groups = {
|
||||||
food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
||||||
@ -155,7 +120,7 @@ core.register_node("farming:hemp_oil", {
|
|||||||
|
|
||||||
-- hemp fibre
|
-- hemp fibre
|
||||||
|
|
||||||
core.register_craftitem("farming:hemp_fibre", {
|
minetest.register_craftitem("farming:hemp_fibre", {
|
||||||
description = S("Hemp Fibre"),
|
description = S("Hemp Fibre"),
|
||||||
inventory_image = "farming_hemp_fibre.png",
|
inventory_image = "farming_hemp_fibre.png",
|
||||||
groups = {compostability = 55}
|
groups = {compostability = 55}
|
||||||
@ -163,7 +128,7 @@ core.register_craftitem("farming:hemp_fibre", {
|
|||||||
|
|
||||||
-- hemp block
|
-- hemp block
|
||||||
|
|
||||||
core.register_node("farming:hemp_block", {
|
minetest.register_node("farming:hemp_block", {
|
||||||
description = S("Hemp Block"),
|
description = S("Hemp Block"),
|
||||||
tiles = {"farming_hemp_block.png"},
|
tiles = {"farming_hemp_block.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -179,7 +144,7 @@ core.register_node("farming:hemp_block", {
|
|||||||
|
|
||||||
-- hemp rope
|
-- hemp rope
|
||||||
|
|
||||||
core.register_node("farming:hemp_rope", {
|
minetest.register_node("farming:hemp_rope", {
|
||||||
description = S("Hemp Rope"),
|
description = S("Hemp Rope"),
|
||||||
walkable = false,
|
walkable = false,
|
||||||
climbable = true,
|
climbable = true,
|
||||||
@ -196,7 +161,8 @@ core.register_node("farming:hemp_rope", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = farming.node_sound_leaves_defaults(),
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
|
type = "fixed",
|
||||||
|
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
|
||||||
},
|
},
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
@ -204,7 +170,7 @@ core.register_node("farming:hemp_rope", {
|
|||||||
|
|
||||||
--- Wooden scarecrow base
|
--- Wooden scarecrow base
|
||||||
|
|
||||||
core.register_node("farming:scarecrow_bottom", {
|
minetest.register_node("farming:scarecrow_bottom", {
|
||||||
description = S("Scarecrow Bottom"),
|
description = S("Scarecrow Bottom"),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -230,7 +196,7 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Wooden bowl
|
-- Wooden bowl
|
||||||
|
|
||||||
core.register_craftitem("farming:bowl", {
|
minetest.register_craftitem("farming:bowl", {
|
||||||
description = S("Wooden Bowl"),
|
description = S("Wooden Bowl"),
|
||||||
inventory_image = "farming_bowl.png",
|
inventory_image = "farming_bowl.png",
|
||||||
groups = {food_bowl = 1, flammable = 2}
|
groups = {food_bowl = 1, flammable = 2}
|
||||||
@ -238,7 +204,7 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- String
|
-- String
|
||||||
|
|
||||||
core.register_craftitem("farming:string", {
|
minetest.register_craftitem("farming:string", {
|
||||||
description = S("String"),
|
description = S("String"),
|
||||||
inventory_image = "farming_string.png",
|
inventory_image = "farming_string.png",
|
||||||
groups = {flammable = 2}
|
groups = {flammable = 2}
|
||||||
@ -246,7 +212,7 @@ if not farming.mcl then
|
|||||||
|
|
||||||
-- Jack 'O Lantern
|
-- Jack 'O Lantern
|
||||||
|
|
||||||
core.register_node("farming:jackolantern", {
|
minetest.register_node("farming:jackolantern", {
|
||||||
description = S("Jack 'O Lantern (punch to turn on and off)"),
|
description = S("Jack 'O Lantern (punch to turn on and off)"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
||||||
@ -265,15 +231,15 @@ if not farming.mcl then
|
|||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
local name = puncher:get_player_name() or ""
|
local name = puncher:get_player_name() or ""
|
||||||
if core.is_protected(pos, name) then return end
|
if minetest.is_protected(pos, name) then return end
|
||||||
node.name = "farming:jackolantern_on"
|
node.name = "farming:jackolantern_on"
|
||||||
core.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
end,
|
end,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_node("farming:jackolantern_on", {
|
minetest.register_node("farming:jackolantern_on", {
|
||||||
tiles = {
|
tiles = {
|
||||||
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
||||||
"farming_pumpkin_bottom.png",
|
"farming_pumpkin_bottom.png",
|
||||||
@ -282,7 +248,7 @@ if not farming.mcl then
|
|||||||
"farming_pumpkin_side.png",
|
"farming_pumpkin_side.png",
|
||||||
"farming_pumpkin_side.png^farming_pumpkin_face_on.png"
|
"farming_pumpkin_side.png^farming_pumpkin_face_on.png"
|
||||||
},
|
},
|
||||||
light_source = core.LIGHT_MAX - 1,
|
light_source = minetest.LIGHT_MAX - 1,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2,
|
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2,
|
||||||
@ -294,9 +260,9 @@ if not farming.mcl then
|
|||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
local name = puncher:get_player_name() or ""
|
local name = puncher:get_player_name() or ""
|
||||||
if core.is_protected(pos, name) then return end
|
if minetest.is_protected(pos, name) then return end
|
||||||
node.name = "farming:jackolantern"
|
node.name = "farming:jackolantern"
|
||||||
core.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
end,
|
end,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
|
339
item_recipes.lua
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-- check and register stairs
|
-- check and register stairs
|
||||||
|
|
||||||
if core.global_exists("stairs") then
|
if minetest.global_exists("stairs") then
|
||||||
|
|
||||||
if stairs.mod and stairs.mod == "redo" then
|
if stairs.mod and stairs.mod == "redo" then
|
||||||
|
|
||||||
|
@ -1,113 +1,50 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Banana=Banane
|
Artichoke=
|
||||||
Banana Leaves=Bananenblätter
|
Asparagus=
|
||||||
Orange=Orange
|
Barley Seed=Gerstenkörner
|
||||||
Artichoke=Artischocke
|
|
||||||
Crop=-Pflanze
|
|
||||||
Asparagus=Spargel
|
|
||||||
Barley Seed=Gerstensamen
|
|
||||||
Barley=Gerste
|
Barley=Gerste
|
||||||
Green Beans=Grüne Bohnen
|
Green Beans=Grüne Bohnen
|
||||||
Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den@nAckerboden stellen)
|
Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen)
|
||||||
Beetroot=Rote Beete
|
Beetroot=Rote Beete
|
||||||
Blackberries=Brombeeren
|
Beetroot Soup=Rote Beete Suppe
|
||||||
Blackberry=Brombeere
|
Blackberries=
|
||||||
Wild Blueberries=Wilde Blaubeeren
|
Wild Blueberries=Wilde Blaubeeren
|
||||||
Blueberry=Blaubeere
|
Blueberry Muffin=Blaubeermuffin
|
||||||
|
Blueberry Pie=Blaubeerkuchen
|
||||||
Cabbage=Kohl
|
Cabbage=Kohl
|
||||||
Carrot=Möhre
|
Carrot=Möhre
|
||||||
|
Carrot Juice=Möhrensaft
|
||||||
|
Golden Carrot=Goldene Möhre
|
||||||
Chili Pepper=Chili
|
Chili Pepper=Chili
|
||||||
Raw Cocoa Beans=Rohe Kakaobohnen
|
Bowl of Chili=Chili Schale
|
||||||
Cocoa Beans=Kakaobohnen
|
Chili Powder=
|
||||||
|
Raw Cocoa Beans=
|
||||||
|
Cocoa Beans=Kakaobohne
|
||||||
|
Cookie=Keks
|
||||||
|
Bar of Dark Chocolate=Tafel Zartbitterschokolade
|
||||||
|
Chocolate Block=Schokoladenstück
|
||||||
Coffee Beans=Kaffeebohnen
|
Coffee Beans=Kaffeebohnen
|
||||||
Coffee=Kaffee
|
Cup of Coffee=Tasse Kaffee
|
||||||
|
Banana=Banane
|
||||||
|
Banana Leaves=Bananenblätter
|
||||||
|
Orange=Apfelsine
|
||||||
Corn=Mais
|
Corn=Mais
|
||||||
|
Corn on the Cob=Maiskolben
|
||||||
|
Popcorn=
|
||||||
|
Cornstarch=Speisestärke
|
||||||
|
Bottle of Ethanol=Flasche Ethanol
|
||||||
|
Wild Cotton=Wilde Baumwolle
|
||||||
Cotton Seed=Baumwollsamen
|
Cotton Seed=Baumwollsamen
|
||||||
Cotton=Baumwolle
|
Cotton=Baumwolle
|
||||||
Wild Cotton=Wilde Baumwolle
|
String=Faden
|
||||||
Cucumber=Gurke
|
Cucumber=Gurke
|
||||||
Eggplant=Aubergine
|
Eggplant=
|
||||||
Garlic clove=Knoblauchzehe
|
Glass of Water=
|
||||||
Garlic=Knoblauch
|
Sugar=Zucker
|
||||||
Ginger=Lebkuchen
|
Sugar Cube=
|
||||||
Grapes=Weintrauben
|
Caramel=
|
||||||
Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den@nAckerboden stellen)
|
|
||||||
Hemp Seed=Hanfsamen
|
|
||||||
Hemp Leaf=Hanfblatt
|
|
||||||
Hemp=Hanf
|
|
||||||
Lettuce=Kopfsalat
|
|
||||||
Melon Slice=Melonenscheibe
|
|
||||||
Melon=Melone
|
|
||||||
Mint Seeds=Minzsamen
|
|
||||||
Mint Leaf=Minzblatt
|
|
||||||
Mint=Minze
|
|
||||||
Onion=Zwiebel
|
|
||||||
Parsley=Petersilie
|
|
||||||
Pea Pod=Erbsenschote
|
|
||||||
Pea=Erbse
|
|
||||||
Peppercorn=Pfefferkorn
|
|
||||||
Green Pepper=Grüne Paprika
|
|
||||||
Yellow Pepper=Gelbe Paprika
|
|
||||||
Red Pepper=Rote Paprika
|
|
||||||
Pepper=Paprika
|
|
||||||
Pineapple Top=Ananasdeckel
|
|
||||||
Pineapple=Ananas
|
|
||||||
Potato=Kartoffel
|
|
||||||
Pumpkin Slice=Kürbisscheibe
|
|
||||||
Pumpkin=Kürbis
|
|
||||||
Raspberries=Himbeeren
|
|
||||||
Raspberry=Himbeere
|
|
||||||
Rhubarb=Rhabarber
|
|
||||||
Rice Seed=Reissamen
|
|
||||||
Rice=Reis
|
|
||||||
Rye seed=Roggensamen
|
|
||||||
Rye=Roggen
|
|
||||||
Oat seed=Hafersamen
|
|
||||||
Oats=Hafer
|
|
||||||
Soy Pod=Sojaschote
|
|
||||||
Soy=Soja
|
|
||||||
Spinach=Spinat
|
|
||||||
Strawberry=Erdbeere
|
|
||||||
Sunflower Seeds=Sonnenblumensamen
|
|
||||||
Sunflower=Sonnenblume
|
|
||||||
Tomato=Tomate
|
|
||||||
Vanilla=Vanille
|
|
||||||
Wheat Seed=Weizensamen
|
|
||||||
Wheat=Weizen
|
|
||||||
Hoe=Hacke
|
|
||||||
Wooden Hoe=Holzhacke
|
|
||||||
Stone Hoe=Steinhacke
|
|
||||||
Steel Hoe=Stahlhacke
|
|
||||||
Bronze Hoe=Bronzehacke
|
|
||||||
Mese Hoe=Mesehacke
|
|
||||||
Diamond Hoe=Diamanthacke
|
|
||||||
Wood Hoe=Holzhacke
|
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=Hackenbombe (Auf Grasland werfen oder benutzen,@num Land zu bestellen)
|
|
||||||
Mithril Scythe (Use to harvest and replant crops)=Mithrilsichel (Benutzen, um Nutzpflanzen zu ernten und neu zu pflanzen)
|
|
||||||
Seed=Saatgut
|
|
||||||
Flour=Mehl
|
|
||||||
Garlic Braid=Knoblauchzopf
|
|
||||||
Corn on the Cob=Maiskolben
|
|
||||||
Popcorn=Popcorn
|
|
||||||
Cornstarch=Speisestärke
|
|
||||||
Cup of Coffee=Tasse Kaffee
|
|
||||||
Bar of Dark Chocolate=Tafel Zartbitterschokolade
|
|
||||||
Chocolate Block=Schokoladenblock
|
|
||||||
Bowl of Chili=Schüssel mit Chili
|
|
||||||
Chili Powder=Chilipulver
|
|
||||||
Carrot Juice=Möhrensaft
|
|
||||||
Blueberry Pie=Blaubeerkuchen
|
|
||||||
Blueberry Muffin=Blaubeermuffin
|
|
||||||
Tomato Soup=Tomatensuppe
|
|
||||||
Sliced Bread=Geschnittenes Brot
|
|
||||||
Toast=Toast
|
|
||||||
Toast Sandwich=Toast-Sandwich
|
|
||||||
Glass of Water=Glas Wasser
|
|
||||||
Sugar Cube=Zuckerwürfel
|
|
||||||
Caramel=Karamell
|
|
||||||
Salt=Salz
|
Salt=Salz
|
||||||
Salt crystal=Salzkristall
|
Mayonnaise=
|
||||||
Mayonnaise=Mayonnaise
|
|
||||||
Rose Water=Rosenwasser
|
Rose Water=Rosenwasser
|
||||||
Turkish Delight=Lokum
|
Turkish Delight=Lokum
|
||||||
Garlic Bread=Knoblauchbrot
|
Garlic Bread=Knoblauchbrot
|
||||||
@ -115,56 +52,110 @@ Donut=Donut
|
|||||||
Chocolate Donut=Schokodonut
|
Chocolate Donut=Schokodonut
|
||||||
Apple Donut=Apfeldonut
|
Apple Donut=Apfeldonut
|
||||||
Porridge=Haferbrei
|
Porridge=Haferbrei
|
||||||
Jaffa Cake=Jaffa
|
Jaffa Cake=Jaffakeks
|
||||||
Apple Pie=Apfelkuchen
|
Apple Pie=Apfelkuchen
|
||||||
Cactus Juice=Kaktussaft
|
Cactus Juice=Kaktussaft
|
||||||
Pasta=Pasta
|
Pasta=Pasta
|
||||||
Mac & Cheese=Makkaroni mit Käse
|
Mac & Cheese=
|
||||||
Spaghetti=Spaghetti
|
Spaghetti=Spaghetti
|
||||||
Bibimbap=Bibimbap
|
Bibimbap=Bibimbap
|
||||||
Burger=Burger
|
Burger=
|
||||||
Salad=Salat
|
Salad=Salat
|
||||||
Triple Berry Smoothie=Dreibeersmoothie
|
Triple Berry Smoothie=
|
||||||
Spanish Potatoes=Spanische Kartoffeln
|
Spanish Potatoes=
|
||||||
Potato omelette=Kartoffelomelette
|
Potato omelet=
|
||||||
Paella=Paella
|
Paella=
|
||||||
Vanilla Flan=Vanilletorte
|
Vanilla Flan=
|
||||||
Vegan Cheese=Veganer Käse
|
Vegan Cheese=
|
||||||
Vegan Butter=Vegane Butter
|
Onigiri=
|
||||||
Onigiri=Onigiri
|
Gyoza=
|
||||||
Gyoza=Gyoza
|
Mochi=
|
||||||
Mochi=Mochi
|
Gingerbread Man=
|
||||||
Gingerbread Man=Lebkuchenmann
|
Garlic clove=Knoblauchzehe
|
||||||
|
Garlic=Knoblauch
|
||||||
|
Garlic Braid=Knoblauchzopf
|
||||||
|
Ginger=
|
||||||
|
Grapes=Weintrauben
|
||||||
|
Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen)
|
||||||
|
Hemp Seed=Hanfsamen
|
||||||
|
Hemp Leaf=Hanfblatt
|
||||||
|
Bottle of Hemp Oil=Flasche mit Hanföl
|
||||||
|
Hemp Fibre=Hanffaser
|
||||||
|
Hemp Block=Hanfblock
|
||||||
|
Hemp Rope=Hanfseil
|
||||||
|
Hoe=Hacke
|
||||||
|
Wooden Hoe=Holzhacke
|
||||||
|
Stone Hoe=Steinhacke
|
||||||
|
Steel Hoe=Stahlhacke
|
||||||
|
Bronze Hoe=Bronzehacke
|
||||||
|
Mese Hoe=Mesehacke
|
||||||
|
Diamond Hoe=Diamanthacke
|
||||||
|
Wood Hoe=
|
||||||
|
Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen)
|
||||||
|
Mithril Scythe (Use to harvest and replant crops)=
|
||||||
|
Seed=Saatgut
|
||||||
|
Lettuce=
|
||||||
|
Melon Slice=Melonenscheibe
|
||||||
|
Melon=Melone
|
||||||
|
Mint Seeds=Minzsamen
|
||||||
|
Mint Leaf=Minzblatt
|
||||||
Mint Tea=Minztee
|
Mint Tea=Minztee
|
||||||
|
Onion=Zwiebel
|
||||||
Onion Soup=Zwiebelsuppe
|
Onion Soup=Zwiebelsuppe
|
||||||
|
Parsley=
|
||||||
|
Pea Pod=Erbsenschote
|
||||||
Pea Soup=Erbsensuppe
|
Pea Soup=Erbsensuppe
|
||||||
|
Peppercorn=Pfefferkorn
|
||||||
|
Green Pepper=
|
||||||
|
Yellow Pepper=
|
||||||
|
Red Pepper=
|
||||||
Ground Pepper=Gemahlener Pfeffer
|
Ground Pepper=Gemahlener Pfeffer
|
||||||
|
Pineapple Top=Ananasdeckel
|
||||||
|
Pineapple=Ananas
|
||||||
Pineapple Ring=Ananasscheibe
|
Pineapple Ring=Ananasscheibe
|
||||||
Pineapple Juice=Ananassaft
|
Pineapple Juice=Ananassaft
|
||||||
Cucumber and Potato Salad=Gurken-Kartoffelsalat
|
Potato=Kartoffel
|
||||||
Pumpkin Dough=Kürbisteig
|
Baked Potato=Ofenkartoffel
|
||||||
|
Cucumber and Potato Salad=Kartoffelsalat mit Gurke
|
||||||
|
Pumpkin Slice=Kürbisscheibe
|
||||||
|
Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten)
|
||||||
|
Scarecrow Bottom=Vogelscheuchengestell
|
||||||
Pumpkin Bread=Kürbisbrot
|
Pumpkin Bread=Kürbisbrot
|
||||||
|
Pumpkin Dough=Kürbisteig
|
||||||
|
Pumpkin=Kürbis
|
||||||
|
Raspberries=Himbeeren
|
||||||
Raspberry Smoothie=Himbeersmoothie
|
Raspberry Smoothie=Himbeersmoothie
|
||||||
|
Rhubarb=Rhabarber
|
||||||
Rhubarb Pie=Rhabarberkuchen
|
Rhubarb Pie=Rhabarberkuchen
|
||||||
Rice Flour=Reismehl
|
Rice Seed=
|
||||||
|
Rice=Reis
|
||||||
Rice Bread=Reiswaffel
|
Rice Bread=Reiswaffel
|
||||||
|
Rice Flour=Reismehl
|
||||||
|
Rye seed=Roggensaat
|
||||||
|
Rye=Roggen
|
||||||
|
Oat seed=Hafersamen
|
||||||
|
Oats=Hafer
|
||||||
Multigrain Flour=Mehrkornmehl
|
Multigrain Flour=Mehrkornmehl
|
||||||
Multigrain Bread=Mehrkornbrot
|
Multigrain Bread=Mehrkornbrot
|
||||||
Soy Sauce=Sojasoße
|
Savanna Soil=Savannaerde
|
||||||
Soy Milk=Sojamilch
|
Wet Savanna Soil=Feuchte Savannaerde
|
||||||
Tofu=Tofu
|
Soil=Ackerboden
|
||||||
Cooked Tofu=Gekochter Tofu
|
Wet Soil=Bewässerter Ackerboden
|
||||||
Toasted Sunflower Seeds=Geröstete Sonnenblumensamen
|
Soy Pod=
|
||||||
Bottle of Sunflower Oil=Flasche Sonnenblumenöl
|
Soy Sauce=
|
||||||
Sunflower Seed Bread=Sonnenblumensamenbrot
|
Soy Milk=
|
||||||
Vanilla Extract=Vanilleextrakt
|
Tofu=
|
||||||
Jerusalem Artichokes=Jerusalemartischocken
|
Cooked Tofu=
|
||||||
Bread=Brot
|
Spinach=
|
||||||
Cookie=Keks
|
Strawberry=Erdbeere
|
||||||
Golden Carrot=Goldene Möhre
|
Sunflower=
|
||||||
Beetroot Soup=Rote-Beete-Suppe
|
Sunflower Seeds=
|
||||||
Sugar=Zucker
|
Toasted Sunflower Seeds=
|
||||||
Baked Potato=Ofenkartoffel
|
Bottle of Sunflower Oil=
|
||||||
|
Sunflower Seed Bread=
|
||||||
|
Tomato=Tomate
|
||||||
|
Tomato Soup=
|
||||||
|
Wooden Bowl=Holzschale
|
||||||
Saucepan=Kasserolle
|
Saucepan=Kasserolle
|
||||||
Cooking Pot=Kochtopf
|
Cooking Pot=Kochtopf
|
||||||
Baking Tray=Kuchenblech
|
Baking Tray=Kuchenblech
|
||||||
@ -173,17 +164,13 @@ Mortar and Pestle=Mörser und Stößel
|
|||||||
Cutting Board=Schneidebrett
|
Cutting Board=Schneidebrett
|
||||||
Juicer=Entsafter
|
Juicer=Entsafter
|
||||||
Glass Mixing Bowl=Glasschüssel
|
Glass Mixing Bowl=Glasschüssel
|
||||||
Bottle of Ethanol=Flasche Ethanol
|
Vanilla=
|
||||||
|
Vanilla Extract=
|
||||||
|
Wheat Seed=Weizenkörner
|
||||||
|
Wheat=Weizen
|
||||||
Straw=Stroh
|
Straw=Stroh
|
||||||
Bottle of Hemp Oil=Flasche mit Hanföl
|
Flour=Mehl
|
||||||
Hemp Fibre=Hanffaser
|
Bread=Brot
|
||||||
Hemp Block=Hanfblock
|
Sliced Bread=Geschnittenes Brot
|
||||||
Hemp Rope=Hanfseil
|
Toast=Toast
|
||||||
Scarecrow Bottom=Vogelscheuchengestell
|
Toast Sandwich=Toast Sandwich
|
||||||
Wooden Bowl=Holzschale
|
|
||||||
String=Faden
|
|
||||||
Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Hauen zum Ein- und Ausschalten)
|
|
||||||
Savanna Soil=Savannenerde
|
|
||||||
Wet Savanna Soil=Feuchte Savannenerde
|
|
||||||
Soil=Ackerboden
|
|
||||||
Wet Soil=Feuchter Ackerboden
|
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Crop= Termény
|
|
||||||
Artichoke=Articsóka
|
Artichoke=Articsóka
|
||||||
Asparagus=Spárga
|
Asparagus=Spárga
|
||||||
Barley Seed=Árpamag
|
Barley Seed=Árpamag
|
||||||
Barley=Árpa
|
Barley=Árpa
|
||||||
Green Beans=Zöldbab
|
Green Beans=Zöldbab
|
||||||
Bean Pole (place on soil before planting beans)=Karó babhoz (szúrd a földbe és oda vess babot)
|
Bean Pole (place on soil before planting beans)=Karó babhoz (szúrd a földbe és oda vess babot)
|
||||||
Beetroot=Cékla
|
Beetroot=cékla
|
||||||
Beetroot Soup=Céklaleves
|
Beetroot Soup=céklaleves
|
||||||
Blackberry=Szeder
|
Blackberries=Szeder
|
||||||
Blackberries=Szedrek
|
|
||||||
Wild Blueberries=Vadáfonya
|
Wild Blueberries=Vadáfonya
|
||||||
Blueberry=Áfonya
|
|
||||||
Blueberry Muffin=Áfonyamuffin
|
Blueberry Muffin=Áfonyamuffin
|
||||||
Blueberry Pie=Áfonyatorta
|
Blueberry Pie=Áfonyatorta
|
||||||
Cabbage=Káposzta
|
Cabbage=Káposzta
|
||||||
@ -24,9 +21,8 @@ Chili Powder=Chilipor
|
|||||||
Raw Cocoa Beans=Nyers kakaóbab
|
Raw Cocoa Beans=Nyers kakaóbab
|
||||||
Cocoa Beans=Kakaóbab
|
Cocoa Beans=Kakaóbab
|
||||||
Cookie=Süti
|
Cookie=Süti
|
||||||
Bar of Dark Chocolate=Étcsoki rúd
|
Bar of Dark Chocolate=Rúd étcsoki
|
||||||
Chocolate Block=Csokoládé tömb
|
Chocolate Block=Csokiblokk
|
||||||
Coffee=Kávé
|
|
||||||
Coffee Beans=Kávébab
|
Coffee Beans=Kávébab
|
||||||
Cup of Coffee=Csésze kávé
|
Cup of Coffee=Csésze kávé
|
||||||
Banana=Banán
|
Banana=Banán
|
||||||
@ -57,7 +53,7 @@ Chocolate Donut=Csokis fánk
|
|||||||
Apple Donut=Almás fánk
|
Apple Donut=Almás fánk
|
||||||
Porridge=Zabkása
|
Porridge=Zabkása
|
||||||
Jaffa Cake=Jaffatorta
|
Jaffa Cake=Jaffatorta
|
||||||
Apple Pie=Almáspite
|
Apple Pie=Almáspita
|
||||||
Cactus Juice=Kaktuszlé
|
Cactus Juice=Kaktuszlé
|
||||||
Pasta=Tészta
|
Pasta=Tészta
|
||||||
Mac & Cheese=Sajtos makaróni
|
Mac & Cheese=Sajtos makaróni
|
||||||
@ -65,7 +61,7 @@ Spaghetti=Spagetti
|
|||||||
Bibimbap=Bibimbap
|
Bibimbap=Bibimbap
|
||||||
Burger=Burger
|
Burger=Burger
|
||||||
Salad=Saláta
|
Salad=Saláta
|
||||||
Triple Berry Smoothie=Hárombogyós turmix
|
Triple Berry Smoothie=Hárombogyós smoothie
|
||||||
Spanish Potatoes=Tepsis krumpli
|
Spanish Potatoes=Tepsis krumpli
|
||||||
Potato omelet=Krumplis rántotta
|
Potato omelet=Krumplis rántotta
|
||||||
Paella=Paella
|
Paella=Paella
|
||||||
@ -75,18 +71,17 @@ Onigiri=Onigiri
|
|||||||
Gyoza=Gyoza
|
Gyoza=Gyoza
|
||||||
Mochi=Mochi
|
Mochi=Mochi
|
||||||
Gingerbread Man=Mézeskalács-emberke
|
Gingerbread Man=Mézeskalács-emberke
|
||||||
Garlic clove=Fokhagymagerezd
|
Garlic clove=Gerezd fokhagyma
|
||||||
Garlic=Fokhagyma
|
Garlic=Fokhagyma
|
||||||
Garlic Braid=Fokhagymafüzér
|
Garlic Braid=Fokhagymafüzér
|
||||||
Ginger=Gyömbér
|
Ginger=Gyömbér
|
||||||
Grapes=Szőlő
|
Grapes=Szőlő
|
||||||
Trellis (place on soil before planting grapes)=Karó szőlőhöz (szúrd a földbe és oda vess szőlőt)
|
Trellis (place on soil before planting grapes)=Karó szőlőhöz (szúrd a földbe és oda vess babot)
|
||||||
Hemp=Kender
|
|
||||||
Hemp Seed=Kendermag
|
Hemp Seed=Kendermag
|
||||||
Hemp Leaf=Kenderlevél
|
Hemp Leaf=Kenderlevél
|
||||||
Bottle of Hemp Oil=Üveg kenderolaj
|
Bottle of Hemp Oil=Üveg kenderolaj
|
||||||
Hemp Fibre=Kenderrost
|
Hemp Fibre=Kenderrost
|
||||||
Hemp Block=Kender tömb
|
Hemp Block=Kenderblokk
|
||||||
Hemp Rope=Kenderkötél
|
Hemp Rope=Kenderkötél
|
||||||
Hoe=Kapa
|
Hoe=Kapa
|
||||||
Wooden Hoe=Fakapa
|
Wooden Hoe=Fakapa
|
||||||
@ -96,23 +91,20 @@ Bronze Hoe=Bronzkapa
|
|||||||
Mese Hoe=Mesekapa
|
Mese Hoe=Mesekapa
|
||||||
Diamond Hoe=Gyémántkapa
|
Diamond Hoe=Gyémántkapa
|
||||||
Wood Hoe=Fakapa (2)
|
Wood Hoe=Fakapa (2)
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=Kapabomba (használd vagy dobd füves területre a föld felkapálásához)
|
Hoe Bomb (use or throw on grassy areas to hoe land)=Kapabomba (használd vagy dobd füves területre)
|
||||||
Mithril Scythe (Use to harvest and replant crops)=Mithrilkasza (használd termények begyűjtéséhez és újravetéséhez)
|
Mithril Scythe (Use to harvest and replant crops)=Mithrilkasza (használd termények begyűjtéséhez és újravetéséhez)
|
||||||
Seed=Mag
|
Seed=Mag
|
||||||
Lettuce=Saláta
|
Lettuce=Saláta
|
||||||
Melon Slice=Dinnyeszelet
|
Melon Slice=Szelet dinnye
|
||||||
Melon=Dinnye
|
Melon=Dinnye
|
||||||
Mint=Menta
|
|
||||||
Mint Seeds=Mentamag
|
Mint Seeds=Mentamag
|
||||||
Mint Leaf=Mentalevél
|
Mint Leaf=Mentalevél
|
||||||
Mint Tea=Mentatea
|
Mint Tea=Mentatea
|
||||||
Onion=Hagyma
|
Onion=Hagyma
|
||||||
Onion Soup=Hagymaleves
|
Onion Soup=Hagymaleves
|
||||||
Parsley=Petrezselyem
|
Parsley=Petrezselyem
|
||||||
Pea=Borsó
|
|
||||||
Pea Pod=Hüvelyes borsó
|
Pea Pod=Hüvelyes borsó
|
||||||
Pea Soup=Borsóleves
|
Pea Soup=Borsóleves
|
||||||
Pepper=Bors
|
|
||||||
Peppercorn=Borsszemek
|
Peppercorn=Borsszemek
|
||||||
Green Pepper=Zöldpaprika
|
Green Pepper=Zöldpaprika
|
||||||
Yellow Pepper=Sárga paprika
|
Yellow Pepper=Sárga paprika
|
||||||
@ -120,20 +112,19 @@ Red Pepper=Pirospaprika
|
|||||||
Ground Pepper=Őrölt bors
|
Ground Pepper=Őrölt bors
|
||||||
Pineapple Top=Ananászüstök
|
Pineapple Top=Ananászüstök
|
||||||
Pineapple=Ananász
|
Pineapple=Ananász
|
||||||
Pineapple Ring=Ananász szelet
|
Pineapple Ring=Szelet ananász
|
||||||
Pineapple Juice=Ananászlé
|
Pineapple Juice=Ananászlé
|
||||||
Potato=Krumpli
|
Potato=Krumpli
|
||||||
Baked Potato=Sült krumpli
|
Baked Potato=Sült krumpli
|
||||||
Cucumber and Potato Salad=Uborkás krumplisaláta
|
Cucumber and Potato Salad=Uborkás krumplisaláta
|
||||||
Pumpkin Slice=Tök szelet
|
Pumpkin Slice=Szelet tök
|
||||||
Jack 'O Lantern (punch to turn on and off)=Töklámpás (ütéssel kapcsold ki és be)
|
Jack 'O Lantern (punch to turn on and off)=Töklámpás (ütéssel kapcsold ki és be)
|
||||||
Scarecrow Bottom=Madárijesztő alja
|
Scarecrow Bottom=Madárijesztő alja
|
||||||
Pumpkin Bread=Tökkenyér
|
Pumpkin Bread=Tökkenyér
|
||||||
Pumpkin Dough=Töktészta
|
Pumpkin Dough=Töktészta
|
||||||
Pumpkin=Tök
|
Pumpkin=Tök
|
||||||
Raspberry=Málna
|
Raspberries=Málna
|
||||||
Raspberries=Málnák
|
Raspberry Smoothie=Málnasmoothie
|
||||||
Raspberry Smoothie=Málnaturmix
|
|
||||||
Rhubarb=Rebarbara
|
Rhubarb=Rebarbara
|
||||||
Rhubarb Pie=Rebarbaratorta
|
Rhubarb Pie=Rebarbaratorta
|
||||||
Rice Seed=Rizsmag
|
Rice Seed=Rizsmag
|
||||||
@ -150,7 +141,6 @@ Savanna Soil=Szavannatalaj
|
|||||||
Wet Savanna Soil=Nedves szavannatalaj
|
Wet Savanna Soil=Nedves szavannatalaj
|
||||||
Soil=Talaj
|
Soil=Talaj
|
||||||
Wet Soil=Nedves talaj
|
Wet Soil=Nedves talaj
|
||||||
Soy=Szója
|
|
||||||
Soy Pod=Hüvelyes szója
|
Soy Pod=Hüvelyes szója
|
||||||
Soy Sauce=Szójaszósz
|
Soy Sauce=Szójaszósz
|
||||||
Soy Milk=Szójatej
|
Soy Milk=Szójatej
|
||||||
@ -160,7 +150,7 @@ Spinach=Spenót
|
|||||||
Strawberry=Eper
|
Strawberry=Eper
|
||||||
Sunflower=Napraforgó
|
Sunflower=Napraforgó
|
||||||
Sunflower Seeds=Napraforgómag
|
Sunflower Seeds=Napraforgómag
|
||||||
Toasted Sunflower Seeds=Pirított napraforgómag
|
Toasted Sunflower Seeds=Szotyi
|
||||||
Bottle of Sunflower Oil=Üveg napraforgó-olaj
|
Bottle of Sunflower Oil=Üveg napraforgó-olaj
|
||||||
Sunflower Seed Bread=Napraforgómagos kenyér
|
Sunflower Seed Bread=Napraforgómagos kenyér
|
||||||
Tomato=Paradicsom
|
Tomato=Paradicsom
|
||||||
@ -170,7 +160,7 @@ Saucepan=Szószostál
|
|||||||
Cooking Pot=Főzőedény
|
Cooking Pot=Főzőedény
|
||||||
Baking Tray=Sütőtál
|
Baking Tray=Sütőtál
|
||||||
Skillet=Serpenyő
|
Skillet=Serpenyő
|
||||||
Mortar and Pestle=Mozsár és zúzó
|
Mortar and Pestle=Mozsár
|
||||||
Cutting Board=Vágódeszka
|
Cutting Board=Vágódeszka
|
||||||
Juicer=Facsaró
|
Juicer=Facsaró
|
||||||
Glass Mixing Bowl=Üver keverőedény
|
Glass Mixing Bowl=Üver keverőedény
|
||||||
@ -178,7 +168,7 @@ Vanilla=Vanília
|
|||||||
Vanilla Extract=Vaníliakivonat
|
Vanilla Extract=Vaníliakivonat
|
||||||
Wheat Seed=Búzamag
|
Wheat Seed=Búzamag
|
||||||
Wheat=Búza
|
Wheat=Búza
|
||||||
Straw=Szalma
|
Straw=Szívószál
|
||||||
Flour=Liszt
|
Flour=Liszt
|
||||||
Bread=Kenyér
|
Bread=Kenyér
|
||||||
Sliced Bread=Szeletelt kenyér
|
Sliced Bread=Szeletelt kenyér
|
||||||
|
@ -1,55 +1,51 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Crop=植株
|
Artichoke=
|
||||||
Artichoke=洋蓟
|
Asparagus=
|
||||||
Asparagus=芦笋
|
|
||||||
Barley Seed=大麦种子
|
Barley Seed=大麦种子
|
||||||
Barley=大麦
|
Barley=大麦
|
||||||
Green Beans=青豆
|
Green Beans=青豆
|
||||||
Bean Pole (place on soil before planting beans)=豆杆(种豆前先放在土上)
|
Bean Pole (place on soil before planting beans)=豆杆(种豆前先放在土上)
|
||||||
Beetroot=甜菜根
|
Beetroot=甜菜根
|
||||||
Beetroot Soup=甜菜根汤
|
Beetroot Soup=甜菜根汤
|
||||||
Blackberry=黑莓
|
Blackberries=
|
||||||
Blackberries=黑莓
|
|
||||||
Blueberry=蓝莓
|
|
||||||
Wild Blueberries=蓝莓
|
Wild Blueberries=蓝莓
|
||||||
Blueberry Muffin=蓝莓松糕
|
Blueberry Muffin=蓝莓松糕
|
||||||
Blueberry Pie=蓝莓派
|
Blueberry Pie=蓝莓派
|
||||||
Cabbage=包菜
|
Cabbage=
|
||||||
Carrot=胡萝卜
|
Carrot=胡萝卜
|
||||||
Carrot Juice=胡萝卜汁
|
Carrot Juice=胡萝卜汁
|
||||||
Golden Carrot=金胡萝卜
|
Golden Carrot=金萝卜
|
||||||
Chili Pepper=辣椒
|
Chili Pepper=辣椒
|
||||||
Bowl of Chili=辣椒炒饭
|
Bowl of Chili=一碗辣椒
|
||||||
Chili Powder=辣椒面
|
Chili Powder=
|
||||||
Raw Cocoa Beans=生可可豆
|
Raw Cocoa Beans=
|
||||||
Cocoa Beans=可可豆
|
Cocoa Beans=可可豆
|
||||||
Cookie=曲奇
|
Cookie=曲奇
|
||||||
Bar of Dark Chocolate=黑巧克力条
|
Bar of Dark Chocolate=黑巧克力条
|
||||||
Chocolate Block=巧克力块
|
Chocolate Block=巧克力块
|
||||||
Coffee=咖啡
|
|
||||||
Coffee Beans=咖啡豆
|
Coffee Beans=咖啡豆
|
||||||
Cup of Coffee=一杯咖啡
|
Cup of Coffee=一杯咖啡
|
||||||
Banana=香蕉
|
Banana=香蕉
|
||||||
Banana Leaves=香蕉叶
|
Banana Leaves=香蕉叶
|
||||||
Orange=橙子
|
Orange=橙色
|
||||||
Corn=玉米
|
Corn=玉米
|
||||||
Corn on the Cob=玉米棒
|
Corn on the Cob=玉米棒
|
||||||
Popcorn=爆米花
|
Popcorn=
|
||||||
Cornstarch=玉米淀粉
|
Cornstarch=玉米淀粉
|
||||||
Bottle of Ethanol=一瓶乙醇
|
Bottle of Ethanol=一瓶乙醇
|
||||||
Wild Cotton=野生棉花
|
Wild Cotton=
|
||||||
Cotton Seed=棉籽
|
Cotton Seed=棉籽
|
||||||
Cotton=棉花
|
Cotton=棉花
|
||||||
String=线
|
String=线
|
||||||
Cucumber=黄瓜
|
Cucumber=黄瓜
|
||||||
Eggplant=茄子
|
Eggplant=
|
||||||
Glass of Water=一杯水
|
Glass of Water=
|
||||||
Sugar=糖
|
Sugar=糖
|
||||||
Sugar Cube=方糖
|
Sugar Cube=
|
||||||
Caramel=焦糖
|
Caramel=
|
||||||
Salt=盐
|
Salt=盐
|
||||||
Mayonnaise=蛋黄酱
|
Mayonnaise=
|
||||||
Rose Water=玫瑰水
|
Rose Water=玫瑰汁
|
||||||
Turkish Delight=土耳其软糖
|
Turkish Delight=土耳其软糖
|
||||||
Garlic Bread=蒜香面包
|
Garlic Bread=蒜香面包
|
||||||
Donut=甜甜圈
|
Donut=甜甜圈
|
||||||
@ -57,32 +53,30 @@ Chocolate Donut=巧克力甜甜圈
|
|||||||
Apple Donut=苹果甜甜圈
|
Apple Donut=苹果甜甜圈
|
||||||
Porridge=粥
|
Porridge=粥
|
||||||
Jaffa Cake=佳发饼
|
Jaffa Cake=佳发饼
|
||||||
Apple Pie=苹果派
|
Apple Pie=
|
||||||
Cactus Juice=仙人掌汁
|
Cactus Juice=
|
||||||
Pasta=意大利面
|
Pasta=
|
||||||
Mac & Cheese=芝士通心粉
|
Mac & Cheese=
|
||||||
Spaghetti=意大利面条
|
Spaghetti=
|
||||||
Bibimbap=石锅拌饭
|
Bibimbap=
|
||||||
Burger=汉堡
|
Burger=
|
||||||
Salad=沙拉
|
Salad=
|
||||||
Triple Berry Smoothie=三莓冰沙
|
Triple Berry Smoothie=
|
||||||
Spanish Potatoes=西班牙土豆
|
Spanish Potatoes=
|
||||||
Potato omelet=土豆煎蛋饼
|
Potato omelet=
|
||||||
Potato omelette=土豆煎蛋饼
|
Paella=
|
||||||
Paella=西班牙什锦饭
|
Vanilla Flan=
|
||||||
Vanilla Flan=香草布丁
|
Vegan Cheese=
|
||||||
Vegan Cheese=植物奶酪
|
Onigiri=
|
||||||
Onigiri=饭团
|
Gyoza=
|
||||||
Gyoza=煎饺
|
Mochi=
|
||||||
Mochi=麻薯
|
Gingerbread Man=
|
||||||
Gingerbread Man=姜饼人
|
|
||||||
Garlic clove=蒜瓣
|
Garlic clove=蒜瓣
|
||||||
Garlic=大蒜
|
Garlic=大蒜
|
||||||
Garlic Braid=蒜辫
|
Garlic Braid=蒜辫
|
||||||
Ginger=姜
|
Ginger=
|
||||||
Grapes=葡萄
|
Grapes=葡萄
|
||||||
Trellis (place on soil before planting grapes)=棚架(种植葡萄前先放在土壤上)
|
Trellis (place on soil before planting grapes)=棚架(种植葡萄前先放在土壤上)
|
||||||
Hemp=大麻
|
|
||||||
Hemp Seed=大麻籽
|
Hemp Seed=大麻籽
|
||||||
Hemp Leaf=大麻叶
|
Hemp Leaf=大麻叶
|
||||||
Bottle of Hemp Oil=一瓶大麻油
|
Bottle of Hemp Oil=一瓶大麻油
|
||||||
@ -92,34 +86,31 @@ Hemp Rope=麻绳
|
|||||||
Hoe=锄头
|
Hoe=锄头
|
||||||
Wooden Hoe=木锄
|
Wooden Hoe=木锄
|
||||||
Stone Hoe=石锄
|
Stone Hoe=石锄
|
||||||
Steel Hoe=钢锄
|
Steel Hoe=钢锄头
|
||||||
Bronze Hoe=青铜锄
|
Bronze Hoe=青铜锄头
|
||||||
Mese Hoe=黄石锄
|
Mese Hoe=黄石锄头
|
||||||
Diamond Hoe=钻石锄
|
Diamond Hoe=钻石锄
|
||||||
Wood Hoe=木锄
|
Wood Hoe=
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(使用或投掷在草地上松土)
|
Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(在草地上使用或扔在锄地上)
|
||||||
Mithril Scythe (Use to harvest and replant crops)=秘银镰刀(用于收获和重新种植作物)
|
Mithril Scythe (Use to harvest and replant crops)=
|
||||||
Seed=种子
|
Seed=种子
|
||||||
Lettuce=生菜
|
Lettuce=
|
||||||
Melon Slice=西瓜片
|
Melon Slice=西瓜片
|
||||||
Melon=西瓜
|
Melon=甜瓜
|
||||||
Mint=薄荷
|
Mint Seeds=
|
||||||
Mint Seeds=薄荷种子
|
Mint Leaf=
|
||||||
Mint Leaf=薄荷叶
|
Mint Tea=
|
||||||
Mint Tea=薄荷茶
|
|
||||||
Onion=洋葱
|
Onion=洋葱
|
||||||
Onion Soup=洋葱汤
|
Onion Soup=
|
||||||
Parsley=欧芹
|
Parsley=
|
||||||
Pea=豌豆
|
|
||||||
Pea Pod=豌豆荚
|
Pea Pod=豌豆荚
|
||||||
Pea Soup=豌豆汤
|
Pea Soup=豌豆汤
|
||||||
Pepper=胡椒
|
Peppercorn=胡椒粉
|
||||||
Peppercorn=胡椒粒
|
Green Pepper=
|
||||||
Green Pepper=青椒
|
Yellow Pepper=
|
||||||
Yellow Pepper=黄椒
|
Red Pepper=
|
||||||
Red Pepper=红椒
|
|
||||||
Ground Pepper=胡椒粉
|
Ground Pepper=胡椒粉
|
||||||
Pineapple Top=菠萝头
|
Pineapple Top=菠萝上衣
|
||||||
Pineapple=菠萝
|
Pineapple=菠萝
|
||||||
Pineapple Ring=菠萝圈
|
Pineapple Ring=菠萝圈
|
||||||
Pineapple Juice=菠萝汁
|
Pineapple Juice=菠萝汁
|
||||||
@ -132,51 +123,49 @@ Scarecrow Bottom=稻草人屁股
|
|||||||
Pumpkin Bread=南瓜面包
|
Pumpkin Bread=南瓜面包
|
||||||
Pumpkin Dough=南瓜面团
|
Pumpkin Dough=南瓜面团
|
||||||
Pumpkin=南瓜
|
Pumpkin=南瓜
|
||||||
Raspberry=覆盆子
|
|
||||||
Raspberries=覆盆子
|
Raspberries=覆盆子
|
||||||
Raspberry Smoothie=覆盆子冰沙
|
Raspberry Smoothie=覆盆子冰沙
|
||||||
Rhubarb=大黄
|
Rhubarb=大黄
|
||||||
Rhubarb Pie=大黄派
|
Rhubarb Pie=大黄派
|
||||||
Rice Seed=水稻种子
|
Rice Seed=
|
||||||
Rice=大米
|
Rice=大米
|
||||||
Rice Bread=米饭面包
|
Rice Bread=米饭面包
|
||||||
Rice Flour=米粉
|
Rice Flour=米粉
|
||||||
Rye seed=黑麦种子
|
Rye seed=黑麦种子
|
||||||
Rye=黑麦
|
Rye=黑麦
|
||||||
Oat seed=燕麦种子
|
Oat seed=燕麦籽
|
||||||
Oats=燕麦
|
Oats=
|
||||||
Multigrain Flour=多谷面粉
|
Multigrain Flour=多粒面粉
|
||||||
Multigrain Bread=杂粮面包
|
Multigrain Bread=杂粮面包
|
||||||
Savanna Soil=热带草原土
|
Savanna Soil=
|
||||||
Wet Savanna Soil=湿润热带草原土
|
Wet Savanna Soil=
|
||||||
Soil=土壤
|
Soil=土壤
|
||||||
Wet Soil=湿土
|
Wet Soil=湿土
|
||||||
Soy=大豆
|
Soy Pod=
|
||||||
Soy Pod=大豆
|
Soy Sauce=
|
||||||
Soy Sauce=酱油
|
Soy Milk=
|
||||||
Soy Milk=豆浆
|
Tofu=
|
||||||
Tofu=豆腐
|
Cooked Tofu=
|
||||||
Cooked Tofu=熟豆腐
|
Spinach=
|
||||||
Spinach=菠菜
|
|
||||||
Strawberry=草莓
|
Strawberry=草莓
|
||||||
Sunflower=向日葵
|
Sunflower=
|
||||||
Sunflower Seeds=葵花籽
|
Sunflower Seeds=
|
||||||
Toasted Sunflower Seeds=炒瓜子
|
Toasted Sunflower Seeds=
|
||||||
Bottle of Sunflower Oil=一瓶葵花籽油
|
Bottle of Sunflower Oil=
|
||||||
Sunflower Seed Bread=瓜子面包
|
Sunflower Seed Bread=
|
||||||
Tomato=番茄
|
Tomato=番茄
|
||||||
Tomato Soup=番茄汤
|
Tomato Soup=
|
||||||
Wooden Bowl=木碗
|
Wooden Bowl=木碗
|
||||||
Saucepan=煮锅
|
Saucepan=平底锅
|
||||||
Cooking Pot=锅
|
Cooking Pot=锅
|
||||||
Baking Tray=烤盘
|
Baking Tray=烤盘
|
||||||
Skillet=煎锅
|
Skillet=平底锅
|
||||||
Mortar and Pestle=研钵
|
Mortar and Pestle=研钵
|
||||||
Cutting Board=砧板
|
Cutting Board=砧板
|
||||||
Juicer=榨汁机
|
Juicer=榨汁机
|
||||||
Glass Mixing Bowl=搅拌杯
|
Glass Mixing Bowl=搅拌杯
|
||||||
Vanilla=香草
|
Vanilla=
|
||||||
Vanilla Extract=香草精
|
Vanilla Extract=
|
||||||
Wheat Seed=小麦种子
|
Wheat Seed=小麦种子
|
||||||
Wheat=小麦
|
Wheat=小麦
|
||||||
Straw=稻草
|
Straw=稻草
|
||||||
@ -185,9 +174,3 @@ Bread=面包
|
|||||||
Sliced Bread=切片面包
|
Sliced Bread=切片面包
|
||||||
Toast=烤面包片
|
Toast=烤面包片
|
||||||
Toast Sandwich=三明治面包
|
Toast Sandwich=三明治面包
|
||||||
Salt crystal=盐晶
|
|
||||||
Vegan Butter=植物黄油
|
|
||||||
# Jerusalem Artichoke(洋姜) is an ingredient, but in the game it refers to a dish.
|
|
||||||
Jerusalem Artichokes=
|
|
||||||
Weed=杂草
|
|
||||||
Weed Bale=杂草捆
|
|
||||||
|
@ -105,6 +105,5 @@ lucky_block:add_blocks({
|
|||||||
{name = "farming:grapebush", max = 5},
|
{name = "farming:grapebush", max = 5},
|
||||||
{name = "farming:asparagus", max = 7}
|
{name = "farming:asparagus", max = 7}
|
||||||
}},
|
}},
|
||||||
{"dro", {"farming:chili_powder"}, 5},
|
{"dro", {"farming:chili_powder"}, 5}
|
||||||
{"dro", {"farming:weed"}, 9},
|
|
||||||
})
|
})
|
||||||
|
@ -2,5 +2,3 @@
|
|||||||
farming_stage_length (Farming Stage Length) float 160.0
|
farming_stage_length (Farming Stage Length) float 160.0
|
||||||
|
|
||||||
farming_use_utensils (Use utensil recipes) bool true
|
farming_use_utensils (Use utensil recipes) bool true
|
||||||
|
|
||||||
farming_disable_weeds (Disable Weed growth) bool false
|
|
||||||
|
91
soil.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = core.get_translator("farming")
|
local S = minetest.get_translator("farming")
|
||||||
|
|
||||||
-- default dry soil node
|
-- default dry soil node
|
||||||
|
|
||||||
@ -7,21 +7,21 @@ local dry_soil = "farming:soil"
|
|||||||
|
|
||||||
-- add soil types to existing dirt blocks
|
-- add soil types to existing dirt blocks
|
||||||
|
|
||||||
core.override_item("default:dirt", {
|
minetest.override_item("default:dirt", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt", dry = "farming:soil", wet = "farming:soil_wet"
|
base = "default:dirt", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
core.override_item("default:dirt_with_grass", {
|
minetest.override_item("default:dirt_with_grass", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_grass", dry = "farming:soil", wet = "farming:soil_wet"
|
base = "default:dirt_with_grass", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if core.registered_nodes["default:dirt_with_dry_grass"] then
|
if minetest.registered_nodes["default:dirt_with_dry_grass"] then
|
||||||
|
|
||||||
core.override_item("default:dirt_with_dry_grass", {
|
minetest.override_item("default:dirt_with_dry_grass", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_dry_grass", dry = "farming:soil",
|
base = "default:dirt_with_dry_grass", dry = "farming:soil",
|
||||||
wet = "farming:soil_wet"
|
wet = "farming:soil_wet"
|
||||||
@ -29,16 +29,16 @@ if core.registered_nodes["default:dirt_with_dry_grass"] then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
core.override_item("default:dirt_with_rainforest_litter", {
|
minetest.override_item("default:dirt_with_rainforest_litter", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_rainforest_litter", dry = "farming:soil",
|
base = "default:dirt_with_rainforest_litter", dry = "farming:soil",
|
||||||
wet = "farming:soil_wet"
|
wet = "farming:soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if core.registered_nodes["default:dirt_with_coniferous_litter"] then
|
if minetest.registered_nodes["default:dirt_with_coniferous_litter"] then
|
||||||
|
|
||||||
core.override_item("default:dirt_with_coniferous_litter", {
|
minetest.override_item("default:dirt_with_coniferous_litter", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_coniferous_litter", dry = "farming:soil",
|
base = "default:dirt_with_coniferous_litter", dry = "farming:soil",
|
||||||
wet = "farming:soil_wet"
|
wet = "farming:soil_wet"
|
||||||
@ -48,23 +48,23 @@ end
|
|||||||
|
|
||||||
-- savanna soil
|
-- savanna soil
|
||||||
|
|
||||||
if core.registered_nodes["default:dry_dirt"] then
|
if minetest.registered_nodes["default:dry_dirt"] then
|
||||||
|
|
||||||
core.override_item("default:dry_dirt", {
|
minetest.override_item("default:dry_dirt", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt", dry = "farming:dry_soil",
|
base = "default:dry_dirt", dry = "farming:dry_soil",
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
core.override_item("default:dry_dirt_with_dry_grass", {
|
minetest.override_item("default:dry_dirt_with_dry_grass", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt_with_dry_grass", dry = "farming:dry_soil",
|
base = "default:dry_dirt_with_dry_grass", dry = "farming:dry_soil",
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_node("farming:dry_soil", {
|
minetest.register_node("farming:dry_soil", {
|
||||||
description = S("Savanna Soil"),
|
description = S("Savanna Soil"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"default_dry_dirt.png^farming_soil.png",
|
"default_dry_dirt.png^farming_soil.png",
|
||||||
@ -81,7 +81,7 @@ if core.registered_nodes["default:dry_dirt"] then
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_node("farming:dry_soil_wet", {
|
minetest.register_node("farming:dry_soil_wet", {
|
||||||
description = S("Wet Savanna Soil"),
|
description = S("Wet Savanna Soil"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"default_dry_dirt.png^farming_soil_wet.png",
|
"default_dry_dirt.png^farming_soil_wet.png",
|
||||||
@ -103,7 +103,7 @@ end
|
|||||||
|
|
||||||
-- normal soil
|
-- normal soil
|
||||||
|
|
||||||
core.register_node("farming:soil", {
|
minetest.register_node("farming:soil", {
|
||||||
description = S("Soil"),
|
description = S("Soil"),
|
||||||
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
|
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
|
||||||
drop = "default:dirt",
|
drop = "default:dirt",
|
||||||
@ -118,7 +118,7 @@ core.register_node("farming:soil", {
|
|||||||
|
|
||||||
-- wet soil
|
-- wet soil
|
||||||
|
|
||||||
core.register_node("farming:soil_wet", {
|
minetest.register_node("farming:soil_wet", {
|
||||||
description = S("Wet Soil"),
|
description = S("Wet Soil"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"default_dirt.png^farming_soil_wet.png",
|
"default_dirt.png^farming_soil_wet.png",
|
||||||
@ -136,12 +136,12 @@ core.register_node("farming:soil_wet", {
|
|||||||
|
|
||||||
-- sand is not soil, change existing sand-soil to use dry soil
|
-- sand is not soil, change existing sand-soil to use dry soil
|
||||||
|
|
||||||
core.register_alias("farming:desert_sand_soil", dry_soil)
|
minetest.register_alias("farming:desert_sand_soil", dry_soil)
|
||||||
core.register_alias("farming:desert_sand_soil_wet", dry_soil .. "_wet")
|
minetest.register_alias("farming:desert_sand_soil_wet", dry_soil .. "_wet")
|
||||||
|
|
||||||
-- if water near soil then change to wet soil
|
-- if water near soil then change to wet soil
|
||||||
|
|
||||||
core.register_abm({
|
minetest.register_abm({
|
||||||
label = "Soil changes",
|
label = "Soil changes",
|
||||||
nodenames = {"group:field"},
|
nodenames = {"group:field"},
|
||||||
interval = 15,
|
interval = 15,
|
||||||
@ -150,74 +150,47 @@ core.register_abm({
|
|||||||
|
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
|
||||||
local ndef = core.registered_nodes[node.name]
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
if not ndef or not ndef.soil or not ndef.soil.wet
|
if not ndef or not ndef.soil or not ndef.soil.wet
|
||||||
or not ndef.soil.base or not ndef.soil.dry then return end
|
or not ndef.soil.base or not ndef.soil.dry then return end
|
||||||
|
|
||||||
pos.y = pos.y + 1
|
pos.y = pos.y + 1
|
||||||
local nn = core.get_node_or_nil(pos)
|
local nn = minetest.get_node_or_nil(pos)
|
||||||
pos.y = pos.y - 1
|
pos.y = pos.y - 1
|
||||||
|
|
||||||
if nn then nn = nn.name else return end
|
if nn then nn = nn.name else return end
|
||||||
|
|
||||||
-- what's on top of soil, if solid/not plant change soil to dirt
|
-- what's on top of soil, if solid/not plant change soil to dirt
|
||||||
if core.registered_nodes[nn]
|
if minetest.registered_nodes[nn]
|
||||||
and core.registered_nodes[nn].walkable
|
and minetest.registered_nodes[nn].walkable
|
||||||
and core.get_item_group(nn, "plant") == 0
|
and minetest.get_item_group(nn, "plant") == 0
|
||||||
and core.get_item_group(nn, "growing") == 0 then
|
and minetest.get_item_group(nn, "growing") == 0 then
|
||||||
|
|
||||||
core.set_node(pos, {name = ndef.soil.base})
|
minetest.set_node(pos, {name = ndef.soil.base})
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check if water is within 3 nodes
|
-- check if water is within 3 nodes
|
||||||
if core.find_node_near(pos, 3, {"group:water"}) then
|
if minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||||
|
|
||||||
-- only change if it's not already wet soil
|
-- only change if it's not already wet soil
|
||||||
if node.name ~= ndef.soil.wet then
|
if node.name ~= ndef.soil.wet then
|
||||||
core.set_node(pos, {name = ndef.soil.wet})
|
minetest.set_node(pos, {name = ndef.soil.wet})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- only dry out soil if no unloaded blocks nearby, just incase
|
-- only dry out soil if no unloaded blocks nearby, just incase
|
||||||
elseif not core.find_node_near(pos, 3, {"ignore"}) then
|
elseif not minetest.find_node_near(pos, 3, {"ignore"}) then
|
||||||
|
|
||||||
if node.name == ndef.soil.wet then
|
if node.name == ndef.soil.wet then
|
||||||
core.set_node(pos, {name = ndef.soil.dry})
|
minetest.set_node(pos, {name = ndef.soil.dry})
|
||||||
|
|
||||||
-- if crop or seed found don't turn to dry soil
|
-- if crop or seed found don't turn to dry soil
|
||||||
elseif node.name == ndef.soil.dry
|
elseif node.name == ndef.soil.dry
|
||||||
and core.get_item_group(nn, "plant") == 0
|
and minetest.get_item_group(nn, "plant") == 0
|
||||||
and core.get_item_group(nn, "growing") == 0 then
|
and minetest.get_item_group(nn, "growing") == 0 then
|
||||||
core.set_node(pos, {name = ndef.soil.base})
|
minetest.set_node(pos, {name = ndef.soil.base})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- those darn weeds
|
|
||||||
|
|
||||||
if core.settings:get_bool("farming_disable_weeds") ~= true then
|
|
||||||
|
|
||||||
core.register_abm({
|
|
||||||
nodenames = {"group:field"},
|
|
||||||
neighbors = {"air"},
|
|
||||||
interval = 50,
|
|
||||||
chance = 35,
|
|
||||||
catch_up = false,
|
|
||||||
|
|
||||||
action = function(pos, node)
|
|
||||||
|
|
||||||
if core.find_node_near(pos, 8, {"farming:scarecrow_bottom"}) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
pos.y = pos.y + 1
|
|
||||||
|
|
||||||
if core.get_node(pos).name == "air" then
|
|
||||||
core.set_node(pos, {name = "farming:weed", param2 = 2})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 758 B |