Compare commits
91 Commits
501e9e302e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
088143a361 | ||
|
|
3082fa7825 | ||
|
|
643a22e21f | ||
|
|
2d57206023 | ||
|
|
0f7bccbf21 | ||
|
|
43179b37e2 | ||
|
|
47f001e765 | ||
|
|
edaf7d0a15 | ||
|
|
efce4f9bfa | ||
|
|
a7aeb0cf25 | ||
|
|
fb40fae5bf | ||
|
|
b3307e477b | ||
|
|
54ae31845d | ||
|
|
2b17abdcb8 | ||
|
|
2b5df9bad0 | ||
|
|
1e72348a48 | ||
|
|
44e2b1582b | ||
|
|
701bbb89b5 | ||
|
|
3b9f7ab82e | ||
|
|
e558d18f6f | ||
|
|
b8c3d40e88 | ||
|
|
1416f6e615 | ||
|
|
ba4026c406 | ||
|
|
45c346e763 | ||
|
|
2752ad259c | ||
|
|
08cdf0ef52 | ||
|
|
e247a3ea13 | ||
|
|
ae10efceff | ||
|
|
712005d2ac | ||
|
|
ba678f7bb6 | ||
|
|
b840b812b3 | ||
|
|
e302b83c43 | ||
|
|
56fb88f484 | ||
|
|
6356dfcdb5 | ||
|
|
2b31a87a32 | ||
|
|
9d471bf6d8 | ||
|
|
a23866a487 | ||
|
|
d59efa22d7 | ||
|
|
6185f95bcc | ||
|
|
256eac1f0f | ||
|
|
c0104b32b4 | ||
|
|
e3bf5f92a7 | ||
|
|
663cf0b86c | ||
|
|
201da1cc34 | ||
|
|
a415cf5364 | ||
|
|
87d6973420 | ||
|
|
0040f21962 | ||
|
|
b7603c2439 | ||
|
|
45e13d263f | ||
|
|
a952846bde | ||
|
|
ddd7c56a2c | ||
|
|
2b65a7416b | ||
|
|
2f1a233441 | ||
|
|
8dc7d4188e | ||
|
|
4bf83d3bbf | ||
|
|
0addf044b6 | ||
|
|
4600e42021 | ||
|
|
6d3c0ec1ef | ||
|
|
ebe1db179d | ||
|
|
e2f12c8061 | ||
|
|
141be63a92 | ||
|
|
45dd32c102 | ||
|
|
e409fe9ecb | ||
|
|
5e610c936a | ||
|
|
95bd342cda | ||
|
|
09b06ea72a | ||
|
|
f3a7e9350f | ||
|
|
a9a1b720a3 | ||
|
|
cdac09a8f4 | ||
|
|
a74a29c849 | ||
|
|
710b7ac111 | ||
|
|
b61998217d | ||
|
|
75e3f9fb42 | ||
|
|
648bae7517 | ||
|
|
e2ec7d707e | ||
|
|
2f7031e717 | ||
|
|
97b2fdd2ad | ||
|
|
49c8ba1892 | ||
|
|
5c050f3516 | ||
|
|
877f944641 | ||
|
|
ac4c4f48d3 | ||
|
|
8bd129309c | ||
|
|
0349a7a6f1 | ||
|
|
433d485292 | ||
|
|
e33dd0e275 | ||
|
|
37ea21fdaf | ||
|
|
c59162149d | ||
|
|
9101901afe | ||
|
|
9a2456b887 | ||
|
|
d99f96b224 | ||
|
|
1043da0b52 |
@@ -10,7 +10,7 @@ and crops which can be planted directly onto tilled soil without seeds. Crops t
|
|||||||
require seeds like wheat and cotton are found when digging in long grasses, and will
|
require seeds like wheat and cotton are found when digging in long grasses, and will
|
||||||
require player to stay nearby until they germinate before growing normally.
|
require player to stay nearby until they germinate before growing normally.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Tech information
|
Tech information
|
||||||
----------------
|
----------------
|
||||||
@@ -21,7 +21,7 @@ Crops grow by adding your new plant to the {growing = 1} group and numbering the
|
|||||||
* "farming:wheat_1" through to "farming:wheat_8"
|
* "farming:wheat_1" through to "farming:wheat_8"
|
||||||
* "farming:cucumber_1" through to "farming:cucumber_4"
|
* "farming:cucumber_1" through to "farming:cucumber_4"
|
||||||
|
|
||||||
https://forum.minetest.net/viewtopic.php?id=9019
|
https://forum.luanti.org/viewtopic.php?t=9019
|
||||||
|
|
||||||
Farming Redo also works with Bonemeal mod for quick growing crops and saplings which can
|
Farming Redo also works with Bonemeal mod for quick growing crops and saplings which can
|
||||||
be found at https://notabug.org/TenPlus1/bonemeal
|
be found at https://notabug.org/TenPlus1/bonemeal
|
||||||
@@ -217,6 +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.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)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
BIN
alt_textures/ethereal_strawberry.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
alt_textures/ethereal_strawberry_1.png
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
alt_textures/ethereal_strawberry_2.png
Normal file
|
After Width: | Height: | Size: 137 B |
BIN
alt_textures/ethereal_strawberry_3.png
Normal file
|
After Width: | Height: | Size: 157 B |
BIN
alt_textures/ethereal_strawberry_4.png
Normal file
|
After Width: | Height: | Size: 209 B |
BIN
alt_textures/ethereal_strawberry_5.png
Normal file
|
After Width: | Height: | Size: 234 B |
BIN
alt_textures/ethereal_strawberry_6.png
Normal file
|
After Width: | Height: | Size: 240 B |
BIN
alt_textures/ethereal_strawberry_7.png
Normal file
|
After Width: | Height: | Size: 258 B |
BIN
alt_textures/ethereal_strawberry_8.png
Normal file
|
After Width: | Height: | Size: 258 B |
BIN
alt_textures/farming_burger_32px.png
Normal file
|
After Width: | Height: | Size: 422 B |
BIN
alt_textures/farming_mayo_32px.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
alt_textures/farming_paella_32px.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
alt_textures/farming_popcorn_32px.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
alt_textures/farming_potato_omelet_32px.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
alt_textures/farming_potato_salad_32px.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
alt_textures/farming_spaghetti_24px.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
alt_textures/farming_spanish_potatoes_32px.png
Normal file
|
After Width: | Height: | Size: 557 B |
BIN
alt_textures/farming_sunflower_32px.png
Normal file
|
After Width: | Height: | Size: 703 B |
BIN
alt_textures/farming_sunflower_bread_32px.png
Normal file
|
After Width: | Height: | Size: 440 B |
BIN
alt_textures/farming_vanilla_flan_32px.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
25
api.txt
@@ -20,7 +20,6 @@ The farming API allows you to easily register plants and hoes.
|
|||||||
|
|
||||||
### Hoe Definition
|
### Hoe Definition
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
description = "My Hoe", -- Description for tooltip
|
description = "My Hoe", -- Description for tooltip
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
||||||
@@ -42,6 +41,7 @@ The farming API allows you to easily register plants and hoes.
|
|||||||
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
||||||
minlight = 13, -- Minimum light to grow
|
minlight = 13, -- Minimum light to grow
|
||||||
maxlight = minetest.LIGHT_MAX -- Maximum light to grow
|
maxlight = minetest.LIGHT_MAX -- Maximum light to grow
|
||||||
|
can_grow = function(pos) -- Called every growth tick to check if plant can grow returning True if needs are met (optional, defaults to checking for wet soil below plant).
|
||||||
}
|
}
|
||||||
|
|
||||||
Note: Any crops registered with the above function will use the new growing routines, also if crops are manually added with the {growing=1} group they will also grow.
|
Note: Any crops registered with the above function will use the new growing routines, also if crops are manually added with the {growing=1} group they will also grow.
|
||||||
@@ -50,7 +50,7 @@ Note: Any crops registered with the above function will use the new growing rout
|
|||||||
|
|
||||||
If a mod registers nodes to be used as crops using the {growing=1} group then an additional function can be used for custom growth checks instead of the standard 'are we above wet soil'.
|
If a mod registers nodes to be used as crops using the {growing=1} group then an additional function can be used for custom growth checks instead of the standard 'are we above wet soil'.
|
||||||
|
|
||||||
growth_check = function(pos, node_name)
|
growth_check = function(pos, [node_name]) [DEPRECATED for above can_grow function]
|
||||||
-- check surrounding for jungle tree
|
-- check surrounding for jungle tree
|
||||||
if minetest.find_node_near(pos, 1, {"default:jungletree"}) then
|
if minetest.find_node_near(pos, 1, {"default:jungletree"}) then
|
||||||
return true -- place next growth stage
|
return true -- place next growth stage
|
||||||
@@ -70,3 +70,24 @@ A handy function that starts a crops timer with a randomly selected time set by
|
|||||||
stage_length setting. This is mostly used for special functions or 3rd party mods.
|
stage_length setting. This is mostly used for special functions or 3rd party mods.
|
||||||
|
|
||||||
farming.start_seed_timer(pos)
|
farming.start_seed_timer(pos)
|
||||||
|
|
||||||
|
|
||||||
|
Node Sounds
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Farming Redo will detect wether the Default mod or MineClone/VoxeLibre mod is active and
|
||||||
|
store whichever sound set is available inside the following to save any other farming
|
||||||
|
mods from having to detect it themselves:
|
||||||
|
|
||||||
|
farming.node_sound_defaults()
|
||||||
|
farming.node_sound_stone_defaults()
|
||||||
|
farming.node_sound_dirt_defaults()
|
||||||
|
farming.node_sound_sand_defaults()
|
||||||
|
farming.node_sound_gravel_defaults()
|
||||||
|
farming.node_sound_wood_defaults()
|
||||||
|
farming.node_sound_leaves_defaults()
|
||||||
|
farming.node_sound_ice_defaults()
|
||||||
|
farming.node_sound_metal_defaults()
|
||||||
|
farming.node_sound_water_defaults()
|
||||||
|
farming.node_sound_snow_defaults()
|
||||||
|
farming.node_sound_glass_defaults()
|
||||||
|
|||||||
@@ -1,22 +1,30 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
--= Helpers
|
--= Helpers
|
||||||
|
|
||||||
local eth = minetest.get_modpath("ethereal")
|
local eth = core.get_modpath("ethereal")
|
||||||
local alias = function(orig, new)
|
local alias = function(orig, new)
|
||||||
minetest.register_alias(orig, new)
|
core.register_alias(orig, new)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--= Add {eatable} group to default food items if found
|
||||||
|
|
||||||
|
farming.add_eatable("default:apple", 2)
|
||||||
|
farming.add_eatable("default:blueberries", 1)
|
||||||
|
farming.add_eatable("flowers:mushroom_brown", 1)
|
||||||
|
farming.add_eatable("flowers:mushroom_red", -5)
|
||||||
|
|
||||||
--= Aliases
|
--= Aliases
|
||||||
|
|
||||||
-- Banana
|
-- Banana
|
||||||
|
|
||||||
if eth then
|
if eth then
|
||||||
alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling")
|
alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling")
|
||||||
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
|
||||||
minetest.register_node(":ethereal:banana", {
|
core.register_node(":ethereal:banana", {
|
||||||
description = S("Banana"),
|
description = S("Banana"),
|
||||||
drawtype = "torchlike",
|
drawtype = "torchlike",
|
||||||
tiles = {"farming_banana_single.png"},
|
tiles = {"farming_banana_single.png"},
|
||||||
@@ -26,23 +34,26 @@ else
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
||||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
|
||||||
},
|
},
|
||||||
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3},
|
||||||
on_use = minetest.item_eat(2),
|
is_ground_content = false,
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
on_use = core.item_eat(2),
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":ethereal:bananaleaves", {
|
farming.add_eatable("ethereal:banana", 2)
|
||||||
|
|
||||||
|
core.register_node(":ethereal:bananaleaves", {
|
||||||
description = S("Banana Leaves"),
|
description = S("Banana Leaves"),
|
||||||
tiles = {"farming_banana_leaf.png"},
|
tiles = {"ethereal_banana_leaf.png"},
|
||||||
inventory_image = "farming_banana_leaf.png",
|
inventory_image = "ethereal_banana_leaf.png",
|
||||||
wield_image = "farming_banana_leaf.png",
|
wield_image = "ethereal_banana_leaf.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
waving = 1,
|
waving = 1,
|
||||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
alias("farming_plus:banana_sapling", "default:sapling")
|
alias("farming_plus:banana_sapling", "default:sapling")
|
||||||
@@ -51,6 +62,7 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Carrot
|
-- Carrot
|
||||||
|
|
||||||
alias("farming_plus:carrot_seed", "farming:carrot")
|
alias("farming_plus:carrot_seed", "farming:carrot")
|
||||||
alias("farming_plus:carrot_1", "farming:carrot_1")
|
alias("farming_plus:carrot_1", "farming:carrot_1")
|
||||||
alias("farming_plus:carrot_2", "farming:carrot_4")
|
alias("farming_plus:carrot_2", "farming:carrot_4")
|
||||||
@@ -59,12 +71,14 @@ alias("farming_plus:carrot", "farming:carrot_8")
|
|||||||
alias("farming_plus:carrot_item", "farming:carrot")
|
alias("farming_plus:carrot_item", "farming:carrot")
|
||||||
|
|
||||||
-- Cocoa
|
-- Cocoa
|
||||||
|
|
||||||
alias("farming_plus:cocoa_sapling", "farming:cocoa_beans")
|
alias("farming_plus:cocoa_sapling", "farming:cocoa_beans")
|
||||||
alias("farming_plus:cocoa_leaves", "default:leaves")
|
alias("farming_plus:cocoa_leaves", "default:leaves")
|
||||||
alias("farming_plus:cocoa", "default:apple")
|
alias("farming_plus:cocoa", "default:apple")
|
||||||
alias("farming_plus:cocoa_bean", "farming:cocoa_beans")
|
alias("farming_plus:cocoa_bean", "farming:cocoa_beans")
|
||||||
|
|
||||||
-- Orange
|
-- Orange
|
||||||
|
|
||||||
alias("farming_plus:orange_1", "farming:tomato_1")
|
alias("farming_plus:orange_1", "farming:tomato_1")
|
||||||
alias("farming_plus:orange_2", "farming:tomato_4")
|
alias("farming_plus:orange_2", "farming:tomato_4")
|
||||||
alias("farming_plus:orange_3", "farming:tomato_6")
|
alias("farming_plus:orange_3", "farming:tomato_6")
|
||||||
@@ -74,7 +88,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
|
||||||
minetest.register_node(":ethereal:orange", {
|
core.register_node(":ethereal:orange", {
|
||||||
description = S("Orange"),
|
description = S("Orange"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_orange.png"},
|
tiles = {"farming_orange.png"},
|
||||||
@@ -84,20 +98,23 @@ else
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed", fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
||||||
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},
|
||||||
on_use = minetest.item_eat(4),
|
is_ground_content = false,
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
on_use = core.item_eat(4),
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("ethereal:orange", 4)
|
||||||
|
|
||||||
alias("farming_plus:orange_item", "ethereal:orange")
|
alias("farming_plus:orange_item", "ethereal:orange")
|
||||||
alias("farming_plus:orange", "ethereal:orange")
|
alias("farming_plus:orange", "ethereal:orange")
|
||||||
alias("farming_plus:orange_seed", "default:sapling")
|
alias("farming_plus:orange_seed", "default:sapling")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Potato
|
-- Potato
|
||||||
|
|
||||||
alias("farming_plus:potato_item", "farming:potato")
|
alias("farming_plus:potato_item", "farming:potato")
|
||||||
alias("farming_plus:potato_1", "farming:potato_1")
|
alias("farming_plus:potato_1", "farming:potato_1")
|
||||||
alias("farming_plus:potato_2", "farming:potato_2")
|
alias("farming_plus:potato_2", "farming:potato_2")
|
||||||
@@ -105,6 +122,7 @@ alias("farming_plus:potato", "farming:potato_3")
|
|||||||
alias("farming_plus:potato_seed", "farming:potato")
|
alias("farming_plus:potato_seed", "farming:potato")
|
||||||
|
|
||||||
-- Pumpkin
|
-- Pumpkin
|
||||||
|
|
||||||
alias("farming:pumpkin_seed", "farming:pumpkin_slice")
|
alias("farming:pumpkin_seed", "farming:pumpkin_slice")
|
||||||
alias("farming:pumpkin_face", "farming:jackolantern")
|
alias("farming:pumpkin_face", "farming:jackolantern")
|
||||||
alias("farming:pumpkin_face_light", "farming:jackolantern_on")
|
alias("farming:pumpkin_face_light", "farming:jackolantern_on")
|
||||||
@@ -117,6 +135,7 @@ alias("farming:scarecrow_light", "farming:jackolantern_on")
|
|||||||
alias("farming:pumpkin_flour", "farming:pumpkin_dough")
|
alias("farming:pumpkin_flour", "farming:pumpkin_dough")
|
||||||
|
|
||||||
-- Rhubarb
|
-- Rhubarb
|
||||||
|
|
||||||
alias("farming_plus:rhubarb_seed", "farming:rhubarb")
|
alias("farming_plus:rhubarb_seed", "farming:rhubarb")
|
||||||
alias("farming_plus:rhubarb_1", "farming:rhubarb_1")
|
alias("farming_plus:rhubarb_1", "farming:rhubarb_1")
|
||||||
alias("farming_plus:rhubarb_2", "farming:rhubarb_2")
|
alias("farming_plus:rhubarb_2", "farming:rhubarb_2")
|
||||||
@@ -124,6 +143,7 @@ alias("farming_plus:rhubarb", "farming:rhubarb_3")
|
|||||||
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
||||||
|
|
||||||
-- Strawberry
|
-- Strawberry
|
||||||
|
|
||||||
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
||||||
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
||||||
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
||||||
@@ -132,12 +152,10 @@ alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
|
|||||||
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
||||||
|
|
||||||
-- Tomato
|
-- Tomato
|
||||||
|
|
||||||
alias("farming_plus:tomato_seed", "farming:tomato")
|
alias("farming_plus:tomato_seed", "farming:tomato")
|
||||||
alias("farming_plus:tomato_item", "farming:tomato")
|
alias("farming_plus:tomato_item", "farming:tomato")
|
||||||
alias("farming_plus:tomato_1", "farming:tomato_2")
|
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")
|
||||||
|
|
||||||
-- Weed
|
|
||||||
alias("farming:weed", "default:grass_2")
|
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- item definition
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:artichoke", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_artichoke = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(4)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:artichoke", 4)
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Artichoke") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_artichoke_1.png"},
|
tiles = {"farming_artichoke_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -27,25 +33,37 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:artichoke_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:artichoke_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_2.png"}
|
def.tiles = {"farming_artichoke_2.png"}
|
||||||
minetest.register_node("farming:artichoke_2", table.copy(def))
|
core.register_node("farming:artichoke_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_3.png"}
|
def.tiles = {"farming_artichoke_3.png"}
|
||||||
minetest.register_node("farming:artichoke_3", table.copy(def))
|
core.register_node("farming:artichoke_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_4.png"}
|
def.tiles = {"farming_artichoke_4.png"}
|
||||||
minetest.register_node("farming:artichoke_4", table.copy(def))
|
def.drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"farming:artichoke"}, rarity = 1}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
core.register_node("farming:artichoke_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_5.png"}
|
def.tiles = {"farming_artichoke_5.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -55,9 +73,10 @@ def.drop = {
|
|||||||
{items = {"farming:artichoke"}, rarity = 2}
|
{items = {"farming:artichoke"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:artichoke_5", table.copy(def))
|
core.register_node("farming:artichoke_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:artichoke"] = {
|
farming.registered_plants["farming:artichoke"] = {
|
||||||
crop = "farming:artichoke",
|
crop = "farming:artichoke",
|
||||||
seed = "farming:artichoke",
|
seed = "farming:artichoke",
|
||||||
@@ -67,9 +86,12 @@ farming.registered_plants["farming:artichoke"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:grove_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -79,9 +101,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 13,
|
||||||
y_max = 13,
|
decoration = "farming:artichoke_4",
|
||||||
decoration = {"farming:artichoke_5"},
|
spawn_by = "group:tree", num_spawn_by = 1
|
||||||
spawn_by = "group:tree",
|
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- asparagus
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:asparagus", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_asparagus = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- asparagus definition
|
farming.add_eatable("farming:asparagus", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Asparagus") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_asparagus_1.png"},
|
tiles = {"farming_asparagus_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -29,42 +35,50 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:asparagus_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:asparagus_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_2.png"}
|
def.tiles = {"farming_asparagus_2.png"}
|
||||||
minetest.register_node("farming:asparagus_2", table.copy(def))
|
core.register_node("farming:asparagus_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_3.png"}
|
def.tiles = {"farming_asparagus_3.png"}
|
||||||
minetest.register_node("farming:asparagus_3", table.copy(def))
|
core.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 = 2}
|
{items = {"farming:asparagus"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:asparagus_4", table.copy(def))
|
core.register_node("farming:asparagus_4", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 5 (final)
|
||||||
|
|
||||||
-- stage 5
|
|
||||||
def.tiles = {"farming_asparagus_5.png"}
|
def.tiles = {"farming_asparagus_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 = {
|
items = {
|
||||||
{items = {"farming:asparagus"}, rarity = 1},
|
{items = {"farming:asparagus 2"}, rarity = 1},
|
||||||
{items = {"farming:asparagus 2"}, rarity = 2}
|
{items = {"farming:asparagus"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:asparagus_5", table.copy(def))
|
core.register_node("farming:asparagus_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:asparagus"] = {
|
farming.registered_plants["farming:asparagus"] = {
|
||||||
crop = "farming:asparagus",
|
crop = "farming:asparagus",
|
||||||
seed = "farming:asparagus",
|
seed = "farming:asparagus",
|
||||||
@@ -74,21 +88,21 @@ farming.registered_plants["farming:asparagus"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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.1,
|
offset = 0,
|
||||||
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_min = 8, y_max = 32,
|
||||||
y_max = 32,
|
decoration = "farming:asparagus_4",
|
||||||
decoration = "farming:asparagus_5",
|
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- barley seeds
|
-- seed
|
||||||
minetest.register_node("farming:seed_barley", {
|
|
||||||
|
core.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",
|
||||||
@@ -13,39 +13,36 @@ minetest.register_node("farming:seed_barley", {
|
|||||||
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||||
growing = 1
|
growing = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
next_plant = "farming:barley_1",
|
next_plant = "farming:barley_1",
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_barley")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_barley")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:barley_1", param2 = 3})
|
core.set_node(pos, {name = "farming:barley_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- harvested barley
|
-- item
|
||||||
minetest.register_craftitem("farming:barley", {
|
|
||||||
|
core.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}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- flour
|
-- crop definition
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:flour",
|
|
||||||
recipe = {
|
|
||||||
{"farming:barley", "farming:barley", "farming:barley"},
|
|
||||||
{"farming:barley", a.mortar_pestle, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- barley definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Barley") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_barley_1.png"},
|
tiles = {"farming_barley_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -61,29 +58,37 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:barley_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:barley_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_barley_2.png"}
|
def.tiles = {"farming_barley_2.png"}
|
||||||
minetest.register_node("farming:barley_2", table.copy(def))
|
core.register_node("farming:barley_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_barley_3.png"}
|
def.tiles = {"farming_barley_3.png"}
|
||||||
minetest.register_node("farming:barley_3", table.copy(def))
|
core.register_node("farming:barley_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_barley_4.png"}
|
def.tiles = {"farming_barley_4.png"}
|
||||||
minetest.register_node("farming:barley_4", table.copy(def))
|
core.register_node("farming:barley_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_barley_5.png"}
|
def.tiles = {"farming_barley_5.png"}
|
||||||
minetest.register_node("farming:barley_5", table.copy(def))
|
core.register_node("farming:barley_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_barley_6.png"}
|
def.tiles = {"farming_barley_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -91,9 +96,10 @@ def.drop = {
|
|||||||
{items = {"farming:seed_barley"}, rarity = 2}
|
{items = {"farming:seed_barley"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:barley_6", table.copy(def))
|
core.register_node("farming:barley_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_barley_7.png"}
|
def.tiles = {"farming_barley_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -101,23 +107,25 @@ def.drop = {
|
|||||||
{items = {"farming:seed_barley"}, rarity = 1}
|
{items = {"farming:seed_barley"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:barley_7", table.copy(def))
|
core.register_node("farming:barley_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_barley_8.png"}
|
def.tiles = {"farming_barley_8.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 = {
|
items = {
|
||||||
{items = {"farming:barley"}, rarity = 1},
|
{items = {"farming:barley 2"}, rarity = 1},
|
||||||
{items = {"farming:barley"}, rarity = 3},
|
{items = {"farming:barley"}, rarity = 2},
|
||||||
{items = {"farming:seed_barley"}, rarity = 1},
|
{items = {"farming:seed_barley 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_barley"}, rarity = 3}
|
{items = {"farming:seed_barley"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:barley_8", table.copy(def))
|
core.register_node("farming:barley_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:barley"] = {
|
farming.registered_plants["farming:barley"] = {
|
||||||
crop = "farming:barley",
|
crop = "farming:barley",
|
||||||
seed = "farming:seed_barley",
|
seed = "farming:seed_barley",
|
||||||
@@ -125,10 +133,3 @@ farming.registered_plants["farming:barley"] = {
|
|||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 8
|
steps = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Fuel
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:barley",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|||||||
148
crops/beans.lua
@@ -1,32 +1,26 @@
|
|||||||
--[[
|
|
||||||
All textures by
|
|
||||||
(C) Auke Kok <sofar@foo-projects.org>
|
|
||||||
CC-BY-SA-3.0
|
|
||||||
]]
|
|
||||||
|
|
||||||
local S = farming.translate
|
-- All textures by (C) Auke Kok <sofar@foo-projects.org> CC-BY-SA-3.0
|
||||||
local a = farming.recipe_items
|
|
||||||
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
|
-- place beans helper
|
||||||
|
|
||||||
-- place beans
|
|
||||||
local function place_beans(itemstack, placer, pointed_thing, plantname)
|
local function place_beans(itemstack, placer, pointed_thing, plantname)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not core.registered_nodes[under.name] then return end
|
||||||
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 = minetest.registered_nodes[under.name]
|
local def = core.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
|
||||||
@@ -35,19 +29,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 minetest.is_protected(pt.under, name) then
|
if core.is_protected(pt.under, name) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if pointing at bean pole
|
-- check if pointing at bean pole
|
||||||
if under.name ~= "farming:beanpole" then
|
if under.name ~= "farming:beanpole" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
minetest.set_node(pt.under, {name = plantname})
|
core.set_node(pt.under, {name = plantname})
|
||||||
|
|
||||||
minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0})
|
core.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
|
||||||
|
|
||||||
@@ -56,37 +46,32 @@ 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
|
||||||
|
|
||||||
minetest.after(0.20,
|
core.after(0.20,
|
||||||
farming.refill_plant,
|
farming.refill_plant, placer, "farming:beans", placer:get_wield_index())
|
||||||
placer,
|
|
||||||
"farming:beans",
|
|
||||||
placer:get_wield_index()
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
-- beans
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:beans", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_beans = 1},
|
||||||
on_use = minetest.item_eat(1),
|
on_use = core.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")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- beans can be used for green dye
|
farming.add_eatable("farming:beans", 1)
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_green,
|
|
||||||
recipe = {{"farming:beans"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- beanpole
|
-- beanpole
|
||||||
minetest.register_node("farming:beanpole", {
|
|
||||||
|
core.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"},
|
||||||
@@ -99,40 +84,36 @@ minetest.register_node("farming:beanpole", {
|
|||||||
drop = "farming:beanpole",
|
drop = "farming:beanpole",
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
groups = {handy = 1, snappy = 3, flammable = 2, attached_node = 1},
|
groups = {handy = 1, snappy = 3, flammable = 2, attached_node = 1},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not core.registered_nodes[under.name] then return end
|
||||||
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 = minetest.registered_nodes[under.name]
|
local def = core.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 minetest.is_protected(pt.above, placer:get_player_name()) then
|
if core.is_protected(pt.above, placer:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodename = under.name
|
local nodename = under.name
|
||||||
|
|
||||||
if minetest.get_item_group(nodename, "soil") < 2 then
|
if core.get_item_group(nodename, "soil") < 2 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local top = {
|
local top = {
|
||||||
x = pointed_thing.above.x,
|
x = pointed_thing.above.x,
|
||||||
@@ -140,13 +121,11 @@ minetest.register_node("farming:beanpole", {
|
|||||||
z = pointed_thing.above.z
|
z = pointed_thing.above.z
|
||||||
}
|
}
|
||||||
|
|
||||||
nodename = minetest.get_node(top).name
|
nodename = core.get_node(top).name
|
||||||
|
|
||||||
if nodename ~= "air" then
|
if nodename ~= "air" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.set_node(pointed_thing.above, {name = "farming:beanpole"})
|
core.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()
|
||||||
@@ -156,23 +135,10 @@ minetest.register_node("farming:beanpole", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:beanpole",
|
|
||||||
recipe = {
|
|
||||||
{"", "", ""},
|
|
||||||
{"group:stick", "", "group:stick"},
|
|
||||||
{"group:stick", "", "group:stick"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:beanpole",
|
|
||||||
burntime = 10
|
|
||||||
})
|
|
||||||
|
|
||||||
-- green bean definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Green Beans") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_beanpole_1.png"},
|
tiles = {"farming_beanpole_1.png"},
|
||||||
visual_scale = 1.90,
|
visual_scale = 1.90,
|
||||||
@@ -190,25 +156,32 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1,
|
handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1,
|
||||||
attached_node = 1, growing = 1, plant = 1
|
attached_node = 1, growing = 1, plant = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:beanpole_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:beanpole_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_2.png"}
|
def.tiles = {"farming_beanpole_2.png"}
|
||||||
minetest.register_node("farming:beanpole_2", table.copy(def))
|
core.register_node("farming:beanpole_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_3.png"}
|
def.tiles = {"farming_beanpole_3.png"}
|
||||||
minetest.register_node("farming:beanpole_3", table.copy(def))
|
core.register_node("farming:beanpole_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_4.png"}
|
def.tiles = {"farming_beanpole_4.png"}
|
||||||
minetest.register_node("farming:beanpole_4", table.copy(def))
|
core.register_node("farming:beanpole_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_5.png"}
|
def.tiles = {"farming_beanpole_5.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -216,13 +189,14 @@ 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 2"}, rarity = 2},
|
{items = {"farming:beans"}, rarity = 2},
|
||||||
{items = {"farming:beans 2"}, rarity = 3}
|
{items = {"farming:beans"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:beanpole_5", table.copy(def))
|
core.register_node("farming:beanpole_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:beans"] = {
|
farming.registered_plants["farming:beans"] = {
|
||||||
trellis = "farming:beanpole",
|
trellis = "farming:beanpole",
|
||||||
crop = "farming:beanpole",
|
crop = "farming:beanpole",
|
||||||
@@ -233,7 +207,8 @@ 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)
|
||||||
minetest.register_node("farming:beanbush", {
|
|
||||||
|
core.register_node("farming:beanbush", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_beanbush.png"},
|
tiles = {"farming_beanbush.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -253,11 +228,13 @@ minetest.register_node("farming:beanbush", {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
compostability = 35, not_in_creative_inventory = 1
|
compostability = 35, not_in_creative_inventory = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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,
|
||||||
@@ -269,7 +246,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 18,
|
y_min = 18, y_max = 38,
|
||||||
y_max = 38,
|
|
||||||
decoration = "farming:beanbush"
|
decoration = "farming:beanbush"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,41 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- beetroot
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:beetroot", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_beetroot = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- beetroot soup
|
farming.add_eatable("farming:beetroot", 1)
|
||||||
minetest.register_craftitem("farming:beetroot_soup", {
|
|
||||||
description = S("Beetroot Soup"),
|
|
||||||
inventory_image = "farming_beetroot_soup.png",
|
|
||||||
groups = {flammable = 2},
|
|
||||||
on_use = minetest.item_eat(6, "farming:bowl")
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:beetroot_soup",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_beetroot", "group:food_beetroot", "group:food_beetroot"},
|
|
||||||
{"group:food_beetroot", "group:food_bowl", "group:food_beetroot"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- red dye
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_red,
|
|
||||||
recipe = {{"group:food_beetroot"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Beetroot") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_beetroot_1.png"},
|
tiles = {"farming_beetroot_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -49,39 +33,46 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:beetroot_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:beetroot_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_2.png"}
|
def.tiles = {"farming_beetroot_2.png"}
|
||||||
minetest.register_node("farming:beetroot_2", table.copy(def))
|
core.register_node("farming:beetroot_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_3.png"}
|
def.tiles = {"farming_beetroot_3.png"}
|
||||||
minetest.register_node("farming:beetroot_3", table.copy(def))
|
core.register_node("farming:beetroot_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
def.tiles = {"farming_beetroot_4.png"}
|
|
||||||
minetest.register_node("farming:beetroot_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5
|
def.tiles = {"farming_beetroot_4.png"}
|
||||||
|
core.register_node("farming:beetroot_4", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 5 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_5.png"}
|
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 = {
|
||||||
max_items = 4, items = {
|
items = {
|
||||||
{items = {"farming:beetroot"}, rarity = 1},
|
{items = {"farming:beetroot 2"}, 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}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:beetroot_5", table.copy(def))
|
core.register_node("farming:beetroot_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:beetroot"] = {
|
farming.registered_plants["farming:beetroot"] = {
|
||||||
crop = "farming:beetroot",
|
crop = "farming:beetroot",
|
||||||
seed = "farming:beetroot",
|
seed = "farming:beetroot",
|
||||||
@@ -91,9 +82,16 @@ farming.registered_plants["farming:beetroot"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}
|
||||||
|
|
||||||
|
if farming.eth then
|
||||||
|
spawn_on = {"ethereal:prairie_dirt"}
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = spawn_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -103,7 +101,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 20,
|
||||||
y_max = 20,
|
|
||||||
decoration = "farming:beetroot_5"
|
decoration = "farming:beetroot_5"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,21 +1,28 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- blackberries
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:blackberry", {
|
|
||||||
|
core.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, flammable = 2
|
food_berry = 1
|
||||||
},
|
},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:blackberry", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Blackberry") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_blackberry_1.png"},
|
tiles = {"farming_blackberry_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -28,34 +35,41 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:blackberry_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:blackberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_2.png"}
|
def.tiles = {"farming_blackberry_2.png"}
|
||||||
minetest.register_node("farming:blackberry_2", table.copy(def))
|
core.register_node("farming:blackberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
def.tiles = {"farming_blackberry_3.png"}
|
|
||||||
minetest.register_node("farming:blackberry_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
def.tiles = {"farming_blackberry_3.png"}
|
||||||
|
core.register_node("farming:blackberry_3", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_4.png"}
|
def.tiles = {"farming_blackberry_4.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 = {
|
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},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:blackberry_4", table.copy(def))
|
core.register_node("farming:blackberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:blackberry"] = {
|
farming.registered_plants["farming:blackberry"] = {
|
||||||
crop = "farming:blackberry",
|
crop = "farming:blackberry",
|
||||||
seed = "farming:blackberry",
|
seed = "farming:blackberry",
|
||||||
@@ -65,9 +79,12 @@ farming.registered_plants["farming:blackberry"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -77,7 +94,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 20,
|
||||||
y_max = 20,
|
|
||||||
decoration = "farming:blackberry_4"
|
decoration = "farming:blackberry_4"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,61 +1,27 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- blueberries
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:blueberries", {
|
|
||||||
|
core.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, flammable = 2
|
food_berry = 1
|
||||||
},
|
},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image)
|
farming.add_eatable("farming:blueberries", 1)
|
||||||
minetest.register_craftitem("farming:muffin_blueberry", {
|
|
||||||
description = S("Blueberry Muffin"),
|
|
||||||
inventory_image = "farming_blueberry_muffin.png",
|
|
||||||
on_use = minetest.item_eat(2),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- ctop definition
|
||||||
output = "farming:muffin_blueberry 2",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_blueberries", "group:food_bread", "group:food_blueberries"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Blueberry Pie
|
|
||||||
minetest.register_craftitem("farming:blueberry_pie", {
|
|
||||||
description = S("Blueberry Pie"),
|
|
||||||
inventory_image = "farming_blueberry_pie.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 75}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:blueberry_pie",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_flour", "group:food_sugar", "group:food_blueberries"},
|
|
||||||
{"", a.baking_tray, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Blue Dye
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_blue,
|
|
||||||
recipe = {{"farming:blueberries"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- blueberry definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Blueberry") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_blueberry_1.png"},
|
tiles = {"farming_blueberry_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -68,21 +34,27 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:blueberry_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:blueberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_blueberry_2.png"}
|
def.tiles = {"farming_blueberry_2.png"}
|
||||||
minetest.register_node("farming:blueberry_2", table.copy(def))
|
core.register_node("farming:blueberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_blueberry_3.png"}
|
def.tiles = {"farming_blueberry_3.png"}
|
||||||
minetest.register_node("farming:blueberry_3", table.copy(def))
|
core.register_node("farming:blueberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_blueberry_4.png"}
|
def.tiles = {"farming_blueberry_4.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -93,9 +65,10 @@ def.drop = {
|
|||||||
{items = {"farming:blueberries"}, rarity = 3}
|
{items = {"farming:blueberries"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:blueberry_4", table.copy(def))
|
core.register_node("farming:blueberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:blueberries"] = {
|
farming.registered_plants["farming:blueberries"] = {
|
||||||
crop = "farming:blueberry",
|
crop = "farming:blueberry",
|
||||||
seed = "farming:blueberries",
|
seed = "farming:blueberries",
|
||||||
@@ -105,9 +78,12 @@ farming.registered_plants["farming:blueberries"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -117,7 +93,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 15,
|
||||||
y_max = 15,
|
|
||||||
decoration = "farming:blueberry_4"
|
decoration = "farming:blueberry_4"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- cabbage
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:cabbage", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_cabbage = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:cabbage", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Cabbage") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_cabbage_1.png"},
|
tiles = {"farming_cabbage_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -26,41 +33,50 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:cabbage_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:cabbage_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_2.png"}
|
def.tiles = {"farming_cabbage_2.png"}
|
||||||
minetest.register_node("farming:cabbage_2", table.copy(def))
|
core.register_node("farming:cabbage_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_3.png"}
|
def.tiles = {"farming_cabbage_3.png"}
|
||||||
minetest.register_node("farming:cabbage_3", table.copy(def))
|
core.register_node("farming:cabbage_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_4.png"}
|
def.tiles = {"farming_cabbage_4.png"}
|
||||||
minetest.register_node("farming:cabbage_4", table.copy(def))
|
core.register_node("farming:cabbage_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
def.tiles = {"farming_cabbage_5.png"}
|
|
||||||
minetest.register_node("farming:cabbage_5", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 6
|
def.tiles = {"farming_cabbage_5.png"}
|
||||||
|
core.register_node("farming:cabbage_5", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 6 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_cabbage_6.png"}
|
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 = {
|
||||||
max_items = 2, items = {
|
items = {
|
||||||
{items = {"farming:cabbage 2"}, rarity = 1},
|
{items = {"farming:cabbage 2"}, rarity = 1},
|
||||||
{items = {"farming:cabbage 1"}, rarity = 2}
|
{items = {"farming:cabbage"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cabbage_6", table.copy(def))
|
core.register_node("farming:cabbage_6", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:cabbage"] = {
|
farming.registered_plants["farming:cabbage"] = {
|
||||||
crop = "farming:cabbage",
|
crop = "farming:cabbage",
|
||||||
seed = "farming:cabbage",
|
seed = "farming:cabbage",
|
||||||
@@ -70,7 +86,8 @@ farming.registered_plants["farming:cabbage"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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,
|
||||||
@@ -82,7 +99,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 2,
|
y_min = 2, y_max = 15,
|
||||||
y_max = 15,
|
|
||||||
decoration = "farming:cabbage_6"
|
decoration = "farming:cabbage_6"
|
||||||
})
|
})
|
||||||
|
|||||||
110
crops/carrot.lua
@@ -1,57 +1,28 @@
|
|||||||
|
|
||||||
--[[
|
-- 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 = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- carrot
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:carrot", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_carrot = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(4)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- carrot juice
|
farming.add_eatable("farming:carrot", 4)
|
||||||
minetest.register_craftitem("farming:carrot_juice", {
|
|
||||||
description = S("Carrot Juice"),
|
|
||||||
inventory_image = "farming_carrot_juice.png",
|
|
||||||
on_use = minetest.item_eat(4, "vessels:drinking_glass"),
|
|
||||||
groups = {vessel = 1, drink = 1}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:carrot_juice",
|
|
||||||
recipe = {
|
|
||||||
{a.juicer},
|
|
||||||
{"group:food_carrot"},
|
|
||||||
{"vessels:drinking_glass"}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_juicer", "farming:juicer"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- golden carrot
|
|
||||||
minetest.register_craftitem("farming:carrot_gold", {
|
|
||||||
description = S("Golden Carrot"),
|
|
||||||
inventory_image = "farming_carrot_gold.png",
|
|
||||||
on_use = minetest.item_eat(10)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:carrot_gold",
|
|
||||||
recipe = {{"group:food_carrot", "default:gold_lump"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- carrot definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Carrot") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_carrot_1.png"},
|
tiles = {"farming_carrot_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -65,56 +36,67 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:carrot_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:carrot_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_2.png"}
|
def.tiles = {"farming_carrot_2.png"}
|
||||||
minetest.register_node("farming:carrot_2", table.copy(def))
|
core.register_node("farming:carrot_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_3.png"}
|
def.tiles = {"farming_carrot_3.png"}
|
||||||
minetest.register_node("farming:carrot_3", table.copy(def))
|
core.register_node("farming:carrot_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_4.png"}
|
def.tiles = {"farming_carrot_4.png"}
|
||||||
minetest.register_node("farming:carrot_4", table.copy(def))
|
core.register_node("farming:carrot_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_5.png"}
|
def.tiles = {"farming_carrot_5.png"}
|
||||||
minetest.register_node("farming:carrot_5", table.copy(def))
|
core.register_node("farming:carrot_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_6.png"}
|
def.tiles = {"farming_carrot_6.png"}
|
||||||
minetest.register_node("farming:carrot_6", table.copy(def))
|
core.register_node("farming:carrot_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_7.png"}
|
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 2"}, rarity = 3}
|
{items = {"farming:carrot"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:carrot_7", table.copy(def))
|
core.register_node("farming:carrot_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_carrot_8.png"}
|
def.tiles = {"farming_carrot_8.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 = {
|
items = {
|
||||||
{items = {"farming:carrot 2"}, rarity = 1},
|
{items = {"farming:carrot 2"}, rarity = 1},
|
||||||
{items = {"farming:carrot 3"}, rarity = 2}
|
{items = {"farming:carrot"}, rarity = 2},
|
||||||
|
{items = {"farming:carrot"}, rarity = 3},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:carrot_8", table.copy(def))
|
core.register_node("farming:carrot_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:carrot"] = {
|
farming.registered_plants["farming:carrot"] = {
|
||||||
crop = "farming:carrot",
|
crop = "farming:carrot",
|
||||||
seed = "farming:carrot",
|
seed = "farming:carrot",
|
||||||
@@ -124,17 +106,12 @@ farming.registered_plants["farming:carrot"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
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 = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {
|
||||||
|
"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,9 +121,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 30,
|
||||||
y_max = def.y_max,
|
decoration = "farming:carrot_7"
|
||||||
decoration = "farming:carrot_8",
|
|
||||||
spawn_by = def.near,
|
|
||||||
num_spawn_by = def.num
|
|
||||||
})
|
})
|
||||||
|
|||||||
104
crops/chili.lua
@@ -1,59 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- chili pepper
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:chili_pepper", {
|
|
||||||
|
core.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, flammable = 4},
|
groups = {compostability = 48, seed = 2, food_chili_pepper = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- bowl of chili
|
farming.add_eatable("farming:chili_pepper", 2)
|
||||||
minetest.register_craftitem("farming:chili_bowl", {
|
|
||||||
description = S("Bowl of Chili"),
|
|
||||||
inventory_image = "farming_chili_bowl.png",
|
|
||||||
on_use = minetest.item_eat(8, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:chili_bowl",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_chili_pepper", "group:food_rice", "group:food_tomato"},
|
|
||||||
{"group:food_beans", "group:food_bowl", ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- chili can be used for red dye
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_red,
|
|
||||||
recipe = {{"farming:chili_pepper"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- chili powder
|
|
||||||
minetest.register_craftitem("farming:chili_powder", {
|
|
||||||
description = S("Chili Powder"),
|
|
||||||
on_use = minetest.item_eat(-1),
|
|
||||||
inventory_image = "farming_chili_powder.png",
|
|
||||||
groups = {compostability = 45}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:chili_powder",
|
|
||||||
recipe = {
|
|
||||||
{"farming:chili_pepper", a.mortar_pestle}
|
|
||||||
},
|
|
||||||
replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- chili definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Chili Pepper") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_chili_1.png"},
|
tiles = {"farming_chili_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -67,49 +33,62 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:chili_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:chili_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_chili_2.png"}
|
def.tiles = {"farming_chili_2.png"}
|
||||||
minetest.register_node("farming:chili_2", table.copy(def))
|
core.register_node("farming:chili_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_chili_3.png"}
|
def.tiles = {"farming_chili_3.png"}
|
||||||
minetest.register_node("farming:chili_3", table.copy(def))
|
core.register_node("farming:chili_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_chili_4.png"}
|
def.tiles = {"farming_chili_4.png"}
|
||||||
minetest.register_node("farming:chili_4", table.copy(def))
|
core.register_node("farming:chili_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_chili_5.png"}
|
def.tiles = {"farming_chili_5.png"}
|
||||||
minetest.register_node("farming:chili_5", table.copy(def))
|
core.register_node("farming:chili_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_chili_6.png"}
|
def.tiles = {"farming_chili_6.png"}
|
||||||
minetest.register_node("farming:chili_6", table.copy(def))
|
core.register_node("farming:chili_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_chili_7.png"}
|
def.tiles = {"farming_chili_7.png"}
|
||||||
minetest.register_node("farming:chili_7", table.copy(def))
|
core.register_node("farming:chili_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_chili_8.png"}
|
def.tiles = {"farming_chili_8.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 = {
|
items = {
|
||||||
{items = {"farming:chili_pepper 3"}, rarity = 1},
|
{items = {"farming:chili_pepper 2"}, rarity = 1},
|
||||||
{items = {"farming:chili_pepper 2"}, rarity = 2}
|
{items = {"farming:chili_pepper"}, rarity = 2},
|
||||||
|
{items = {"farming:chili_pepper"}, rarity = 3},
|
||||||
|
{items = {"farming:chili_pepper"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:chili_8", table.copy(def))
|
core.register_node("farming:chili_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:chili_pepper"] = {
|
farming.registered_plants["farming:chili_pepper"] = {
|
||||||
crop = "farming:chili",
|
crop = "farming:chili",
|
||||||
seed = "farming:chili_pepper",
|
seed = "farming:chili_pepper",
|
||||||
@@ -119,11 +98,12 @@ farming.registered_plants["farming:chili_pepper"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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"
|
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@@ -134,9 +114,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 45,
|
||||||
y_max = 35,
|
decoration = "farming:chili_8",
|
||||||
decoration = {"farming:chili_8"},
|
spawn_by = "group:tree", num_spawn_by = 1
|
||||||
spawn_by = "group:tree",
|
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
164
crops/cocoa.lua
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- place cocoa
|
-- place cocoa
|
||||||
local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
||||||
@@ -8,27 +7,24 @@ local function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not core.registered_nodes[under.name] then return end
|
||||||
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 = minetest.registered_nodes[under.name]
|
local def = core.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
|
||||||
|
|
||||||
-- 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 minetest.get_node(pt.above).name ~= "air" then
|
or core.get_node(pt.above).name ~= "air" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -36,14 +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 minetest.is_protected(pt.above, name) then
|
if core.is_protected(pt.above, name) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
minetest.set_node(pt.above, {name = plantname})
|
core.set_node(pt.above, {name = plantname})
|
||||||
|
|
||||||
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
core.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
|
||||||
|
|
||||||
@@ -52,99 +46,30 @@ 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
|
||||||
|
|
||||||
minetest.after(0.20,
|
core.after(0.20, farming.refill_plant, placer,
|
||||||
farming.refill_plant,
|
"farming:cocoa_beans_raw", placer:get_wield_index())
|
||||||
placer,
|
|
||||||
"farming:cocoa_beans_raw",
|
|
||||||
placer:get_wield_index()
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
-- cocoa beans
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:cocoa_beans_raw", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
|
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("farming:cocoa_beans", {
|
-- crop definition
|
||||||
description = S("Cocoa Beans"),
|
|
||||||
inventory_image = "farming_cocoa_beans.png",
|
|
||||||
groups = {compostability = 65, food_cocoa = 1, flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 5,
|
|
||||||
output = "farming:cocoa_beans",
|
|
||||||
recipe = "farming:cocoa_beans_raw"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = a.dye_brown,
|
|
||||||
recipe = {{"farming:cocoa_beans"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- chocolate cookie
|
|
||||||
minetest.register_craftitem("farming:cookie", {
|
|
||||||
description = S("Cookie"),
|
|
||||||
inventory_image = "farming_cookie.png",
|
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:cookie 8",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_wheat", "group:food_cocoa", "group:food_wheat" }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial)
|
|
||||||
minetest.register_craftitem("farming:chocolate_dark", {
|
|
||||||
description = S("Bar of Dark Chocolate"),
|
|
||||||
inventory_image = "farming_chocolate_dark.png",
|
|
||||||
on_use = minetest.item_eat(3)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:chocolate_dark",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_cocoa", "group:food_cocoa", "group:food_cocoa"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- chocolate block
|
|
||||||
minetest.register_node("farming:chocolate_block", {
|
|
||||||
description = S("Chocolate Block"),
|
|
||||||
tiles = {"farming_chocolate_block.png"},
|
|
||||||
is_ground_content = false,
|
|
||||||
groups = {cracky = 2, oddly_breakable_by_hand = 2},
|
|
||||||
sounds = farming.sounds.node_sound_stone_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:chocolate_block",
|
|
||||||
recipe = {
|
|
||||||
{"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"},
|
|
||||||
{"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"},
|
|
||||||
{"farming:chocolate_dark", "farming:chocolate_dark", "farming:chocolate_dark"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:chocolate_dark 9",
|
|
||||||
recipe = {{"farming:chocolate_block"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cocoa definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Cocoa Beans") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_cocoa_1.png"},
|
tiles = {"farming_cocoa_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -158,10 +83,14 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, growing = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, growing = 1,
|
||||||
not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1
|
not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
|
-- custom function that returns True when conditions are met
|
||||||
growth_check = function(pos, node_name)
|
growth_check = function(pos, node_name)
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1,
|
if core.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
|
||||||
@@ -171,35 +100,40 @@ local def = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:cocoa_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:cocoa_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cocoa_2.png"}
|
def.tiles = {"farming_cocoa_2.png"}
|
||||||
minetest.register_node("farming:cocoa_2", table.copy(def))
|
core.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 1"}, rarity = 1}
|
{items = {"farming:cocoa_beans_raw"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cocoa_3", table.copy(def))
|
core.register_node("farming:cocoa_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_cocoa_4.png"}
|
def.tiles = {"farming_cocoa_4.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.growth_check = nil
|
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 1"}, rarity = 2},
|
{items = {"farming:cocoa_beans_raw"}, rarity = 2},
|
||||||
{items = {"farming:cocoa_beans_raw 1"}, rarity = 4}
|
{items = {"farming:cocoa_beans_raw"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cocoa_4", table.copy(def))
|
core.register_node("farming:cocoa_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:cocoa_beans"] = {
|
farming.registered_plants["farming:cocoa_beans"] = {
|
||||||
trellis = "default:jungletree",
|
trellis = "default:jungletree",
|
||||||
crop = "farming:cocoa",
|
crop = "farming:cocoa",
|
||||||
@@ -209,25 +143,23 @@ farming.registered_plants["farming:cocoa_beans"] = {
|
|||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- localize math.random for speed
|
|
||||||
local random = math.random
|
|
||||||
|
|
||||||
-- add random cocoa pods to jungle tree's
|
-- add random cocoa pods to jungle tree's
|
||||||
minetest.register_on_generated(function(minp, maxp)
|
|
||||||
|
|
||||||
if maxp.y < 0 then
|
local random = math.random -- localise for speed
|
||||||
return
|
|
||||||
end
|
core.register_on_generated(function(minp, maxp)
|
||||||
|
|
||||||
|
if maxp.y < 0 then return end
|
||||||
|
|
||||||
local pos, dir
|
local pos, dir
|
||||||
local cocoa = minetest.find_nodes_in_area(minp, maxp,
|
local cocoa = core.find_nodes_in_area(minp, maxp,
|
||||||
{"default:jungletree", "mcl_core:jungletree"})
|
{"default:jungletree", "mcl_core:jungletree"})
|
||||||
|
|
||||||
for n = 1, #cocoa do
|
for n = 1, #cocoa do
|
||||||
|
|
||||||
pos = cocoa[n]
|
pos = cocoa[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1,
|
if core.find_node_near(pos, 1,
|
||||||
{"default:jungleleaves", "moretrees:jungletree_leaves_green",
|
{"default:jungleleaves", "moretrees:jungletree_leaves_green",
|
||||||
"mcl_core:jungleleaves"}) then
|
"mcl_core:jungleleaves"}) then
|
||||||
|
|
||||||
@@ -236,16 +168,16 @@ minetest.register_on_generated(function(minp, maxp)
|
|||||||
if dir == 1 then pos.x = pos.x + 1
|
if dir == 1 then pos.x = pos.x + 1
|
||||||
elseif dir == 2 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 == 3 then pos.z = pos.z + 1
|
||||||
elseif dir == 4 then pos.z = pos.z -1
|
elseif dir == 4 then pos.z = pos.z - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if dir < 5
|
if dir < 5
|
||||||
and minetest.get_node(pos).name == "air"
|
and core.get_node(pos).name == "air"
|
||||||
and minetest.get_node_light(pos) > 12 then
|
and core.get_node_light(pos) > 12 then
|
||||||
|
|
||||||
--print ("Cocoa Pod added at " .. minetest.pos_to_string(pos))
|
--print ("Cocoa Pod added at " .. core.pos_to_string(pos))
|
||||||
|
|
||||||
minetest.swap_node(pos, {
|
core.set_node(pos, {
|
||||||
name = "farming:cocoa_" .. tostring(random(4))
|
name = "farming:cocoa_" .. tostring(random(4))
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,51 +1,22 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- coffee
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:coffee_beans", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- cup of coffee
|
-- crop definition
|
||||||
minetest.register_node("farming:coffee_cup", {
|
|
||||||
description = S("Cup of Coffee"),
|
|
||||||
drawtype = "torchlike",
|
|
||||||
tiles = {"farming_coffee_cup.png"},
|
|
||||||
inventory_image = "farming_coffee_cup.png",
|
|
||||||
wield_image = "farming_coffee_cup.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
|
|
||||||
},
|
|
||||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, drink = 1},
|
|
||||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_alias("farming:coffee_cup_hot", "farming:coffee_cup")
|
|
||||||
minetest.register_alias("farming:drinking_cup", "vessels:drinking_glass")
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:coffee_cup",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_coffee", "group:food_glass_water", a.saucepan}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_saucepan", "farming:saucepan"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- coffee definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Coffee") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_coffee_1.png"},
|
tiles = {"farming_coffee_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -59,38 +30,46 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:coffee_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:coffee_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_2.png"}
|
def.tiles = {"farming_coffee_2.png"}
|
||||||
minetest.register_node("farming:coffee_2", table.copy(def))
|
core.register_node("farming:coffee_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_3.png"}
|
def.tiles = {"farming_coffee_3.png"}
|
||||||
minetest.register_node("farming:coffee_3", table.copy(def))
|
core.register_node("farming:coffee_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_4.png"}
|
def.tiles = {"farming_coffee_4.png"}
|
||||||
minetest.register_node("farming:coffee_4", table.copy(def))
|
core.register_node("farming:coffee_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5 (final)
|
-- stage 5 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_coffee_5.png"}
|
def.tiles = {"farming_coffee_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 = {
|
items = {
|
||||||
{items = {"farming:coffee_beans 2"}, rarity = 1},
|
{items = {"farming:coffee_beans 2"}, rarity = 1},
|
||||||
{items = {"farming:coffee_beans 2"}, rarity = 2},
|
{items = {"farming:coffee_beans"}, rarity = 2},
|
||||||
{items = {"farming:coffee_beans 2"}, rarity = 3}
|
{items = {"farming:coffee_beans"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:coffee_5", table.copy(def))
|
core.register_node("farming:coffee_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:coffee"] = {
|
farming.registered_plants["farming:coffee"] = {
|
||||||
crop = "farming:coffee",
|
crop = "farming:coffee",
|
||||||
seed = "farming:coffee_beans",
|
seed = "farming:coffee_beans",
|
||||||
@@ -100,18 +79,20 @@ farming.registered_plants["farming:coffee"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
local spawn_on = {
|
||||||
y_max = mg and 50 or 55,
|
"default:dirt_with_dry_grass", "default:dirt_with_rainforest_litter",
|
||||||
spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
"default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass",
|
"ethereal:prairie_dirt"
|
||||||
"mcl_core:dirt_with_grass"}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_decoration({
|
if farming.mapgen == "v6" then
|
||||||
|
spawn_on = {"default:dirt_with_grass"}
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = def.spawn_on,
|
place_on = spawn_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -121,7 +102,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 20,
|
y_min = 20, y_max = 55,
|
||||||
y_max = def.y_max,
|
|
||||||
decoration = "farming:coffee_5"
|
decoration = "farming:coffee_5"
|
||||||
})
|
})
|
||||||
|
|||||||
148
crops/corn.lua
@@ -4,109 +4,27 @@
|
|||||||
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 = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- corn
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:corn", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 45, seed = 2, food_corn = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(3)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- corn on the cob (texture by TenPlus1)
|
farming.add_eatable("farming:corn", 3)
|
||||||
minetest.register_craftitem("farming:corn_cob", {
|
|
||||||
description = S("Corn on the Cob"),
|
|
||||||
inventory_image = "farming_corn_cob.png",
|
|
||||||
groups = {compostability = 65, food_corn_cooked = 1, flammable = 2},
|
|
||||||
on_use = minetest.item_eat(5)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
type = "cooking",
|
|
||||||
cooktime = 10,
|
|
||||||
output = "farming:corn_cob",
|
|
||||||
recipe = "group:food_corn"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- popcorn
|
|
||||||
minetest.register_craftitem("farming:popcorn", {
|
|
||||||
description = S("Popcorn"),
|
|
||||||
inventory_image = "farming_popcorn.png",
|
|
||||||
groups = {compostability = 55, food_popcorn = 1, flammable = 2},
|
|
||||||
on_use = minetest.item_eat(4)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:popcorn",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_oil", "group:food_corn", a.pot}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_pot", "farming:pot"},
|
|
||||||
{"group:food_oil", "vessels:glass_bottle"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cornstarch
|
|
||||||
minetest.register_craftitem("farming:cornstarch", {
|
|
||||||
description = S("Cornstarch"),
|
|
||||||
inventory_image = "farming_cornstarch.png",
|
|
||||||
groups = {food_cornstarch = 1, food_gelatin = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:cornstarch",
|
|
||||||
recipe = {
|
|
||||||
{a.mortar_pestle, "group:food_corn_cooked", a.baking_tray},
|
|
||||||
{"", "group:food_bowl", ""},
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_mortar_pestle", "farming:mortar_pestle"},
|
|
||||||
{"group:food_baking_tray", "farming:baking_tray"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- ethanol (thanks to JKMurray for this idea)
|
|
||||||
minetest.register_node("farming:bottle_ethanol", {
|
|
||||||
description = S("Bottle of Ethanol"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_bottle_ethanol.png"},
|
|
||||||
inventory_image = "farming_bottle_ethanol.png",
|
|
||||||
wield_image = "farming_bottle_ethanol.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:bottle_ethanol",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_corn", "group:food_corn", "group:food_corn"},
|
|
||||||
{"group:food_corn", a.glass_bottle, "group:food_corn"},
|
|
||||||
{"group:food_corn", "group:food_corn", "group:food_corn"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:bottle_ethanol",
|
|
||||||
burntime = 80,
|
|
||||||
replacements = {{"farming:bottle_ethanol", a.glass_bottle}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- corn definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Corn") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_corn_1.png"},
|
tiles = {"farming_corn_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -120,58 +38,68 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:corn_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:corn_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_corn_2.png"}
|
def.tiles = {"farming_corn_2.png"}
|
||||||
minetest.register_node("farming:corn_2", table.copy(def))
|
core.register_node("farming:corn_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_corn_3.png"}
|
def.tiles = {"farming_corn_3.png"}
|
||||||
minetest.register_node("farming:corn_3", table.copy(def))
|
core.register_node("farming:corn_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_corn_4.png"}
|
def.tiles = {"farming_corn_4.png"}
|
||||||
minetest.register_node("farming:corn_4", table.copy(def))
|
core.register_node("farming:corn_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_corn_5.png"}
|
def.tiles = {"farming_corn_5.png"}
|
||||||
minetest.register_node("farming:corn_5", table.copy(def))
|
core.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
|
||||||
minetest.register_node("farming:corn_6", table.copy(def))
|
core.register_node("farming:corn_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_corn_7.png"}
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:corn_7", table.copy(def))
|
core.register_node("farming:corn_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_corn_8.png"}
|
def.tiles = {"farming_corn_8.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 = {
|
items = {
|
||||||
{items = {"farming:corn 2"}, rarity = 1},
|
{items = {"farming:corn 2"}, rarity = 1},
|
||||||
{items = {"farming:corn 2"}, rarity = 2},
|
{items = {"farming:corn"}, rarity = 2},
|
||||||
{items = {"farming:corn 2"}, rarity = 2}
|
{items = {"farming:corn"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:corn_8", table.copy(def))
|
core.register_node("farming:corn_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:corn"] = {
|
farming.registered_plants["farming:corn"] = {
|
||||||
crop = "farming:corn",
|
crop = "farming:corn",
|
||||||
seed = "farming:corn",
|
seed = "farming:corn",
|
||||||
@@ -181,9 +109,12 @@ farming.registered_plants["farming:corn"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -193,7 +124,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 12,
|
y_min = 12, y_max = 27,
|
||||||
y_max = 25,
|
|
||||||
decoration = "farming:corn_7"
|
decoration = "farming:corn_7"
|
||||||
})
|
})
|
||||||
|
|||||||
212
crops/cotton.lua
@@ -1,37 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- wild cotton as a source of cotton seed and a chance of cotton itself
|
-- seed
|
||||||
minetest.register_node("farming:cotton_wild", {
|
|
||||||
description = S("Wild Cotton"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
waving = 1,
|
|
||||||
tiles = {"farming_cotton_wild.png"},
|
|
||||||
inventory_image = "farming_cotton_wild.png",
|
|
||||||
wield_image = "farming_cotton_wild.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60
|
|
||||||
},
|
|
||||||
drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:cotton"}, rarity = 2},
|
|
||||||
{items = {"farming:seed_cotton"}, rarity = 1}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cotton seeds
|
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",
|
||||||
@@ -41,70 +13,36 @@ minetest.register_node("farming:seed_cotton", {
|
|||||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||||
flammable = 4, growing = 1
|
flammable = 4, growing = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:cotton_1",
|
next_plant = "farming:cotton_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_cotton")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_cotton")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:cotton_1", param2 = 1})
|
core.set_node(pos, {name = "farming:cotton_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- cotton
|
-- item
|
||||||
minetest.register_craftitem("farming:cotton", {
|
|
||||||
|
core.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}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- string
|
-- crop definition
|
||||||
if not farming.mcl then
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:string", {
|
|
||||||
description = S("String"),
|
|
||||||
inventory_image = "farming_string.png",
|
|
||||||
groups = {flammable = 2}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- cotton to wool
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.wool,
|
|
||||||
recipe = {
|
|
||||||
{"farming:cotton", "farming:cotton"},
|
|
||||||
{"farming:cotton", "farming:cotton"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cotton to string
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.string .. " 2",
|
|
||||||
recipe = {
|
|
||||||
{"farming:cotton"},
|
|
||||||
{"farming:cotton"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- can be used as fuel
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:string",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:cotton",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cotton definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Cotton") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_cotton_1.png"},
|
tiles = {"farming_cotton_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -118,56 +56,58 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:cotton_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:cotton_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_2.png"}
|
def.tiles = {"farming_cotton_2.png"}
|
||||||
minetest.register_node("farming:cotton_2", table.copy(def))
|
core.register_node("farming:cotton_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_3.png"}
|
def.tiles = {"farming_cotton_3.png"}
|
||||||
minetest.register_node("farming:cotton_3", table.copy(def))
|
core.register_node("farming:cotton_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_4.png"}
|
def.tiles = {"farming_cotton_4.png"}
|
||||||
minetest.register_node("farming:cotton_4", table.copy(def))
|
core.register_node("farming:cotton_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_5.png"}
|
def.tiles = {"farming_cotton_5.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_cotton"}, rarity = 1}
|
{items = {"farming:seed_cotton"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cotton_5", table.copy(def))
|
core.register_node("farming:cotton_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_6.png"}
|
def.tiles = {"farming_cotton_6.png"}
|
||||||
def.drop = {
|
core.register_node("farming:cotton_6", table.copy(def))
|
||||||
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}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cotton_7", table.copy(def))
|
core.register_node("farming:cotton_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_cotton_8.png"}
|
def.tiles = {"farming_cotton_8.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -181,9 +121,10 @@ def.drop = {
|
|||||||
{items = {"farming:seed_cotton"}, rarity = 3}
|
{items = {"farming:seed_cotton"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cotton_8", table.copy(def))
|
core.register_node("farming:cotton_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:cotton"] = {
|
farming.registered_plants["farming:cotton"] = {
|
||||||
crop = "farming:cotton",
|
crop = "farming:cotton",
|
||||||
seed = "farming:seed_cotton",
|
seed = "farming:seed_cotton",
|
||||||
@@ -192,6 +133,63 @@ farming.registered_plants["farming:cotton"] = {
|
|||||||
steps = 8
|
steps = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- wild cotton (this is what you find on the map)
|
||||||
|
|
||||||
|
core.register_node("farming:cotton_wild", {
|
||||||
|
description = S("Wild Cotton"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
waving = 1,
|
||||||
|
tiles = {"farming_cotton_wild.png"},
|
||||||
|
inventory_image = "farming_cotton_wild.png",
|
||||||
|
wield_image = "farming_cotton_wild.png",
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
groups = {handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"farming:cotton"}, rarity = 2},
|
||||||
|
{items = {"farming:seed_cotton"}, rarity = 1}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- mapgen
|
||||||
|
|
||||||
|
local spawn_on = {
|
||||||
|
"default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass",
|
||||||
|
"mcl_core:dirt_with_grass"
|
||||||
|
}
|
||||||
|
|
||||||
|
if farming.mapgen == "v6" then
|
||||||
|
spawn_on = {"default:dirt_with_grass"}
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_decoration({
|
||||||
|
name = "farming:cotton_wild",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = spawn_on,
|
||||||
|
sidelen = 16,
|
||||||
|
noise_params = {
|
||||||
|
offset = 0,
|
||||||
|
scale = farming.cotton,
|
||||||
|
spread = {x = 100, y = 100, z = 100},
|
||||||
|
seed = 4242,
|
||||||
|
octaves = 3,
|
||||||
|
persist = 0.6
|
||||||
|
},
|
||||||
|
y_min = 1, y_max = 120,
|
||||||
|
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",
|
||||||
@@ -199,31 +197,3 @@ farming.register_plant("farming:cotton", {
|
|||||||
groups = {flammable = 2},
|
groups = {flammable = 2},
|
||||||
steps = 8,
|
steps = 8,
|
||||||
})]]
|
})]]
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
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"}
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
name = "farming:cotton_wild",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = def.grow_on,
|
|
||||||
sidelen = 16,
|
|
||||||
noise_params = {
|
|
||||||
offset = -0.1,
|
|
||||||
scale = 0.1,
|
|
||||||
spread = {x = 50, y = 50, z = 50},
|
|
||||||
seed = 4242,
|
|
||||||
octaves = 3,
|
|
||||||
persist = 0.7
|
|
||||||
},
|
|
||||||
biomes = def.biome,
|
|
||||||
y_max = 31000,
|
|
||||||
y_min = 1,
|
|
||||||
decoration = "farming:cotton_wild"
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,24 +1,30 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
Original textures from DocFarming mod
|
Original textures from DocFarming mod
|
||||||
https://forum.minetest.net/viewtopic.php?id=3948
|
https://forum.core.net/viewtopic.php?id=3948
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- cucumber
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:cucumber", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_cucumber = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(4)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- cucumber definition
|
farming.add_eatable("farming:cucumber", 4)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Cucumber") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_cucumber_1.png"},
|
tiles = {"farming_cucumber_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -30,33 +36,40 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:cucumber_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:cucumber_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_cucumber_2.png"}
|
def.tiles = {"farming_cucumber_2.png"}
|
||||||
minetest.register_node("farming:cucumber_2", table.copy(def))
|
core.register_node("farming:cucumber_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_cucumber_3.png"}
|
def.tiles = {"farming_cucumber_3.png"}
|
||||||
minetest.register_node("farming:cucumber_3", table.copy(def))
|
core.register_node("farming:cucumber_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_cucumber_4.png"}
|
def.tiles = {"farming_cucumber_4.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 = {
|
items = {
|
||||||
{items = {"farming:cucumber 2"}, rarity = 1},
|
{items = {"farming:cucumber 2"}, rarity = 1},
|
||||||
{items = {"farming:cucumber 2"}, rarity = 2}
|
{items = {"farming:cucumber"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:cucumber_4", table.copy(def))
|
core.register_node("farming:cucumber_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:cucumber"] = {
|
farming.registered_plants["farming:cucumber"] = {
|
||||||
crop = "farming:cucumber",
|
crop = "farming:cucumber",
|
||||||
seed = "farming:cucumber",
|
seed = "farming:cucumber",
|
||||||
@@ -66,16 +79,12 @@ farming.registered_plants["farming:cucumber"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
near = mg and "group:water" or nil,
|
|
||||||
num = mg and 1 or -1,
|
|
||||||
}
|
|
||||||
|
|
||||||
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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -85,9 +94,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 20,
|
||||||
y_max = 20,
|
|
||||||
decoration = "farming:cucumber_4",
|
decoration = "farming:cucumber_4",
|
||||||
spawn_by = def.near,
|
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
||||||
num_spawn_by = def.num
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- eggplant
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:eggplant", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_eggplant = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(3)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- definition
|
farming.add_eatable("farming:eggplant", 3)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Eggplant") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_eggplant_1.png"},
|
tiles = {"farming_eggplant_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -28,17 +34,22 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:eggplant_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:eggplant_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_eggplant_2.png"}
|
def.tiles = {"farming_eggplant_2.png"}
|
||||||
minetest.register_node("farming:eggplant_2", table.copy(def))
|
core.register_node("farming:eggplant_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_eggplant_3.png"}
|
def.tiles = {"farming_eggplant_3.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -46,45 +57,46 @@ def.drop = {
|
|||||||
{items = {"farming:eggplant"}, rarity = 3}
|
{items = {"farming:eggplant"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:eggplant_3", table.copy(def))
|
core.register_node("farming:eggplant_3", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 4 (final)
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
def.tiles = {"farming_eggplant_4.png"}
|
def.tiles = {"farming_eggplant_4.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 = {
|
items = {
|
||||||
{items = {"farming:eggplant 2"}, rarity = 1},
|
{items = {"farming:eggplant 2"}, rarity = 1},
|
||||||
{items = {"farming:eggplant 2"}, rarity = 2}
|
{items = {"farming:eggplant"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:eggplant_4", table.copy(def))
|
core.register_node("farming:eggplant_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:eggplant"] = {
|
farming.registered_plants["farming:eggplant"] = {
|
||||||
crop = "farming:eggplant",
|
crop = "farming:eggplant",
|
||||||
seed = "farming:eggplant",
|
seed = "farming:eggplant",
|
||||||
minlight = 7,
|
minlight = farming.min_light,
|
||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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.1,
|
offset = 0,
|
||||||
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
|
||||||
},
|
},
|
||||||
biomes = {"deciduous_forest"},
|
y_min = 1, y_max = 40,
|
||||||
y_max = 31000,
|
decoration = "farming:eggplant_3",
|
||||||
y_min = 1,
|
|
||||||
decoration = "farming:eggplant_4",
|
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
|||||||
112
crops/garlic.lua
@@ -1,82 +1,22 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- garlic clove
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:garlic_clove", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- garlic bulb
|
|
||||||
minetest.register_craftitem("farming:garlic", {
|
|
||||||
description = S("Garlic"),
|
|
||||||
inventory_image = "crops_garlic.png",
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
groups = {food_garlic = 1, flammable = 3, compostability = 55}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:garlic_clove 8",
|
|
||||||
recipe = {{"farming:garlic"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:garlic",
|
|
||||||
recipe = {
|
|
||||||
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"},
|
|
||||||
{"farming:garlic_clove", "", "farming:garlic_clove"},
|
|
||||||
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- garlic braid
|
|
||||||
minetest.register_node("farming:garlic_braid", {
|
|
||||||
description = S("Garlic Braid"),
|
|
||||||
inventory_image = "crops_garlic_braid.png",
|
|
||||||
wield_image = "crops_garlic_braid.png",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
tiles = {
|
|
||||||
"crops_garlic_braid_top.png",
|
|
||||||
"crops_garlic_braid.png",
|
|
||||||
"crops_garlic_braid_side.png^[transformFx",
|
|
||||||
"crops_garlic_braid_side.png",
|
|
||||||
"crops_garlic_braid.png",
|
|
||||||
"crops_garlic_braid.png"
|
|
||||||
},
|
|
||||||
groups = {vessel = 1, dig_immediate = 3, flammable = 3, compostability = 65},
|
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.1875, -0.5, 0.5, 0.1875, 0.5, 0.125}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:garlic_braid",
|
|
||||||
recipe = {
|
|
||||||
{"farming:garlic", "farming:garlic", "farming:garlic"},
|
|
||||||
{"farming:garlic", "farming:garlic", "farming:garlic"},
|
|
||||||
{"farming:garlic", "farming:garlic", "farming:garlic"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "farming:garlic 9",
|
|
||||||
recipe = {"farming:garlic_braid"}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Garlic") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"crops_garlic_plant_1.png"},
|
tiles = {"crops_garlic_plant_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -92,38 +32,46 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:garlic_1", table.copy(def))
|
|
||||||
|
core.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"}
|
||||||
minetest.register_node("farming:garlic_2", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:garlic_3", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:garlic_4", table.copy(def))
|
core.register_node("farming:garlic_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"crops_garlic_plant_5.png"}
|
def.tiles = {"crops_garlic_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 = {
|
items = {
|
||||||
{items = {"farming:garlic 3"}, rarity = 1},
|
{items = {"farming:garlic 2"}, rarity = 1},
|
||||||
{items = {"farming:garlic"}, rarity = 2},
|
{items = {"farming:garlic"}, rarity = 2},
|
||||||
{items = {"farming:garlic"}, rarity = 5}
|
{items = {"farming:garlic"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:garlic_5", table.copy(def))
|
core.register_node("farming:garlic_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:garlic"] = {
|
farming.registered_plants["farming:garlic"] = {
|
||||||
crop = "farming:garlic",
|
crop = "farming:garlic",
|
||||||
seed = "farming:garlic_clove",
|
seed = "farming:garlic_clove",
|
||||||
@@ -133,9 +81,13 @@ farming.registered_plants["farming:garlic"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt",
|
||||||
|
"default:dirt_with_rainforest_litter"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -145,9 +97,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 45,
|
||||||
y_max = 35,
|
|
||||||
decoration = "farming:garlic_5",
|
decoration = "farming:garlic_5",
|
||||||
spawn_by = "group:tree",
|
spawn_by = "group:tree", num_spawn_by = 1
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,23 +1,29 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- ginger
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:ginger", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_ginger = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- ginger definition
|
farming.add_eatable("farming:ginger", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Ginger") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_ginger_1.png"},
|
tiles = {"farming_ginger_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true, minlight = 5,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
@@ -27,17 +33,22 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:ginger_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:ginger_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_ginger_2.png"}
|
def.tiles = {"farming_ginger_2.png"}
|
||||||
minetest.register_node("farming:ginger_2", table.copy(def))
|
core.register_node("farming:ginger_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_ginger_3.png"}
|
def.tiles = {"farming_ginger_3.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -45,34 +56,41 @@ def.drop = {
|
|||||||
{items = {"farming:ginger"}, rarity = 3}
|
{items = {"farming:ginger"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:ginger_3", table.copy(def))
|
core.register_node("farming:ginger_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_ginger_4.png"}
|
def.tiles = {"farming_ginger_4.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 = {
|
items = {
|
||||||
{items = {"farming:ginger 2"}, rarity = 1},
|
{items = {"farming:ginger 2"}, rarity = 1},
|
||||||
{items = {"farming:ginger 2"}, rarity = 2}
|
{items = {"farming:ginger"}, rarity = 2},
|
||||||
|
{items = {"farming:ginger"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:ginger_4", table.copy(def))
|
core.register_node("farming:ginger_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:ginger"] = {
|
farming.registered_plants["farming:ginger"] = {
|
||||||
crop = "farming:ginger",
|
crop = "farming:ginger",
|
||||||
seed = "farming:ginger",
|
seed = "farming:ginger",
|
||||||
minlight = 5,
|
minlight = 5,
|
||||||
maxlight = minetest.LIGHT_MAX,
|
maxlight = farming.max_light,
|
||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.register_decoration({
|
||||||
name = "farming:ginger_4",
|
name = "farming:ginger_4",
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"},
|
place_on = {
|
||||||
|
"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,
|
||||||
@@ -82,8 +100,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_max = 80,
|
y_min = 1, y_max = 80,
|
||||||
y_min = 1,
|
|
||||||
decoration = "farming:ginger_3",
|
decoration = "farming:ginger_3",
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
|||||||
162
crops/grapes.lua
@@ -1,27 +1,24 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
-- place trellis helper
|
||||||
|
|
||||||
-- place trellis
|
|
||||||
local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not core.registered_nodes[under.name] then return end
|
||||||
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 = minetest.registered_nodes[under.name]
|
local def = core.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
|
||||||
@@ -30,19 +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 minetest.is_protected(pt.under, name) then
|
if core.is_protected(pt.under, name) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if pointing at trellis
|
-- check if pointing at trellis
|
||||||
if under.name ~= "farming:trellis" then
|
if under.name ~= "farming:trellis" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
minetest.set_node(pt.under, {name = plantname})
|
core.set_node(pt.under, {name = plantname})
|
||||||
|
|
||||||
minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0})
|
core.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
|
||||||
|
|
||||||
@@ -51,11 +44,8 @@ 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
|
||||||
|
|
||||||
minetest.after(0.20,
|
core.after(0.20, farming.refill_plant, placer,
|
||||||
farming.refill_plant,
|
"farming:grapes", placer:get_wield_index()
|
||||||
placer,
|
|
||||||
"farming:grapes",
|
|
||||||
placer:get_wield_index()
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -63,25 +53,24 @@ local function place_grapes(itemstack, placer, pointed_thing, plantname)
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
-- grapes
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:grapes", {
|
|
||||||
|
core.register_craftitem("farming:grapes", {
|
||||||
description = S("Grapes"),
|
description = S("Grapes"),
|
||||||
inventory_image = "farming_grapes.png",
|
inventory_image = "farming_grapes.png",
|
||||||
on_use = minetest.item_eat(2),
|
groups = {compostability = 48, seed = 2, food_grapes = 1},
|
||||||
groups = {compostability = 48, seed = 2, food_grapes = 1, flammable = 3},
|
on_use = core.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")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- grapes can be used for violet dye
|
farming.add_eatable("farming:grapes", 2)
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_violet,
|
|
||||||
recipe = {{"farming:grapes"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- trellis
|
-- trellis
|
||||||
minetest.register_node("farming:trellis", {
|
|
||||||
|
core.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"},
|
||||||
@@ -94,40 +83,36 @@ minetest.register_node("farming:trellis", {
|
|||||||
drop = "farming:trellis",
|
drop = "farming:trellis",
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
groups = {handy = 1, snappy = 3, flammable = 2, attached_node = 1},
|
groups = {handy = 1, snappy = 3, flammable = 2, attached_node = 1},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.get_node(pt.under)
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
-- return if any of the nodes are not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not core.registered_nodes[under.name] then return end
|
||||||
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 = minetest.registered_nodes[under.name]
|
local def = core.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 minetest.is_protected(pt.above, placer:get_player_name()) then
|
if core.is_protected(pt.above, placer:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodename = under.name
|
local nodename = under.name
|
||||||
|
|
||||||
if minetest.get_item_group(nodename, "soil") < 2 then
|
if core.get_item_group(nodename, "soil") < 2 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local top = {
|
local top = {
|
||||||
x = pointed_thing.above.x,
|
x = pointed_thing.above.x,
|
||||||
@@ -135,13 +120,11 @@ minetest.register_node("farming:trellis", {
|
|||||||
z = pointed_thing.above.z
|
z = pointed_thing.above.z
|
||||||
}
|
}
|
||||||
|
|
||||||
nodename = minetest.get_node(top).name
|
nodename = core.get_node(top).name
|
||||||
|
|
||||||
if nodename ~= "air" then
|
if nodename ~= "air" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.set_node(pointed_thing.above, {name = "farming:trellis"})
|
core.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()
|
||||||
@@ -151,23 +134,10 @@ minetest.register_node("farming:trellis", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:trellis",
|
|
||||||
recipe = {
|
|
||||||
{"group:stick", "group:stick", "group:stick"},
|
|
||||||
{"group:stick", "group:stick", "group:stick"},
|
|
||||||
{"group:stick", "group:stick", "group:stick"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:trellis",
|
|
||||||
burntime = 15
|
|
||||||
})
|
|
||||||
|
|
||||||
-- grapes definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Grapes") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_grapes_1.png"},
|
tiles = {"farming_grapes_1.png"},
|
||||||
visual_scale = 1.9,
|
visual_scale = 1.9,
|
||||||
@@ -185,51 +155,63 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1,
|
handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1,
|
||||||
attached_node = 1, growing = 1, plant = 1
|
attached_node = 1, growing = 1, plant = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:grapes_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:grapes_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_2.png"}
|
def.tiles = {"farming_grapes_2.png"}
|
||||||
minetest.register_node("farming:grapes_2", table.copy(def))
|
core.register_node("farming:grapes_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_3.png"}
|
def.tiles = {"farming_grapes_3.png"}
|
||||||
minetest.register_node("farming:grapes_3", table.copy(def))
|
core.register_node("farming:grapes_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_4.png"}
|
def.tiles = {"farming_grapes_4.png"}
|
||||||
minetest.register_node("farming:grapes_4", table.copy(def))
|
core.register_node("farming:grapes_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_5.png"}
|
def.tiles = {"farming_grapes_5.png"}
|
||||||
minetest.register_node("farming:grapes_5", table.copy(def))
|
core.register_node("farming:grapes_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_6.png"}
|
def.tiles = {"farming_grapes_6.png"}
|
||||||
minetest.register_node("farming:grapes_6", table.copy(def))
|
core.register_node("farming:grapes_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_7.png"}
|
def.tiles = {"farming_grapes_7.png"}
|
||||||
minetest.register_node("farming:grapes_7", table.copy(def))
|
core.register_node("farming:grapes_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_grapes_8.png"}
|
def.tiles = {"farming_grapes_8.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 = {
|
items = {
|
||||||
{items = {"farming:trellis"}, rarity = 1},
|
{items = {"farming:trellis"}, rarity = 1},
|
||||||
{items = {"farming:grapes 3"}, rarity = 1},
|
{items = {"farming:grapes 2"}, rarity = 1},
|
||||||
{items = {"farming:grapes 1"}, rarity = 2},
|
{items = {"farming:grapes"}, rarity = 2},
|
||||||
{items = {"farming:grapes 1"}, rarity = 3}
|
{items = {"farming:grapes"}, rarity = 3},
|
||||||
|
{items = {"farming:grapes"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:grapes_8", table.copy(def))
|
core.register_node("farming:grapes_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:grapes"] = {
|
farming.registered_plants["farming:grapes"] = {
|
||||||
trellis = "farming:trellis",
|
trellis = "farming:trellis",
|
||||||
crop = "farming:grapes",
|
crop = "farming:grapes",
|
||||||
@@ -240,7 +222,8 @@ 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)
|
||||||
minetest.register_node("farming:grapebush", {
|
|
||||||
|
core.register_node("farming:grapebush", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_grapebush.png"},
|
tiles = {"farming_grapebush.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -250,9 +233,9 @@ minetest.register_node("farming:grapebush", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:grapes 1"}, rarity = 1},
|
{items = {"farming:grapes"}, rarity = 1},
|
||||||
{items = {"farming:grapes 1"}, rarity = 2},
|
{items = {"farming:grapes"}, rarity = 2},
|
||||||
{items = {"farming:grapes 1"}, rarity = 3}
|
{items = {"farming:grapes"}, rarity = 3}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
@@ -260,13 +243,17 @@ minetest.register_node("farming:grapebush", {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, compostability = 35
|
not_in_creative_inventory = 1, compostability = 35
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -276,7 +263,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 25,
|
y_min = 25, y_max = 50,
|
||||||
y_max = 50,
|
|
||||||
decoration = "farming:grapebush"
|
decoration = "farming:grapebush"
|
||||||
})
|
})
|
||||||
|
|||||||
234
crops/hemp.lua
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- hemp seeds
|
-- seed
|
||||||
minetest.register_node("farming:seed_hemp", {
|
|
||||||
|
core.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",
|
||||||
@@ -13,200 +13,36 @@ minetest.register_node("farming:seed_hemp", {
|
|||||||
handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1,
|
handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1,
|
||||||
growing = 1
|
growing = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:hemp_1",
|
next_plant = "farming:hemp_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_hemp")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_hemp")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:hemp_1", param2 = 1})
|
core.set_node(pos, {name = "farming:hemp_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- harvested hemp
|
-- item
|
||||||
minetest.register_craftitem("farming:hemp_leaf", {
|
|
||||||
|
core.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}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- hemp oil
|
-- crop definition
|
||||||
minetest.register_node("farming:hemp_oil", {
|
|
||||||
description = S("Bottle of Hemp Oil"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_hemp_oil.png"},
|
|
||||||
inventory_image = "farming_hemp_oil.png",
|
|
||||||
wield_image = "farming_hemp_oil.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
compostability = 45
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_oil",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"},
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"},
|
|
||||||
{"", a.glass_bottle, ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_oil",
|
|
||||||
recipe = {
|
|
||||||
{"farming:seed_hemp", "farming:seed_hemp", "farming:seed_hemp"},
|
|
||||||
{"farming:seed_hemp", "farming:seed_hemp", "farming:seed_hemp"},
|
|
||||||
{"farming:seed_hemp", a.glass_bottle, "farming:seed_hemp"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:hemp_oil",
|
|
||||||
burntime = 20,
|
|
||||||
replacements = {{"farming:hemp_oil", a.glass_bottle}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- hemp fibre
|
|
||||||
minetest.register_craftitem("farming:hemp_fibre", {
|
|
||||||
description = S("Hemp Fibre"),
|
|
||||||
inventory_image = "farming_hemp_fibre.png",
|
|
||||||
groups = {compostability = 55}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_fibre 8",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"},
|
|
||||||
{"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"},
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}
|
|
||||||
},
|
|
||||||
replacements = {{"group:water_bucket", a.bucket_empty}}
|
|
||||||
})
|
|
||||||
|
|
||||||
if minetest.get_modpath("bucket_wooden") then
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_fibre 8",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"},
|
|
||||||
{"farming:hemp_leaf", "group:water_bucket_wooden", "farming:hemp_leaf"},
|
|
||||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}
|
|
||||||
},
|
|
||||||
replacements = {{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"}}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- hemp block
|
|
||||||
minetest.register_node("farming:hemp_block", {
|
|
||||||
description = S("Hemp Block"),
|
|
||||||
tiles = {"farming_hemp_block.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
groups = {
|
|
||||||
axey = 1, handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2,
|
|
||||||
compostability = 85
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_block",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"},
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"},
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- check and register stairs
|
|
||||||
if minetest.global_exists("stairs") then
|
|
||||||
|
|
||||||
if stairs.mod and stairs.mod == "redo" then
|
|
||||||
|
|
||||||
stairs.register_all("hemp_block", "farming:hemp_block",
|
|
||||||
{snappy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
|
||||||
{"farming_hemp_block.png"},
|
|
||||||
"Hemp Block",
|
|
||||||
farming.sounds.node_sound_leaves_defaults())
|
|
||||||
else
|
|
||||||
|
|
||||||
stairs.register_stair_and_slab("hemp_block", "farming:hemp_block",
|
|
||||||
{snappy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
|
||||||
{"farming_hemp_block.png"},
|
|
||||||
"Hemp Block Stair",
|
|
||||||
"Hemp Block Slab",
|
|
||||||
farming.sounds.node_sound_leaves_defaults())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- paper
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = a.paper .. " 3",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- string
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:cotton 3",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre"},
|
|
||||||
{"farming:hemp_fibre"},
|
|
||||||
{"farming:hemp_fibre"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- hemp rope
|
|
||||||
minetest.register_node("farming:hemp_rope", {
|
|
||||||
description = S("Hemp Rope"),
|
|
||||||
walkable = false,
|
|
||||||
climbable = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = "light",
|
|
||||||
tiles = {"farming_hemp_rope.png"},
|
|
||||||
wield_image = "farming_hemp_rope.png",
|
|
||||||
inventory_image = "farming_hemp_rope.png",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
groups = {
|
|
||||||
handy = 1, axey = 1, swordy = 1, flammable = 2, choppy = 3,
|
|
||||||
oddly_breakable_by_hand = 3, compostability = 55
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
|
|
||||||
},
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
-- string
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:hemp_rope 6",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"},
|
|
||||||
{"farming:cotton", "farming:cotton", "farming:cotton"},
|
|
||||||
{"farming:hemp_fibre", "farming:hemp_fibre", "farming:hemp_fibre"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- hemp definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Hemp") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_hemp_1.png"},
|
tiles = {"farming_hemp_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -220,29 +56,37 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:hemp_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:hemp_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_2.png"}
|
def.tiles = {"farming_hemp_2.png"}
|
||||||
minetest.register_node("farming:hemp_2", table.copy(def))
|
core.register_node("farming:hemp_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_3.png"}
|
def.tiles = {"farming_hemp_3.png"}
|
||||||
minetest.register_node("farming:hemp_3", table.copy(def))
|
core.register_node("farming:hemp_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_4.png"}
|
def.tiles = {"farming_hemp_4.png"}
|
||||||
minetest.register_node("farming:hemp_4", table.copy(def))
|
core.register_node("farming:hemp_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_5.png"}
|
def.tiles = {"farming_hemp_5.png"}
|
||||||
minetest.register_node("farming:hemp_5", table.copy(def))
|
core.register_node("farming:hemp_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_6.png"}
|
def.tiles = {"farming_hemp_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -250,9 +94,10 @@ def.drop = {
|
|||||||
{items = {"farming:seed_hemp"}, rarity = 1}
|
{items = {"farming:seed_hemp"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:hemp_6", table.copy(def))
|
core.register_node("farming:hemp_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_7.png"}
|
def.tiles = {"farming_hemp_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -262,9 +107,10 @@ def.drop = {
|
|||||||
{items = {"farming:seed_hemp"}, rarity = 3}
|
{items = {"farming:seed_hemp"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:hemp_7", table.copy(def))
|
core.register_node("farming:hemp_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_hemp_8.png"}
|
def.tiles = {"farming_hemp_8.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -272,13 +118,14 @@ 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"}, rarity = 1},
|
{items = {"farming:seed_hemp 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_hemp"}, rarity = 2}
|
{items = {"farming:seed_hemp"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:hemp_8", table.copy(def))
|
core.register_node("farming:hemp_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:hemp"] = {
|
farming.registered_plants["farming:hemp"] = {
|
||||||
crop = "farming:hemp",
|
crop = "farming:hemp",
|
||||||
seed = "farming:seed_hemp",
|
seed = "farming:seed_hemp",
|
||||||
@@ -288,11 +135,12 @@ farming.registered_plants["farming:hemp"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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"
|
"mcl_core:dirt_with_grass", "ethereal:prairie_dirt"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@@ -303,9 +151,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 45,
|
||||||
y_max = 45,
|
|
||||||
decoration = "farming:hemp_7",
|
decoration = "farming:hemp_7",
|
||||||
spawn_by = "group:tree",
|
spawn_by = "group:tree", num_spawn_by = 1
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- lettuce
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:lettuce", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_lettuce = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:lettuce", 2)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Lettuce") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_lettuce_1.png"},
|
tiles = {"farming_lettuce_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -25,37 +32,45 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:lettuce_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:lettuce_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_2.png"}
|
def.tiles = {"farming_lettuce_2.png"}
|
||||||
minetest.register_node("farming:lettuce_2", table.copy(def))
|
core.register_node("farming:lettuce_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_3.png"}
|
def.tiles = {"farming_lettuce_3.png"}
|
||||||
minetest.register_node("farming:lettuce_3", table.copy(def))
|
core.register_node("farming:lettuce_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_4.png"}
|
def.tiles = {"farming_lettuce_4.png"}
|
||||||
minetest.register_node("farming:lettuce_4", table.copy(def))
|
core.register_node("farming:lettuce_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_lettuce_5.png"}
|
def.tiles = {"farming_lettuce_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 = {
|
items = {
|
||||||
{items = {"farming:lettuce 2"}, rarity = 1},
|
{items = {"farming:lettuce 2"}, rarity = 1},
|
||||||
{items = {"farming:lettuce 1"}, rarity = 2}
|
{items = {"farming:lettuce"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:lettuce_5", table.copy(def))
|
core.register_node("farming:lettuce_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:lettuce"] = {
|
farming.registered_plants["farming:lettuce"] = {
|
||||||
crop = "farming:lettuce",
|
crop = "farming:lettuce",
|
||||||
seed = "farming:lettuce",
|
seed = "farming:lettuce",
|
||||||
@@ -65,9 +80,12 @@ farming.registered_plants["farming:lettuce"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -77,7 +95,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 35,
|
||||||
y_max = 35,
|
|
||||||
decoration = "farming:lettuce_5"
|
decoration = "farming:lettuce_5"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,34 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- melon
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:melon_slice", {
|
|
||||||
|
core.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, flammable = 3},
|
groups = {compostability = 48, seed = 2, food_melon_slice = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
farming.add_eatable("farming:melon_slice", 2)
|
||||||
output = "farming:melon_8",
|
|
||||||
recipe = {
|
|
||||||
{"farming:melon_slice", "farming:melon_slice"},
|
|
||||||
{"farming:melon_slice", "farming:melon_slice"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:melon_slice 4",
|
|
||||||
recipe = {{"farming:melon_8", a.cutting_board}},
|
|
||||||
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- melon definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Melon") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_melon_1.png"},
|
tiles = {"farming_melon_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -41,38 +32,48 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:melon_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:melon_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_melon_2.png"}
|
def.tiles = {"farming_melon_2.png"}
|
||||||
minetest.register_node("farming:melon_2", table.copy(def))
|
core.register_node("farming:melon_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_melon_3.png"}
|
def.tiles = {"farming_melon_3.png"}
|
||||||
minetest.register_node("farming:melon_3", table.copy(def))
|
core.register_node("farming:melon_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_melon_4.png"}
|
def.tiles = {"farming_melon_4.png"}
|
||||||
minetest.register_node("farming:melon_4", table.copy(def))
|
core.register_node("farming:melon_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_melon_5.png"}
|
def.tiles = {"farming_melon_5.png"}
|
||||||
minetest.register_node("farming:melon_5", table.copy(def))
|
core.register_node("farming:melon_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_melon_6.png"}
|
def.tiles = {"farming_melon_6.png"}
|
||||||
minetest.register_node("farming:melon_6", table.copy(def))
|
core.register_node("farming:melon_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_melon_7.png"}
|
def.tiles = {"farming_melon_7.png"}
|
||||||
minetest.register_node("farming:melon_7", table.copy(def))
|
core.register_node("farming:melon_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
minetest.register_node("farming:melon_8", {
|
|
||||||
|
core.register_node("farming:melon_8", {
|
||||||
description = S("Melon"),
|
description = S("Melon"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"farming_melon_top.png",
|
"farming_melon_top.png",
|
||||||
@@ -83,15 +84,17 @@ minetest.register_node("farming:melon_8", {
|
|||||||
food_melon = 1, handy = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
|
food_melon = 1, handy = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
|
||||||
flammable = 2, plant = 1, compostability = 65
|
flammable = 2, plant = 1, compostability = 65
|
||||||
},
|
},
|
||||||
|
is_ground_content = false,
|
||||||
drop = "farming:melon_8",
|
drop = "farming:melon_8",
|
||||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = minetest.rotate_node,
|
on_place = core.rotate_node,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:melon"] = {
|
farming.registered_plants["farming:melon"] = {
|
||||||
crop = "farming:melon",
|
crop = "farming:melon",
|
||||||
seed = "farming:melon_slice",
|
seed = "farming:melon_slice",
|
||||||
@@ -101,19 +104,13 @@ farming.registered_plants["farming:melon"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
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 = def.spawn_on,
|
place_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,
|
||||||
@@ -123,9 +120,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 3,
|
||||||
y_max = def.y_max,
|
|
||||||
decoration = "farming:melon_8",
|
decoration = "farming:melon_8",
|
||||||
spawn_by = def.near,
|
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
||||||
num_spawn_by = def.num
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- mint seed
|
-- seed
|
||||||
minetest.register_node("farming:seed_mint", {
|
|
||||||
|
core.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",
|
||||||
@@ -13,49 +13,36 @@ minetest.register_node("farming:seed_mint", {
|
|||||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
||||||
handy = 1, flammable = 2
|
handy = 1, flammable = 2
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:mint_1",
|
next_plant = "farming:mint_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_mint")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_mint")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:mint_1", param2 = 1})
|
core.set_node(pos, {name = "farming:mint_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- mint leaf
|
-- item
|
||||||
minetest.register_craftitem("farming:mint_leaf", {
|
|
||||||
|
core.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}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- mint tea
|
-- crop definition
|
||||||
minetest.register_craftitem("farming:mint_tea", {
|
|
||||||
description = S("Mint Tea"),
|
|
||||||
inventory_image = "farming_mint_tea.png",
|
|
||||||
on_use = minetest.item_eat(2, a.drinking_glass),
|
|
||||||
groups = {flammable = 4}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:mint_tea",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_mint", "group:food_mint", "group:food_mint"},
|
|
||||||
{"group:food_glass_water", a.juicer, ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_juicer", "farming:juicer"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- mint definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Mint") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_mint_1.png"},
|
tiles = {"farming_mint_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -68,35 +55,42 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:mint_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:mint_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_mint_2.png"}
|
def.tiles = {"farming_mint_2.png"}
|
||||||
minetest.register_node("farming:mint_2", table.copy(def))
|
core.register_node("farming:mint_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_mint_3.png"}
|
def.tiles = {"farming_mint_3.png"}
|
||||||
minetest.register_node("farming:mint_3", table.copy(def))
|
core.register_node("farming:mint_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_mint_4.png"}
|
def.tiles = {"farming_mint_4.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 = {
|
items = {
|
||||||
{items = {"farming:mint_leaf 2"}, rarity = 1},
|
{items = {"farming:mint_leaf 2"}, rarity = 1},
|
||||||
{items = {"farming:mint_leaf 2"}, rarity = 2},
|
{items = {"farming:mint_leaf"}, rarity = 2},
|
||||||
{items = {"farming:seed_mint 1"}, rarity = 1},
|
{items = {"farming:seed_mint 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_mint 2"}, rarity = 2}
|
{items = {"farming:seed_mint"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:mint_4", table.copy(def))
|
core.register_node("farming:mint_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:mint"] = {
|
farming.registered_plants["farming:mint"] = {
|
||||||
crop = "farming:mint",
|
crop = "farming:mint",
|
||||||
seed = "farming:seed_mint",
|
seed = "farming:seed_mint",
|
||||||
@@ -106,11 +100,12 @@ farming.registered_plants["farming:mint"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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"
|
"mcl_core:dirt_with_grass", "ethereal:bamboo_dirt"
|
||||||
},
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@@ -121,9 +116,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 0,
|
y_min = 1, y_max = 75,
|
||||||
y_max = 75,
|
|
||||||
decoration = "farming:mint_4",
|
decoration = "farming:mint_4",
|
||||||
spawn_by = {"group:water", "group:sand"},
|
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,49 +2,30 @@
|
|||||||
--[[
|
--[[
|
||||||
Original textures from Crops Plus mod
|
Original textures from Crops Plus mod
|
||||||
Copyright (C) 2018 Grizzly Adam
|
Copyright (C) 2018 Grizzly Adam
|
||||||
https://forum.minetest.net/viewtopic.php?f=9&t=19488
|
https://forum.core.net/viewtopic.php?f=9&t=19488
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- onion
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:onion", {
|
|
||||||
|
core.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, flammable = 3},
|
groups = {compostability = 48, seed = 2, food_onion = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- onion soup
|
farming.add_eatable("farming:onion", 1)
|
||||||
minetest.register_craftitem("farming:onion_soup", {
|
|
||||||
description = S("Onion Soup"),
|
|
||||||
inventory_image = "farming_onion_soup.png",
|
|
||||||
groups = {flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(6, a.bowl)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:onion_soup",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_onion", "group:food_onion", "group:food_onion"},
|
|
||||||
{"group:food_onion", "group:food_bowl", "group:food_onion"},
|
|
||||||
{"", a.pot, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"farming:pot", "farming:pot"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- yellow dye
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.dye_yellow,
|
|
||||||
recipe = {{"group:food_onion"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Onion") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"crops_onion_plant_1.png"},
|
tiles = {"crops_onion_plant_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -61,40 +42,46 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:onion_1", table.copy(def))
|
|
||||||
|
core.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"}
|
||||||
minetest.register_node("farming:onion_2", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:onion_3", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:onion_4", table.copy(def))
|
core.register_node("farming:onion_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"crops_onion_plant_5.png"}
|
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 = {
|
||||||
max_items = 5, items = {
|
items = {
|
||||||
{items = {"farming:onion"}, rarity = 1},
|
{items = {"farming:onion 2"}, rarity = 1},
|
||||||
{items = {"farming:onion"}, rarity = 1},
|
|
||||||
{items = {"farming:onion"}, rarity = 2},
|
{items = {"farming:onion"}, rarity = 2},
|
||||||
{items = {"farming:onion"}, rarity = 2},
|
{items = {"farming:onion"}, rarity = 4}
|
||||||
{items = {"farming:onion"}, rarity = 5}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:onion_5", table.copy(def))
|
core.register_node("farming:onion_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:onion"] = {
|
farming.registered_plants["farming:onion"] = {
|
||||||
crop = "farming:onion",
|
crop = "farming:onion",
|
||||||
seed = "farming:onion",
|
seed = "farming:onion",
|
||||||
@@ -104,9 +91,12 @@ farming.registered_plants["farming:onion"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -116,7 +106,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 28,
|
||||||
y_max = 28,
|
|
||||||
decoration = "farming:onion_5"
|
decoration = "farming:onion_5"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- item definition
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:parsley", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_parsley = 1},
|
||||||
|
on_use = core.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")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:parsley", 1)
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Parsley") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_parsley_1.png"},
|
tiles = {"farming_parsley_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -26,17 +33,22 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:parsley_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:parsley_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_parsley_2.png"}
|
def.tiles = {"farming_parsley_2.png"}
|
||||||
minetest.register_node("farming:parsley_2", table.copy(def))
|
core.register_node("farming:parsley_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3 (final)
|
-- stage 3 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_parsley_3.png"}
|
def.tiles = {"farming_parsley_3.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -47,21 +59,26 @@ def.drop = {
|
|||||||
{items = {"farming:parsley"}, rarity = 3}
|
{items = {"farming:parsley"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:parsley_3", table.copy(def))
|
core.register_node("farming:parsley_3", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:parsley"] = {
|
farming.registered_plants["farming:parsley"] = {
|
||||||
crop = "farming:parsley",
|
crop = "farming:parsley",
|
||||||
seed = "farming:parsley",
|
seed = "farming:parsley",
|
||||||
minlight = 13,
|
minlight = farming.min_light,
|
||||||
maxlight = 15,
|
maxlight = farming.max_light,
|
||||||
steps = 3
|
steps = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt",
|
||||||
|
"ethereal:grove_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -71,7 +88,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 10,
|
y_min = 10, y_max = 40,
|
||||||
y_max = 40,
|
|
||||||
decoration = "farming:parsley_3"
|
decoration = "farming:parsley_3"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,43 +1,31 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
-- Textures for peas and their crop were done by Andrey01
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- Textures for Pea crop and Peas were done by Andrey01
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- pea pod
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:pea_pod", {
|
|
||||||
|
core.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 = {
|
groups = {compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1},
|
||||||
compostability = 48, seed = 2, food_peas = 1, food_pea_pod = 1, flammable = 2
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:pea_pod", 1)
|
||||||
|
|
||||||
-- replacement for separate peas item that was removed
|
-- replacement for separate peas item that was removed
|
||||||
minetest.register_alias("farming:peas", "farming:pea_pod")
|
|
||||||
|
|
||||||
-- pea soup
|
core.register_alias("farming:peas", "farming:pea_pod")
|
||||||
minetest.register_craftitem("farming:pea_soup", {
|
|
||||||
description = S("Pea Soup"),
|
|
||||||
inventory_image = "farming_pea_soup.png",
|
|
||||||
groups = {flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(4, a.bowl)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:pea_soup",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_peas"},
|
|
||||||
{"group:food_peas"},
|
|
||||||
{"group:food_bowl"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Pea") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_pea_1.png"},
|
tiles = {"farming_pea_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -53,39 +41,46 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:pea_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:pea_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pea_2.png"}
|
def.tiles = {"farming_pea_2.png"}
|
||||||
minetest.register_node("farming:pea_2", table.copy(def))
|
core.register_node("farming:pea_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pea_3.png"}
|
def.tiles = {"farming_pea_3.png"}
|
||||||
minetest.register_node("farming:pea_3", table.copy(def))
|
core.register_node("farming:pea_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
def.tiles = {"farming_pea_4.png"}
|
|
||||||
minetest.register_node("farming:pea_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5
|
def.tiles = {"farming_pea_4.png"}
|
||||||
|
core.register_node("farming:pea_4", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 5 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_pea_5.png"}
|
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 = {
|
||||||
max_items = 5, items = {
|
items = {
|
||||||
{items = {"farming:pea_pod"}, rarity = 1},
|
{items = {"farming:pea_pod 2"}, 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}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:pea_5", table.copy(def))
|
core.register_node("farming:pea_5", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:pea_pod"] = {
|
farming.registered_plants["farming:pea_pod"] = {
|
||||||
crop = "farming:pea",
|
crop = "farming:pea",
|
||||||
seed = "farming:pea_pod",
|
seed = "farming:pea_pod",
|
||||||
@@ -95,9 +90,12 @@ farming.registered_plants["farming:pea_pod"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -107,7 +105,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 25,
|
y_min = 25, y_max = 55,
|
||||||
y_max = 55,
|
|
||||||
decoration = "farming:pea_5"
|
decoration = "farming:pea_5"
|
||||||
})
|
})
|
||||||
|
|||||||
127
crops/pepper.lua
@@ -2,83 +2,67 @@
|
|||||||
--[[
|
--[[
|
||||||
Original textures from Crops Plus mod
|
Original textures from Crops Plus mod
|
||||||
Copyright (C) 2018 Grizzly Adam
|
Copyright (C) 2018 Grizzly Adam
|
||||||
https://forum.minetest.net/viewtopic.php?f=9&t=19488
|
https://forum.core.net/viewtopic.php?f=9&t=19488
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- peppercorn (seed)
|
-- seed
|
||||||
minetest.register_craftitem("farming:peppercorn", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- green pepper
|
-- green pepper
|
||||||
minetest.register_craftitem("farming:pepper", {
|
|
||||||
|
core.register_craftitem("farming:pepper", {
|
||||||
description = S("Green Pepper"),
|
description = S("Green Pepper"),
|
||||||
inventory_image = "crops_pepper.png",
|
inventory_image = "crops_pepper.png",
|
||||||
on_use = minetest.item_eat(2),
|
on_use = core.item_eat(2),
|
||||||
groups = {food_pepper = 1, flammable = 3, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:pepper", 2)
|
||||||
|
|
||||||
-- yellow pepper
|
-- yellow pepper
|
||||||
minetest.register_craftitem("farming:pepper_yellow", {
|
|
||||||
|
core.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 = minetest.item_eat(3),
|
on_use = core.item_eat(3),
|
||||||
groups = {food_pepper = 1, flammable = 3, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:pepper_yellow", 3)
|
||||||
|
|
||||||
-- red pepper
|
-- red pepper
|
||||||
minetest.register_craftitem("farming:pepper_red", {
|
|
||||||
|
core.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 = minetest.item_eat(4),
|
on_use = core.item_eat(4),
|
||||||
groups = {food_pepper = 1, flammable = 3, compostability = 55}
|
groups = {food_pepper = 1, compostability = 55}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
farming.add_eatable("farming:pepper_red", 4)
|
||||||
|
|
||||||
|
-- pepper to peppercorn recipe
|
||||||
|
|
||||||
|
core.register_craft({
|
||||||
output = "farming:peppercorn",
|
output = "farming:peppercorn",
|
||||||
recipe = {{"group:food_pepper"}}
|
recipe = {{"group:food_pepper"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- ground pepper
|
|
||||||
minetest.register_node("farming:pepper_ground", {
|
|
||||||
description = S("Ground Pepper"),
|
|
||||||
inventory_image = "crops_pepper_ground.png",
|
|
||||||
wield_image = "crops_pepper_ground.png",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.8,
|
|
||||||
paramtype = "light",
|
|
||||||
tiles = {"crops_pepper_ground.png"},
|
|
||||||
groups = {
|
|
||||||
vessel = 1, food_pepper_ground = 1,
|
|
||||||
dig_immediate = 3, attached_node = 1, compostability = 30
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:pepper_ground",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_peppercorn"},
|
|
||||||
{a.glass_bottle},
|
|
||||||
{a.mortar_pestle}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Pepper") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"crops_pepper_plant_1.png"},
|
tiles = {"crops_pepper_plant_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -94,60 +78,70 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:pepper_1", table.copy(def))
|
|
||||||
|
core.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"}
|
||||||
minetest.register_node("farming:pepper_2", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:pepper_3", table.copy(def))
|
core.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"}
|
||||||
minetest.register_node("farming:pepper_4", table.copy(def))
|
core.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 = {
|
||||||
max_items = 2, items = {
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:pepper_5", table.copy(def))
|
core.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 = {
|
||||||
max_items = 2, items = {
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:pepper_6", table.copy(def))
|
core.register_node("farming:pepper_6", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 7 (red pepper - final)
|
||||||
|
|
||||||
-- stage 7 (red pepper)
|
|
||||||
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 = {
|
||||||
max_items = 2, items = {
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:pepper_7", table.copy(def))
|
core.register_node("farming:pepper_7", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:pepper"] = {
|
farming.registered_plants["farming:pepper"] = {
|
||||||
crop = "farming:pepper",
|
crop = "farming:pepper",
|
||||||
seed = "farming:peppercorn",
|
seed = "farming:peppercorn",
|
||||||
@@ -157,16 +151,13 @@ farming.registered_plants["farming:pepper"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
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 = def.grow_on,
|
place_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,
|
||||||
@@ -176,9 +167,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 35,
|
||||||
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",
|
spawn_by = "group:tree", num_spawn_by = 1
|
||||||
num_spawn_by = 1
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- pineapple top
|
-- seed
|
||||||
minetest.register_craftitem("farming:pineapple_top", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- pineapple
|
-- item
|
||||||
minetest.register_node("farming:pineapple", {
|
|
||||||
|
core.register_node("farming:pineapple", {
|
||||||
description = S("Pineapple"),
|
description = S("Pineapple"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_pineapple.png"},
|
tiles = {"farming_pineapple.png"},
|
||||||
@@ -23,63 +25,20 @@ minetest.register_node("farming:pineapple", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed", fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27}
|
||||||
fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27}
|
|
||||||
},
|
},
|
||||||
groups = {
|
groups = {
|
||||||
food_pineapple = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
|
food_pineapple = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||||
compostability = 65
|
compostability = 65
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- pineapple
|
|
||||||
minetest.register_craftitem("farming:pineapple_ring", {
|
|
||||||
description = S("Pineapple Ring"),
|
|
||||||
inventory_image = "farming_pineapple_ring.png",
|
|
||||||
groups = {food_pineapple_ring = 1, flammable = 2, compostability = 45},
|
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:pineapple_ring 5",
|
|
||||||
recipe = {{"group:food_pineapple"}},
|
|
||||||
replacements = {{"farming:pineapple", "farming:pineapple_top"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- pineapple juice
|
|
||||||
minetest.register_craftitem("farming:pineapple_juice", {
|
|
||||||
description = S("Pineapple Juice"),
|
|
||||||
inventory_image = "farming_pineapple_juice.png",
|
|
||||||
on_use = minetest.item_eat(4, "vessels:drinking_glass"),
|
|
||||||
groups = {vessel = 1, drink = 1, compostability = 35}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pineapple_juice",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_pineapple_ring", "group:food_pineapple_ring",
|
|
||||||
"group:food_pineapple_ring"},
|
|
||||||
{"", a.drinking_glass, ""},
|
|
||||||
{"", a.juicer, ""}
|
|
||||||
},
|
},
|
||||||
replacements = {
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
{"group:food_juicer", "farming:juicer"}
|
is_ground_content = false
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pineapple_juice 2",
|
|
||||||
recipe = {
|
|
||||||
{a.drinking_glass, "group:food_pineapple", a.drinking_glass},
|
|
||||||
{"", a.juicer, ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_juicer", "farming:juicer"}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Pineapple") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
visual_scale = 1.5,
|
visual_scale = 1.5,
|
||||||
tiles = {"farming_pineapple_1.png"},
|
tiles = {"farming_pineapple_1.png"},
|
||||||
@@ -94,49 +53,60 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:pineapple_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:pineapple_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_2.png"}
|
def.tiles = {"farming_pineapple_2.png"}
|
||||||
minetest.register_node("farming:pineapple_2", table.copy(def))
|
core.register_node("farming:pineapple_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_3.png"}
|
def.tiles = {"farming_pineapple_3.png"}
|
||||||
minetest.register_node("farming:pineapple_3", table.copy(def))
|
core.register_node("farming:pineapple_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_4.png"}
|
def.tiles = {"farming_pineapple_4.png"}
|
||||||
minetest.register_node("farming:pineapple_4", table.copy(def))
|
core.register_node("farming:pineapple_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_5.png"}
|
def.tiles = {"farming_pineapple_5.png"}
|
||||||
minetest.register_node("farming:pineapple_5", table.copy(def))
|
core.register_node("farming:pineapple_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_6.png"}
|
def.tiles = {"farming_pineapple_6.png"}
|
||||||
minetest.register_node("farming:pineapple_6", table.copy(def))
|
core.register_node("farming:pineapple_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_7.png"}
|
def.tiles = {"farming_pineapple_7.png"}
|
||||||
minetest.register_node("farming:pineapple_7", table.copy(def))
|
core.register_node("farming:pineapple_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_pineapple_8.png"}
|
def.tiles = {"farming_pineapple_8.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 = {
|
items = {
|
||||||
{items = {"farming:pineapple"}, rarity = 1},
|
{items = {"farming:pineapple"}, rarity = 1},
|
||||||
{items = {"farming:pineapple"}, rarity = 2}
|
{items = {"farming:pineapple"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:pineapple_8", table.copy(def))
|
core.register_node("farming:pineapple_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:pineapple"] = {
|
farming.registered_plants["farming:pineapple"] = {
|
||||||
crop = "farming:pineapple",
|
crop = "farming:pineapple",
|
||||||
seed = "farming:pineapple_top",
|
seed = "farming:pineapple_top",
|
||||||
@@ -146,18 +116,19 @@ farming.registered_plants["farming:pineapple"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
local spawn_on = {
|
||||||
grow_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass",
|
"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass",
|
||||||
"default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass"},
|
"mcl_core:dirt_with_grass"
|
||||||
grow_near = mg and "group:sand" or nil,
|
|
||||||
num = mg and 1 or -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_decoration({
|
if farming.mapgen == "v6" then
|
||||||
|
spawn_on = {"default:dirt_with_grass"}
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = def.grow_on,
|
place_on = spawn_on,
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -167,9 +138,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 11,
|
y_min = 11, y_max = 30,
|
||||||
y_max = 30,
|
decoration = "farming:pineapple_8"
|
||||||
decoration = {"farming:pineapple_8"},
|
|
||||||
spawn_by = def.grow_near,
|
|
||||||
num_spawn_by = def.num
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,63 +1,42 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
Original textures from DocFarming mod
|
Original textures from DocFarming mod
|
||||||
https://forum.minetest.net/viewtopic.php?id=3948
|
https://forum.core.net/viewtopic.php?id=3948
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- potato
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:potato", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_potato = 1},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- 1 in 3 chance of being poisoned
|
-- 1 in 3 chance of being poisoned
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
|
||||||
if user then
|
if user then
|
||||||
|
|
||||||
if math.random(3) == 1 then
|
if math.random(3) == 1 then
|
||||||
return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing)
|
return core.do_item_eat(-1, nil, itemstack, user, pointed_thing)
|
||||||
else
|
else
|
||||||
return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing)
|
return core.do_item_eat(1, nil, itemstack, user, pointed_thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- baked potato
|
farming.add_eatable("farming:potato", 1)
|
||||||
minetest.register_craftitem("farming:baked_potato", {
|
|
||||||
description = S("Baked Potato"),
|
|
||||||
inventory_image = "farming_baked_potato.png",
|
|
||||||
on_use = minetest.item_eat(6)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
type = "cooking",
|
|
||||||
cooktime = 10,
|
|
||||||
output = "farming:baked_potato",
|
|
||||||
recipe = "group:food_potato"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Potato and cucumber Salad
|
|
||||||
minetest.register_craftitem("farming:potato_salad", {
|
|
||||||
description = S("Cucumber and Potato Salad"),
|
|
||||||
inventory_image = "farming_potato_salad.png",
|
|
||||||
on_use = minetest.item_eat(10, "farming:bowl")
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:potato_salad",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_cucumber"},
|
|
||||||
{"farming:baked_potato"},
|
|
||||||
{"group:food_bowl"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- potato definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Potato") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_potato_1.png"},
|
tiles = {"farming_potato_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -71,17 +50,22 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:potato_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:potato_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_potato_2.png"}
|
def.tiles = {"farming_potato_2.png"}
|
||||||
minetest.register_node("farming:potato_2", table.copy(def))
|
core.register_node("farming:potato_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_potato_3.png"}
|
def.tiles = {"farming_potato_3.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -89,21 +73,24 @@ def.drop = {
|
|||||||
{items = {"farming:potato"}, rarity = 3}
|
{items = {"farming:potato"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:potato_3", table.copy(def))
|
core.register_node("farming:potato_3", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 4 (final)
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
def.tiles = {"farming_potato_4.png"}
|
def.tiles = {"farming_potato_4.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 = {
|
items = {
|
||||||
{items = {"farming:potato 2"}, rarity = 1},
|
{items = {"farming:potato 2"}, rarity = 1},
|
||||||
{items = {"farming:potato 3"}, rarity = 2}
|
{items = {"farming:potato"}, rarity = 2},
|
||||||
|
{items = {"farming:potato"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:potato_4", table.copy(def))
|
core.register_node("farming:potato_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:potato"] = {
|
farming.registered_plants["farming:potato"] = {
|
||||||
crop = "farming:potato",
|
crop = "farming:potato",
|
||||||
seed = "farming:potato",
|
seed = "farming:potato",
|
||||||
@@ -113,9 +100,13 @@ farming.registered_plants["farming:potato"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "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,
|
||||||
@@ -125,7 +116,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 15,
|
y_min = 5, y_max = 40,
|
||||||
y_max = 40,
|
|
||||||
decoration = "farming:potato_3"
|
decoration = "farming:potato_3"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,152 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- pumpkin slice
|
-- seed
|
||||||
minetest.register_craftitem("farming:pumpkin_slice", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_pumpkin_slice = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
farming.add_eatable("farming:pumpkin_slice", 2)
|
||||||
output = "farming:pumpkin",
|
|
||||||
recipe = {
|
|
||||||
{"farming:pumpkin_slice", "farming:pumpkin_slice"},
|
|
||||||
{"farming:pumpkin_slice", "farming:pumpkin_slice"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
local tmp = farming.use_utensils and "farming:cutting_board" or ""
|
-- crop definition
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pumpkin_slice 4",
|
|
||||||
recipe = {{"farming:pumpkin", tmp}},
|
|
||||||
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- jack 'o lantern
|
|
||||||
minetest.register_node("farming:jackolantern", {
|
|
||||||
description = S("Jack 'O Lantern (punch to turn on and off)"),
|
|
||||||
tiles = {
|
|
||||||
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
|
||||||
"farming_pumpkin_bottom.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png^farming_pumpkin_face_off.png"
|
|
||||||
},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
|
||||||
on_punch = function(pos, node, puncher)
|
|
||||||
local name = puncher:get_player_name() or ""
|
|
||||||
if minetest.is_protected(pos, name) then return end
|
|
||||||
node.name = "farming:jackolantern_on"
|
|
||||||
minetest.swap_node(pos, node)
|
|
||||||
end,
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("farming:jackolantern_on", {
|
|
||||||
tiles = {
|
|
||||||
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
|
||||||
"farming_pumpkin_bottom.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png",
|
|
||||||
"farming_pumpkin_side.png^farming_pumpkin_face_on.png"
|
|
||||||
},
|
|
||||||
light_source = minetest.LIGHT_MAX - 1,
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2,
|
|
||||||
not_in_creative_inventory = 1
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
|
||||||
drop = "farming:jackolantern",
|
|
||||||
on_punch = function(pos, node, puncher)
|
|
||||||
local name = puncher:get_player_name() or ""
|
|
||||||
if minetest.is_protected(pos, name) then return end
|
|
||||||
node.name = "farming:jackolantern"
|
|
||||||
minetest.swap_node(pos, node)
|
|
||||||
end,
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:jackolantern",
|
|
||||||
recipe = {
|
|
||||||
{"default:torch"},
|
|
||||||
{"group:food_pumpkin"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
--- wooden scarecrow base
|
|
||||||
minetest.register_node("farming:scarecrow_bottom", {
|
|
||||||
description = S("Scarecrow Bottom"),
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
tiles = {"default_wood.png"},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
|
|
||||||
{-12/16, 4/16, -1/16, 12/16, 2/16, 1/16},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
groups = {axey = 1, handy = 1, snappy = 3, flammable = 2},
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:scarecrow_bottom",
|
|
||||||
recipe = {
|
|
||||||
{"", "group:stick", ""},
|
|
||||||
{"group:stick", "group:stick", "group:stick"},
|
|
||||||
{"", "group:stick", ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- pumpkin bread
|
|
||||||
minetest.register_craftitem("farming:pumpkin_bread", {
|
|
||||||
description = S("Pumpkin Bread"),
|
|
||||||
inventory_image = "farming_pumpkin_bread.png",
|
|
||||||
on_use = minetest.item_eat(8),
|
|
||||||
groups = {food_bread = 1, flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:pumpkin_dough", {
|
|
||||||
description = S("Pumpkin Dough"),
|
|
||||||
inventory_image = "farming_pumpkin_dough.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pumpkin_dough",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_pumpkin_slice", "group:food_flour", "group:food_pumpkin_slice"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "farming:pumpkin_bread",
|
|
||||||
recipe = "farming:pumpkin_dough",
|
|
||||||
cooktime = 10
|
|
||||||
})
|
|
||||||
|
|
||||||
-- pumpkin definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Pumpkin") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_pumpkin_1.png"},
|
tiles = {"farming_pumpkin_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -160,38 +33,48 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:pumpkin_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:pumpkin_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_2.png"}
|
def.tiles = {"farming_pumpkin_2.png"}
|
||||||
minetest.register_node("farming:pumpkin_2", table.copy(def))
|
core.register_node("farming:pumpkin_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_3.png"}
|
def.tiles = {"farming_pumpkin_3.png"}
|
||||||
minetest.register_node("farming:pumpkin_3", table.copy(def))
|
core.register_node("farming:pumpkin_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_4.png"}
|
def.tiles = {"farming_pumpkin_4.png"}
|
||||||
minetest.register_node("farming:pumpkin_4", table.copy(def))
|
core.register_node("farming:pumpkin_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_5.png"}
|
def.tiles = {"farming_pumpkin_5.png"}
|
||||||
minetest.register_node("farming:pumpkin_5", table.copy(def))
|
core.register_node("farming:pumpkin_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_6.png"}
|
def.tiles = {"farming_pumpkin_6.png"}
|
||||||
minetest.register_node("farming:pumpkin_6", table.copy(def))
|
core.register_node("farming:pumpkin_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_pumpkin_7.png"}
|
def.tiles = {"farming_pumpkin_7.png"}
|
||||||
minetest.register_node("farming:pumpkin_7", table.copy(def))
|
core.register_node("farming:pumpkin_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
minetest.register_node("farming:pumpkin_8", {
|
|
||||||
|
core.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",
|
||||||
@@ -202,17 +85,19 @@ minetest.register_node("farming:pumpkin_8", {
|
|||||||
food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
|
food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
|
||||||
flammable = 2, plant = 1, handy = 1
|
flammable = 2, plant = 1, handy = 1
|
||||||
},
|
},
|
||||||
|
is_ground_content = false,
|
||||||
drop = "farming:pumpkin_8",
|
drop = "farming:pumpkin_8",
|
||||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = minetest.rotate_node,
|
on_place = core.rotate_node,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_blast_resistance = 1
|
_mcl_blast_resistance = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
core.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:pumpkin"] = {
|
farming.registered_plants["farming:pumpkin"] = {
|
||||||
crop = "farming:pumpkin",
|
crop = "farming:pumpkin",
|
||||||
seed = "farming:pumpkin_slice",
|
seed = "farming:pumpkin_slice",
|
||||||
@@ -222,17 +107,13 @@ farming.registered_plants["farming:pumpkin"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
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 = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"},
|
place_on = {
|
||||||
|
"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,
|
||||||
@@ -242,9 +123,7 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 1,
|
y_min = 1, y_max = 3,
|
||||||
y_max = def.y_max,
|
|
||||||
decoration = "farming:pumpkin_8",
|
decoration = "farming:pumpkin_8",
|
||||||
spawn_by = def.near,
|
spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1
|
||||||
num_spawn_by = def.num
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,38 +1,28 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- raspberries
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:raspberries", {
|
|
||||||
|
core.register_craftitem("farming:raspberries", {
|
||||||
description = S("Raspberries"),
|
description = S("Raspberries"),
|
||||||
inventory_image = "farming_raspberries.png",
|
inventory_image = "farming_raspberries.png",
|
||||||
groups = {compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1,
|
groups = {
|
||||||
food_berry = 1, flammable = 2},
|
compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1,
|
||||||
|
food_berry = 1
|
||||||
|
},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- raspberry smoothie
|
farming.add_eatable("farming:raspberries", 1)
|
||||||
minetest.register_craftitem("farming:smoothie_raspberry", {
|
|
||||||
description = S("Raspberry Smoothie"),
|
|
||||||
inventory_image = "farming_raspberry_smoothie.png",
|
|
||||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
|
||||||
groups = {vessel = 1, drink = 1, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:smoothie_raspberry",
|
|
||||||
recipe = {
|
|
||||||
{a.snow},
|
|
||||||
{"group:food_raspberries"},
|
|
||||||
{a.drinking_glass}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- raspberries definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Raspberry") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_raspberry_1.png"},
|
tiles = {"farming_raspberry_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -45,21 +35,27 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:raspberry_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:raspberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_raspberry_2.png"}
|
def.tiles = {"farming_raspberry_2.png"}
|
||||||
minetest.register_node("farming:raspberry_2", table.copy(def))
|
core.register_node("farming:raspberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_raspberry_3.png"}
|
def.tiles = {"farming_raspberry_3.png"}
|
||||||
minetest.register_node("farming:raspberry_3", table.copy(def))
|
core.register_node("farming:raspberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_raspberry_4.png"}
|
def.tiles = {"farming_raspberry_4.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -70,9 +66,10 @@ def.drop = {
|
|||||||
{items = {"farming:raspberries"}, rarity = 3}
|
{items = {"farming:raspberries"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:raspberry_4", table.copy(def))
|
core.register_node("farming:raspberry_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:raspberries"] = {
|
farming.registered_plants["farming:raspberries"] = {
|
||||||
crop = "farming:raspberry",
|
crop = "farming:raspberry",
|
||||||
seed = "farming:raspberries",
|
seed = "farming:raspberries",
|
||||||
@@ -82,9 +79,12 @@ farming.registered_plants["farming:raspberries"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -94,7 +94,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 15,
|
||||||
y_max = 15,
|
|
||||||
decoration = "farming:raspberry_4"
|
decoration = "farming:raspberry_4"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,38 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- rhubarb
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:rhubarb", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_rhubarb = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- rhubarb pie
|
farming.add_eatable("farming:rhubarb", 1)
|
||||||
minetest.register_craftitem("farming:rhubarb_pie", {
|
|
||||||
description = S("Rhubarb Pie"),
|
|
||||||
inventory_image = "farming_rhubarb_pie.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:rhubarb_pie",
|
|
||||||
recipe = {
|
|
||||||
{a.baking_tray, "group:food_sugar", ""},
|
|
||||||
{"group:food_rhubarb", "group:food_rhubarb", "group:food_rhubarb"},
|
|
||||||
{"group:food_wheat", "group:food_wheat", "group:food_wheat"}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- rhubarb definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Rhubarb") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_rhubarb_1.png"},
|
tiles = {"farming_rhubarb_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -46,28 +33,35 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
minlight = 10,
|
minlight = 10,
|
||||||
maxlight = 12
|
maxlight = 12
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:rhubarb_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:rhubarb_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_rhubarb_2.png"}
|
def.tiles = {"farming_rhubarb_2.png"}
|
||||||
minetest.register_node("farming:rhubarb_2", table.copy(def))
|
core.register_node("farming:rhubarb_2", table.copy(def))
|
||||||
|
|
||||||
-- stage3
|
-- stage3
|
||||||
|
|
||||||
def.tiles = {"farming_rhubarb_3.png"}
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:rhubarb_3", table.copy(def))
|
core.register_node("farming:rhubarb_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4 (final)
|
-- stage 4 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_rhubarb_4.png"}
|
def.tiles = {"farming_rhubarb_4.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -78,9 +72,10 @@ def.drop = {
|
|||||||
{items = {"farming:rhubarb"}, rarity = 3}
|
{items = {"farming:rhubarb"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:rhubarb_4", table.copy(def))
|
core.register_node("farming:rhubarb_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:rhubarb"] = {
|
farming.registered_plants["farming:rhubarb"] = {
|
||||||
crop = "farming:rhubarb",
|
crop = "farming:rhubarb",
|
||||||
seed = "farming:rhubarb",
|
seed = "farming:rhubarb",
|
||||||
@@ -90,9 +85,12 @@ farming.registered_plants["farming:rhubarb"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -102,7 +100,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 3,
|
y_min = 3, y_max = 20,
|
||||||
y_max = 20,
|
|
||||||
decoration = "farming:rhubarb_3"
|
decoration = "farming:rhubarb_3"
|
||||||
})
|
})
|
||||||
|
|||||||
107
crops/rice.lua
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- rice seed
|
-- rice seed
|
||||||
minetest.register_node("farming:seed_rice", {
|
|
||||||
|
core.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",
|
||||||
@@ -13,67 +13,45 @@ minetest.register_node("farming:seed_rice", {
|
|||||||
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||||
flammable = 4, growing = 1
|
flammable = 4, growing = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:rice_1",
|
next_plant = "farming:rice_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_rice")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_rice")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:rice_1", param2 = 3})
|
core.set_node(pos, {name = "farming:rice_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- rice
|
-- rice item
|
||||||
minetest.register_craftitem("farming:rice", {
|
|
||||||
|
core.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},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- dry rice seed to give edible rice
|
-- dry rice seed to give edible rice
|
||||||
minetest.register_craft({
|
|
||||||
|
core.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
cooktime = 1,
|
cooktime = 1,
|
||||||
output = "farming:rice",
|
output = "farming:rice",
|
||||||
recipe = "farming:seed_rice"
|
recipe = "farming:seed_rice"
|
||||||
})
|
})
|
||||||
|
|
||||||
-- rice flour and bread
|
-- crop definition
|
||||||
minetest.register_craftitem("farming:rice_bread", {
|
|
||||||
description = S("Rice Bread"),
|
|
||||||
inventory_image = "farming_rice_bread.png",
|
|
||||||
on_use = minetest.item_eat(5),
|
|
||||||
groups = {food_rice_bread = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:rice_flour", {
|
|
||||||
description = S("Rice Flour"),
|
|
||||||
inventory_image = "farming_rice_flour.png",
|
|
||||||
groups = {food_rice_flour = 1, flammable = 1, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:rice_flour",
|
|
||||||
recipe = {
|
|
||||||
{"farming:rice", "farming:rice", "farming:rice"},
|
|
||||||
{"farming:rice", a.mortar_pestle, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 15,
|
|
||||||
output = "farming:rice_bread",
|
|
||||||
recipe = "farming:rice_flour"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- rice definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Rice") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_rice_1.png"},
|
tiles = {"farming_rice_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -89,67 +67,73 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:rice_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:rice_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_rice_2.png"}
|
def.tiles = {"farming_rice_2.png"}
|
||||||
minetest.register_node("farming:rice_2", table.copy(def))
|
core.register_node("farming:rice_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_rice_3.png"}
|
def.tiles = {"farming_rice_3.png"}
|
||||||
minetest.register_node("farming:rice_3", table.copy(def))
|
core.register_node("farming:rice_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_rice_4.png"}
|
def.tiles = {"farming_rice_4.png"}
|
||||||
minetest.register_node("farming:rice_4", table.copy(def))
|
core.register_node("farming:rice_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_rice_5.png"}
|
def.tiles = {"farming_rice_5.png"}
|
||||||
def.drop = {
|
core.register_node("farming:rice_5", table.copy(def))
|
||||||
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:rice"}, rarity = 2}
|
{items = {"farming:seed_rice"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:rice_6", table.copy(def))
|
core.register_node("farming:rice_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_rice_7.png"}
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:rice_7", table.copy(def))
|
core.register_node("farming:rice_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_rice_8.png"}
|
def.tiles = {"farming_rice_8.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 = {
|
items = {
|
||||||
{items = {"farming:seed_rice 2"}, rarity = 1},
|
{items = {"farming:seed_rice 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_rice 2"}, rarity = 2},
|
{items = {"farming:seed_rice"}, rarity = 2},
|
||||||
{items = {"farming:seed_rice"}, rarity = 3}
|
{items = {"farming:seed_rice"}, rarity = 3},
|
||||||
|
{items = {"farming:seed_rice"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:rice_8", table.copy(def))
|
core.register_node("farming:rice_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:rice"] = {
|
farming.registered_plants["farming:rice"] = {
|
||||||
crop = "farming:rice",
|
crop = "farming:rice",
|
||||||
seed = "farming:seed_rice",
|
seed = "farming:seed_rice",
|
||||||
@@ -157,16 +141,3 @@ farming.registered_plants["farming:rice"] = {
|
|||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 8
|
steps = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
-- fuels
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:rice",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:rice_bread",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|||||||
54
crops/rye_oat.lua
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
|
||||||
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
|
--= A nice addition from Ademant's grain mod :)
|
||||||
|
|
||||||
|
-- Rye
|
||||||
|
|
||||||
|
farming.register_plant("farming:rye", {
|
||||||
|
description = S("Rye seed"),
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
|
inventory_image = "farming_rye_seed.png",
|
||||||
|
steps = 8,
|
||||||
|
place_param2 = 3
|
||||||
|
})
|
||||||
|
|
||||||
|
-- override rye item
|
||||||
|
|
||||||
|
core.override_item("farming:rye", {
|
||||||
|
description = S("Rye"),
|
||||||
|
groups = {food_rye = 1, flammable = 4, compostability = 65}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- override rye crop
|
||||||
|
|
||||||
|
core.override_item("farming:rye_1", {drop = {}})
|
||||||
|
core.override_item("farming:rye_2", {drop = {}})
|
||||||
|
core.override_item("farming:rye_3", {drop = {}})
|
||||||
|
core.override_item("farming:rye_4", {drop = {}})
|
||||||
|
core.override_item("farming:rye_5", {drop = {}})
|
||||||
|
|
||||||
|
-- Oats
|
||||||
|
|
||||||
|
farming.register_plant("farming:oat", {
|
||||||
|
description = S("Oat seed"),
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
|
inventory_image = "farming_oat_seed.png",
|
||||||
|
steps = 8,
|
||||||
|
place_param2 = 3
|
||||||
|
})
|
||||||
|
|
||||||
|
-- override oat item
|
||||||
|
|
||||||
|
core.override_item("farming:oat", {
|
||||||
|
description = S("Oats"),
|
||||||
|
groups = {food_oats = 1, flammable = 4, compostability = 65}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- override oat crop
|
||||||
|
|
||||||
|
core.override_item("farming:oat_1", {drop = {}})
|
||||||
|
core.override_item("farming:oat_2", {drop = {}})
|
||||||
|
core.override_item("farming:oat_3", {drop = {}})
|
||||||
|
core.override_item("farming:oat_4", {drop = {}})
|
||||||
|
core.override_item("farming:oat_5", {drop = {}})
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
--= A nice addition from Ademant's grain mod :)
|
|
||||||
|
|
||||||
-- Rye
|
|
||||||
|
|
||||||
farming.register_plant("farming:rye", {
|
|
||||||
description = S("Rye seed"),
|
|
||||||
paramtype2 = "meshoptions",
|
|
||||||
inventory_image = "farming_rye_seed.png",
|
|
||||||
steps = 8,
|
|
||||||
place_param2 = 3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("farming:rye", {
|
|
||||||
description = S("Rye"),
|
|
||||||
groups = {food_rye = 1, flammable = 4, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("farming:rye_1", {drop = {}})
|
|
||||||
minetest.override_item("farming:rye_2", {drop = {}})
|
|
||||||
minetest.override_item("farming:rye_3", {drop = {}})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:flour",
|
|
||||||
recipe = {
|
|
||||||
{"farming:rye", "farming:rye", "farming:rye"},
|
|
||||||
{"farming:rye", a.mortar_pestle, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Oats
|
|
||||||
|
|
||||||
farming.register_plant("farming:oat", {
|
|
||||||
description = S("Oat seed"),
|
|
||||||
paramtype2 = "meshoptions",
|
|
||||||
inventory_image = "farming_oat_seed.png",
|
|
||||||
steps = 8,
|
|
||||||
place_param2 = 3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("farming:oat", {
|
|
||||||
description = S("Oats"),
|
|
||||||
groups = {food_oats = 1, flammable = 4, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("farming:oat_1", {drop = {}})
|
|
||||||
minetest.override_item("farming:oat_2", {drop = {}})
|
|
||||||
minetest.override_item("farming:oat_3", {drop = {}})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:flour",
|
|
||||||
recipe = {
|
|
||||||
{"farming:oat", "farming:oat", "farming:oat"},
|
|
||||||
{"farming:oat", a.mortar_pestle, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Multigrain flour
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:flour_multigrain", {
|
|
||||||
description = S("Multigrain Flour"),
|
|
||||||
inventory_image = "farming_flour_multigrain.png",
|
|
||||||
groups = {food_flour = 1, flammable = 1},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "farming:flour_multigrain",
|
|
||||||
recipe = {
|
|
||||||
"group:food_wheat", "group:food_barley", "group:food_oats",
|
|
||||||
"group:food_rye", a.mortar_pestle
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Multigrain bread
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:bread_multigrain", {
|
|
||||||
description = S("Multigrain Bread"),
|
|
||||||
inventory_image = "farming_bread_multigrain.png",
|
|
||||||
on_use = minetest.item_eat(7),
|
|
||||||
groups = {food_bread = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 15,
|
|
||||||
output = "farming:bread_multigrain",
|
|
||||||
recipe = "farming:flour_multigrain"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Fuels
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:bread_multigrain",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:rye",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:oat",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
169
crops/soy.lua
@@ -1,121 +1,26 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- soy pod
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:soy_pod", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:soy_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:soy_1")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- replacement for soy beans that was removed
|
-- replacement for soy beans that was removed
|
||||||
minetest.register_alias("farming:soy_beans", "farming:soy_pod")
|
|
||||||
|
|
||||||
-- soy sauce
|
core.register_alias("farming:soy_beans", "farming:soy_pod")
|
||||||
minetest.register_node("farming:soy_sauce", {
|
|
||||||
description = S("Soy Sauce"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_soy_sauce.png"},
|
|
||||||
inventory_image = "farming_soy_sauce.png",
|
|
||||||
wield_image = "farming_soy_sauce.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
vessel = 1, food_soy_sauce = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
compostability = 65
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
-- soy sauce recipe
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:soy_sauce",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_soy", "group:food_salt", "group:food_soy"},
|
|
||||||
{a.juicer, a.bucket_water, a.glass_bottle}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{a.bucket_water, a.bucket_empty},
|
|
||||||
{"group:food_juicer", "farming:juicer"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- soy milk
|
|
||||||
minetest.register_node("farming:soy_milk", {
|
|
||||||
description = S("Soy Milk"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_soy_milk_glass.png"},
|
|
||||||
inventory_image = "farming_soy_milk_glass.png",
|
|
||||||
wield_image = "farming_soy_milk_glass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
|
||||||
},
|
|
||||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
|
||||||
groups = {
|
|
||||||
vessel = 1, food_milk_glass = 1, dig_immediate = 3,
|
|
||||||
attached_node = 1, drink = 1, compostability = 65
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:soy_milk",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_soy", "group:food_soy", "group:food_soy"},
|
|
||||||
{"farming:vanilla_extract", "bucket:bucket_water", a.drinking_glass}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{a.bucket_water, a.bucket_empty},
|
|
||||||
{"farming:vanilla_extract", a.glass_bottle}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- tofu
|
|
||||||
minetest.register_craftitem("farming:tofu", {
|
|
||||||
description = S("Tofu"),
|
|
||||||
inventory_image = "farming_tofu.png",
|
|
||||||
groups = {food_tofu = 1, food_meat_raw = 1, flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(3)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:tofu",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_soy", "group:food_soy", "group:food_soy"},
|
|
||||||
{"group:food_soy", "group:food_soy", a.baking_tray}
|
|
||||||
},
|
|
||||||
replacements = {{"farming:baking_tray", "farming:baking_tray"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cooked tofu
|
|
||||||
minetest.register_craftitem("farming:tofu_cooked", {
|
|
||||||
description = S("Cooked Tofu"),
|
|
||||||
inventory_image = "farming_tofu_cooked.png",
|
|
||||||
groups = {food_meat = 1, flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(6)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "farming:tofu_cooked",
|
|
||||||
recipe = "farming:tofu",
|
|
||||||
cooktime = 5
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Soy") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_soy_1.png"},
|
tiles = {"farming_soy_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -131,60 +36,68 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:soy_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:soy_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_soy_2.png"}
|
def.tiles = {"farming_soy_2.png"}
|
||||||
minetest.register_node("farming:soy_2", table.copy(def))
|
core.register_node("farming:soy_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_soy_3.png"}
|
def.tiles = {"farming_soy_3.png"}
|
||||||
minetest.register_node("farming:soy_3", table.copy(def))
|
core.register_node("farming:soy_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_soy_4.png"}
|
def.tiles = {"farming_soy_4.png"}
|
||||||
minetest.register_node("farming:soy_4", table.copy(def))
|
core.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 = {
|
||||||
max_items = 1, items = {
|
items = {
|
||||||
{items = {"farming:soy_pod"}, rarity = 1},
|
{items = {"farming:soy_pod"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:soy_5", table.copy(def))
|
core.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 = {
|
||||||
max_items = 3, items = {
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:soy_6", table.copy(def))
|
core.register_node("farming:soy_6", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 7 (final)
|
||||||
|
|
||||||
-- stage 7
|
|
||||||
def.tiles = {"farming_soy_7.png"}
|
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 = {
|
||||||
max_items = 5, items = {
|
items = {
|
||||||
{items = {"farming:soy_pod"}, rarity = 1},
|
{items = {"farming:soy_pod 2"}, 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}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:soy_7", table.copy(def))
|
core.register_node("farming:soy_7", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:soy_pod"] = {
|
farming.registered_plants["farming:soy_pod"] = {
|
||||||
crop = "farming:soy",
|
crop = "farming:soy",
|
||||||
seed = "farming:soy_pod",
|
seed = "farming:soy_pod",
|
||||||
@@ -194,17 +107,14 @@ farming.registered_plants["farming:soy_pod"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
local mg = farming.mapgen == "v6"
|
|
||||||
|
|
||||||
def = {
|
core.register_decoration({
|
||||||
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 = def.spawn_on,
|
place_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,
|
||||||
@@ -214,7 +124,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 20,
|
y_min = 20, y_max = 50,
|
||||||
y_max = 50,
|
|
||||||
decoration = "farming:soy_6"
|
decoration = "farming:soy_6"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- spinach
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:spinach", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_spinach = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- definition
|
farming.add_eatable("farming:spinach", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Spinach") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_spinach_1.png"},
|
tiles = {"farming_spinach_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -27,17 +33,22 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:spinach_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:spinach_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_spinach_2.png"}
|
def.tiles = {"farming_spinach_2.png"}
|
||||||
minetest.register_node("farming:spinach_2", table.copy(def))
|
core.register_node("farming:spinach_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_spinach_3.png"}
|
def.tiles = {"farming_spinach_3.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -45,46 +56,48 @@ def.drop = {
|
|||||||
{items = {"farming:spinach"}, rarity = 3}
|
{items = {"farming:spinach"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:spinach_3", table.copy(def))
|
core.register_node("farming:spinach_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_spinach_4.png"}
|
def.tiles = {"farming_spinach_4.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 = {
|
items = {
|
||||||
{items = {"farming:spinach 2"}, rarity = 1},
|
{items = {"farming:spinach 2"}, rarity = 1},
|
||||||
{items = {"farming:spinach 2"}, rarity = 2},
|
{items = {"farming:spinach"}, rarity = 2},
|
||||||
{items = {"farming:spinach 2"}, rarity = 3}
|
{items = {"farming:spinach"}, rarity = 3},
|
||||||
|
{items = {"farming:spinach"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:spinach_4", table.copy(def))
|
core.register_node("farming:spinach_4", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:spinach"] = {
|
farming.registered_plants["farming:spinach"] = {
|
||||||
crop = "farming:spinach",
|
crop = "farming:spinach",
|
||||||
seed = "farming:spinach",
|
seed = "farming:spinach",
|
||||||
minlight = 7,
|
minlight = farming.min_light,
|
||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 4
|
steps = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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.1,
|
offset = 0,
|
||||||
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
|
||||||
},
|
},
|
||||||
biomes = {"deciduous_forest"},
|
y_min = 1, y_max = 100,
|
||||||
y_max = 31000,
|
decoration = "farming:spinach_3",
|
||||||
y_min = 1,
|
|
||||||
decoration = "farming:spinach_4",
|
|
||||||
param2 = 3
|
param2 = 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- Strawberry (can also be planted as seed)
|
-- item/seed
|
||||||
minetest.register_craftitem(":ethereal:strawberry", {
|
|
||||||
|
core.register_craftitem(":ethereal:strawberry", {
|
||||||
description = S("Strawberry"),
|
description = S("Strawberry"),
|
||||||
inventory_image = "ethereal_strawberry.png",
|
inventory_image = "ethereal_strawberry.png",
|
||||||
groups = {
|
groups = {compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1},
|
||||||
compostability = 48, seed = 2, food_strawberry = 1, food_berry = 1, flammable = 2
|
on_use = core.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")
|
||||||
end,
|
end,
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Define Strawberry Bush growth stages
|
farming.add_eatable("ethereal:strawberry", 1)
|
||||||
|
|
||||||
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Strawberry") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"ethereal_strawberry_1.png"},
|
tiles = {"ethereal_strawberry_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -32,61 +36,68 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
--stage 1
|
--stage 1
|
||||||
minetest.register_node(":ethereal:strawberry_1", table.copy(def))
|
|
||||||
|
core.register_node(":ethereal:strawberry_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_2.png"}
|
def.tiles = {"ethereal_strawberry_2.png"}
|
||||||
minetest.register_node(":ethereal:strawberry_2", table.copy(def))
|
core.register_node(":ethereal:strawberry_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_3.png"}
|
def.tiles = {"ethereal_strawberry_3.png"}
|
||||||
minetest.register_node(":ethereal:strawberry_3", table.copy(def))
|
core.register_node(":ethereal:strawberry_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_4.png"}
|
def.tiles = {"ethereal_strawberry_4.png"}
|
||||||
minetest.register_node(":ethereal:strawberry_4", table.copy(def))
|
core.register_node(":ethereal:strawberry_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_5.png"}
|
def.tiles = {"ethereal_strawberry_5.png"}
|
||||||
minetest.register_node(":ethereal:strawberry_5", table.copy(def))
|
core.register_node(":ethereal:strawberry_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"ethereal_strawberry_6.png"}
|
def.tiles = {"ethereal_strawberry_6.png"}
|
||||||
def.drop = {
|
core.register_node(":ethereal:strawberry_6", table.copy(def))
|
||||||
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 1"}, rarity = 1},
|
{items = {"ethereal:strawberry"}, rarity = 1},
|
||||||
{items = {"ethereal:strawberry 2"}, rarity = 3}
|
{items = {"ethereal:strawberry"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node(":ethereal:strawberry_7", table.copy(def))
|
core.register_node(":ethereal:strawberry_7", table.copy(def))
|
||||||
|
|
||||||
|
-- stage 8 (final)
|
||||||
|
|
||||||
-- stage 8
|
|
||||||
def.tiles = {"ethereal_strawberry_8.png"}
|
def.tiles = {"ethereal_strawberry_8.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 = {
|
items = {
|
||||||
{items = {"ethereal:strawberry 2"}, rarity = 1},
|
{items = {"ethereal:strawberry 2"}, rarity = 1},
|
||||||
{items = {"ethereal:strawberry 3"}, rarity = 3}
|
{items = {"ethereal:strawberry"}, rarity = 2},
|
||||||
|
{items = {"ethereal:strawberry"}, rarity = 3},
|
||||||
|
{items = {"ethereal:strawberry"}, rarity = 4},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node(":ethereal:strawberry_8", table.copy(def))
|
core.register_node(":ethereal:strawberry_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["ethereal:strawberry"] = {
|
farming.registered_plants["ethereal:strawberry"] = {
|
||||||
crop = "ethereal:strawberry",
|
crop = "ethereal:strawberry",
|
||||||
seed = "ethereal:strawberry",
|
seed = "ethereal:strawberry",
|
||||||
@@ -96,9 +107,12 @@ farming.registered_plants["ethereal:strawberry"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -108,7 +122,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 20,
|
y_min = 15, y_max = 55,
|
||||||
y_max = 55,
|
|
||||||
decoration = "ethereal:strawberry_7"
|
decoration = "ethereal:strawberry_7"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- sunflower
|
-- seed
|
||||||
minetest.register_craftitem("farming:sunflower", {
|
|
||||||
description = S("Sunflower"),
|
|
||||||
inventory_image = "farming_sunflower.png",
|
|
||||||
groups = {flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- sunflower seeds
|
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",
|
||||||
@@ -20,104 +13,49 @@ minetest.register_node("farming:seed_sunflower", {
|
|||||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
||||||
handy = 1, food_sunflower_seeds = 1, flammable = 2
|
handy = 1, food_sunflower_seeds = 1, flammable = 2
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:sunflower_1",
|
next_plant = "farming:sunflower_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_sunflower")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_sunflower")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:sunflower_1", param2 = 1})
|
core.set_node(pos, {name = "farming:sunflower_1", param2 = 1})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("farming:sunflower_seeds", "farming:seed_sunflower")
|
core.register_alias("farming:sunflower_seeds", "farming:seed_sunflower")
|
||||||
|
|
||||||
minetest.register_craft({
|
-- item
|
||||||
|
|
||||||
|
core.register_craftitem("farming:sunflower", {
|
||||||
|
description = S("Sunflower"),
|
||||||
|
inventory_image = "farming_sunflower.png",
|
||||||
|
groups = {flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- turn item into seeds
|
||||||
|
|
||||||
|
core.register_craft({
|
||||||
output = "farming:seed_sunflower 5",
|
output = "farming:seed_sunflower 5",
|
||||||
recipe = {{"farming:sunflower"}}
|
recipe = {{"farming:sunflower"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- sunflower seeds (toasted)
|
-- crop definition
|
||||||
minetest.register_craftitem("farming:sunflower_seeds_toasted", {
|
|
||||||
description = S("Toasted Sunflower Seeds"),
|
|
||||||
inventory_image = "farming_sunflower_seeds_toasted.png",
|
|
||||||
groups = {food_sunflower_seeds_toasted = 1, flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 10,
|
|
||||||
output = "farming:sunflower_seeds_toasted",
|
|
||||||
recipe = "farming:seed_sunflower"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- sunflower oil
|
|
||||||
minetest.register_node("farming:sunflower_oil", {
|
|
||||||
description = S("Bottle of Sunflower Oil"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_sunflower_oil.png"},
|
|
||||||
inventory_image = "farming_sunflower_oil.png",
|
|
||||||
wield_image = "farming_sunflower_oil.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
|
||||||
flammable = 2, compostability = 65
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:sunflower_oil",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_sunflower_seeds", "group:food_sunflower_seeds", "group:food_sunflower_seeds"},
|
|
||||||
{"group:food_sunflower_seeds", "group:food_sunflower_seeds", "group:food_sunflower_seeds"},
|
|
||||||
{"group:food_sunflower_seeds", a.glass_bottle, "group:food_sunflower_seeds"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:sunflower_oil",
|
|
||||||
burntime = 30,
|
|
||||||
replacements = {{"farming:sunflower_oil", a.glass_bottle}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- sunflower seed bread
|
|
||||||
minetest.register_craftitem("farming:sunflower_bread", {
|
|
||||||
description = S("Sunflower Seed Bread"),
|
|
||||||
inventory_image = "farming_sunflower_bread.png",
|
|
||||||
on_use = minetest.item_eat(8),
|
|
||||||
groups = {food_bread = 1, flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:sunflower_bread",
|
|
||||||
recipe = {
|
|
||||||
{
|
|
||||||
"group:food_sunflower_seeds_toasted",
|
|
||||||
"group:food_bread",
|
|
||||||
"group:food_sunflower_seeds_toasted"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- sunflower definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Sunflower") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_sunflower_1.png"},
|
tiles = {"farming_sunflower_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true, minlight = 14,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
@@ -127,38 +65,48 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:sunflower_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:sunflower_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_2.png"}
|
def.tiles = {"farming_sunflower_2.png"}
|
||||||
minetest.register_node("farming:sunflower_2", table.copy(def))
|
core.register_node("farming:sunflower_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_3.png"}
|
def.tiles = {"farming_sunflower_3.png"}
|
||||||
minetest.register_node("farming:sunflower_3", table.copy(def))
|
core.register_node("farming:sunflower_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_4.png"}
|
def.tiles = {"farming_sunflower_4.png"}
|
||||||
minetest.register_node("farming:sunflower_4", table.copy(def))
|
core.register_node("farming:sunflower_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_5.png"}
|
def.tiles = {"farming_sunflower_5.png"}
|
||||||
minetest.register_node("farming:sunflower_5", table.copy(def))
|
core.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
|
||||||
minetest.register_node("farming:sunflower_6", table.copy(def))
|
core.register_node("farming:sunflower_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_7.png"}
|
def.tiles = {"farming_sunflower_7.png"}
|
||||||
minetest.register_node("farming:sunflower_7", table.copy(def))
|
core.register_node("farming:sunflower_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_sunflower_8.png"}
|
def.tiles = {"farming_sunflower_8.png"}
|
||||||
def.groups.growing = nil
|
def.groups.growing = nil
|
||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
@@ -168,9 +116,10 @@ def.drop = {
|
|||||||
{items = {"farming:sunflower"}, rarity = 6}
|
{items = {"farming:sunflower"}, rarity = 6}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:sunflower_8", table.copy(def))
|
core.register_node("farming:sunflower_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:sunflower"] = {
|
farming.registered_plants["farming:sunflower"] = {
|
||||||
crop = "farming:sunflower",
|
crop = "farming:sunflower",
|
||||||
seed = "farming:seed_sunflower",
|
seed = "farming:seed_sunflower",
|
||||||
@@ -180,9 +129,12 @@ farming.registered_plants["farming:sunflower"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -192,7 +144,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 10,
|
y_min = 10, y_max = 40,
|
||||||
y_max = 40,
|
|
||||||
decoration = "farming:sunflower_8"
|
decoration = "farming:sunflower_8"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,38 +4,27 @@
|
|||||||
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 = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
-- tomato
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:tomato", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 45, seed = 2, food_tomato = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(4)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- tomato soup
|
farming.add_eatable("farming:tomato", 4)
|
||||||
minetest.register_craftitem("farming:tomato_soup", {
|
|
||||||
description = S("Tomato Soup"),
|
|
||||||
inventory_image = "farming_tomato_soup.png",
|
|
||||||
groups = {flammable = 2, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(8, "farming:bowl")
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- crop definition
|
||||||
output = "farming:tomato_soup",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_tomato"},
|
|
||||||
{"group:food_tomato"},
|
|
||||||
{"group:food_bowl"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- tomato definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Tomato") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_tomato_1.png"},
|
tiles = {"farming_tomato_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -49,33 +38,42 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:tomato_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:tomato_1", table.copy(def))
|
||||||
|
|
||||||
-- stage2
|
-- stage2
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_2.png"}
|
def.tiles = {"farming_tomato_2.png"}
|
||||||
minetest.register_node("farming:tomato_2", table.copy(def))
|
core.register_node("farming:tomato_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_3.png"}
|
def.tiles = {"farming_tomato_3.png"}
|
||||||
minetest.register_node("farming:tomato_3", table.copy(def))
|
core.register_node("farming:tomato_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_4.png"}
|
def.tiles = {"farming_tomato_4.png"}
|
||||||
minetest.register_node("farming:tomato_4", table.copy(def))
|
core.register_node("farming:tomato_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_5.png"}
|
def.tiles = {"farming_tomato_5.png"}
|
||||||
minetest.register_node("farming:tomato_5", table.copy(def))
|
core.register_node("farming:tomato_5", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 6
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_6.png"}
|
def.tiles = {"farming_tomato_6.png"}
|
||||||
minetest.register_node("farming:tomato_6", table.copy(def))
|
core.register_node("farming:tomato_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_7.png"}
|
def.tiles = {"farming_tomato_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
@@ -83,22 +81,25 @@ def.drop = {
|
|||||||
{items = {"farming:tomato"}, rarity = 3}
|
{items = {"farming:tomato"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:tomato_7", table.copy(def))
|
core.register_node("farming:tomato_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_tomato_8.png"}
|
def.tiles = {"farming_tomato_8.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 = {
|
items = {
|
||||||
{items = {"farming:tomato 3"}, rarity = 1},
|
{items = {"farming:tomato 2"}, rarity = 1},
|
||||||
{items = {"farming:tomato 2"}, rarity = 2},
|
{items = {"farming:tomato"}, rarity = 2},
|
||||||
{items = {"farming:tomato 1"}, rarity = 3}
|
{items = {"farming:tomato"}, rarity = 3},
|
||||||
|
{items = {"farming:tomato"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:tomato_8", table.copy(def))
|
core.register_node("farming:tomato_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:tomato"] = {
|
farming.registered_plants["farming:tomato"] = {
|
||||||
crop = "farming:tomato",
|
crop = "farming:tomato",
|
||||||
seed = "farming:tomato",
|
seed = "farming:tomato",
|
||||||
@@ -108,9 +109,12 @@ farming.registered_plants["farming:tomato"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:prairie_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -120,7 +124,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 25,
|
||||||
y_max = 25,
|
|
||||||
decoration = "farming:tomato_7"
|
decoration = "farming:tomato_7"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- vanilla
|
-- item/seed
|
||||||
minetest.register_craftitem("farming:vanilla", {
|
|
||||||
|
core.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, flammable = 2},
|
groups = {compostability = 48, seed = 2, food_vanilla = 1},
|
||||||
|
on_use = core.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")
|
||||||
end,
|
end
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
farming.add_eatable("farming:vanilla", 1)
|
||||||
|
|
||||||
-- crop definition
|
-- crop definition
|
||||||
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Vanilla") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_vanilla_1.png"},
|
tiles = {"farming_vanilla_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -28,95 +33,69 @@ local def = {
|
|||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- vanilla extract
|
|
||||||
minetest.register_node("farming:vanilla_extract", {
|
|
||||||
description = S("Vanilla Extract"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_vanilla_extract.png"},
|
|
||||||
inventory_image = "farming_vanilla_extract.png",
|
|
||||||
wield_image = "farming_vanilla_extract.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "farming:vanilla_extract",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_vanilla", "group:food_vanilla", "group:food_vanilla"},
|
|
||||||
{"group:food_vanilla", "farming:bottle_ethanol", "group:food_glass_water"},
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_glass_water", a.drinking_glass}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:vanilla_extract",
|
|
||||||
burntime = 25,
|
|
||||||
replacements = {{"farming:vanilla_extract", a.glass_bottle}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:vanilla_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:vanilla_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_2.png"}
|
def.tiles = {"farming_vanilla_2.png"}
|
||||||
minetest.register_node("farming:vanilla_2", table.copy(def))
|
core.register_node("farming:vanilla_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_3.png"}
|
def.tiles = {"farming_vanilla_3.png"}
|
||||||
minetest.register_node("farming:vanilla_3", table.copy(def))
|
core.register_node("farming:vanilla_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_4.png"}
|
def.tiles = {"farming_vanilla_4.png"}
|
||||||
minetest.register_node("farming:vanilla_4", table.copy(def))
|
core.register_node("farming:vanilla_4", table.copy(def))
|
||||||
|
|
||||||
-- stage 5
|
-- stage 5
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_5.png"}
|
def.tiles = {"farming_vanilla_5.png"}
|
||||||
minetest.register_node("farming:vanilla_5", table.copy(def))
|
core.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
|
||||||
minetest.register_node("farming:vanilla_6", table.copy(def))
|
core.register_node("farming:vanilla_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
-- stage 7
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_7.png"}
|
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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:vanilla_7", table.copy(def))
|
core.register_node("farming:vanilla_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_vanilla_8.png"}
|
def.tiles = {"farming_vanilla_8.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 = {
|
items = {
|
||||||
{items = {"farming:vanilla 2"}, rarity = 1},
|
{items = {"farming:vanilla 2"}, rarity = 1},
|
||||||
{items = {"farming:vanilla 2"}, rarity = 2},
|
{items = {"farming:vanilla"}, rarity = 2},
|
||||||
{items = {"farming:vanilla 2"}, rarity = 2},
|
{items = {"farming:vanilla"}, rarity = 3},
|
||||||
{items = {"farming:vanilla 2"}, rarity = 3}
|
{items = {"farming:vanilla"}, rarity = 4}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:vanilla_8", table.copy(def))
|
core.register_node("farming:vanilla_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:vanilla"] = {
|
farming.registered_plants["farming:vanilla"] = {
|
||||||
crop = "farming:vanilla",
|
crop = "farming:vanilla",
|
||||||
seed = "farming:vanilla",
|
seed = "farming:vanilla",
|
||||||
@@ -126,9 +105,12 @@ farming.registered_plants["farming:vanilla"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- mapgen
|
-- mapgen
|
||||||
minetest.register_decoration({
|
|
||||||
|
core.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", "ethereal:grove_dirt"
|
||||||
|
},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@@ -138,7 +120,6 @@ minetest.register_decoration({
|
|||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
y_min = 5,
|
y_min = 5, y_max = 35,
|
||||||
y_max = 35,
|
|
||||||
decoration = "farming:vanilla_7"
|
decoration = "farming:vanilla_7"
|
||||||
})
|
})
|
||||||
|
|||||||
166
crops/wheat.lua
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- wheat seeds
|
-- seed
|
||||||
minetest.register_node("farming:seed_wheat", {
|
|
||||||
|
core.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",
|
||||||
@@ -12,106 +12,36 @@ minetest.register_node("farming:seed_wheat", {
|
|||||||
groups = {
|
groups = {
|
||||||
handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1
|
handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = farming.select,
|
selection_box = farming.select,
|
||||||
next_plant = "farming:wheat_1",
|
next_plant = "farming:wheat_1",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_wheat")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_wheat")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
minetest.set_node(pos, {name = "farming:wheat_1", param2 = 3})
|
core.set_node(pos, {name = "farming:wheat_1", param2 = 3})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- harvested wheat
|
-- item
|
||||||
minetest.register_craftitem("farming:wheat", {
|
|
||||||
|
core.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}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- straw
|
-- crop definition
|
||||||
minetest.register_node("farming:straw", {
|
|
||||||
description = S("Straw"),
|
|
||||||
tiles = {"farming_straw.png"},
|
|
||||||
is_ground_content = false,
|
|
||||||
groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30},
|
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:straw 3",
|
|
||||||
recipe = {
|
|
||||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
||||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
||||||
{"farming:wheat", "farming:wheat", "farming:wheat"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:wheat 3",
|
|
||||||
recipe = {{"farming:straw"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- check and register stairs
|
|
||||||
if minetest.global_exists("stairs") then
|
|
||||||
|
|
||||||
if stairs.mod and stairs.mod == "redo" then
|
|
||||||
|
|
||||||
stairs.register_all("straw", "farming:straw",
|
|
||||||
{snappy = 3, flammable = 4},
|
|
||||||
{"farming_straw.png"},
|
|
||||||
"Straw",
|
|
||||||
farming.sounds.node_sound_leaves_defaults())
|
|
||||||
else
|
|
||||||
|
|
||||||
stairs.register_stair_and_slab("straw", "farming:straw",
|
|
||||||
{snappy = 3, flammable = 4},
|
|
||||||
{"farming_straw.png"},
|
|
||||||
"Straw Stair",
|
|
||||||
"Straw Slab",
|
|
||||||
farming.sounds.node_sound_leaves_defaults())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- flour
|
|
||||||
minetest.register_craftitem("farming:flour", {
|
|
||||||
description = S("Flour"),
|
|
||||||
inventory_image = "farming_flour.png",
|
|
||||||
groups = {food_flour = 1, flammable = 1}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:flour",
|
|
||||||
recipe = {
|
|
||||||
{"farming:wheat", "farming:wheat", "farming:wheat"},
|
|
||||||
{"farming:wheat", a.mortar_pestle, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- bread
|
|
||||||
minetest.register_craftitem("farming:bread", {
|
|
||||||
description = S("Bread"),
|
|
||||||
inventory_image = "farming_bread.png",
|
|
||||||
on_use = minetest.item_eat(5),
|
|
||||||
groups = {food_bread = 1, flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 15,
|
|
||||||
output = "farming:bread",
|
|
||||||
recipe = "farming:flour"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- wheat definition
|
|
||||||
local def = {
|
local def = {
|
||||||
|
description = S("Wheat") .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = {"farming_wheat_1.png"},
|
tiles = {"farming_wheat_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@@ -127,71 +57,74 @@ local def = {
|
|||||||
snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
||||||
not_in_creative_inventory = 1, growing = 1
|
not_in_creative_inventory = 1, growing = 1
|
||||||
},
|
},
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- stage 1
|
-- stage 1
|
||||||
minetest.register_node("farming:wheat_1", table.copy(def))
|
|
||||||
|
core.register_node("farming:wheat_1", table.copy(def))
|
||||||
|
|
||||||
-- stage 2
|
-- stage 2
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_2.png"}
|
def.tiles = {"farming_wheat_2.png"}
|
||||||
minetest.register_node("farming:wheat_2", table.copy(def))
|
core.register_node("farming:wheat_2", table.copy(def))
|
||||||
|
|
||||||
-- stage 3
|
-- stage 3
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_3.png"}
|
def.tiles = {"farming_wheat_3.png"}
|
||||||
minetest.register_node("farming:wheat_3", table.copy(def))
|
core.register_node("farming:wheat_3", table.copy(def))
|
||||||
|
|
||||||
-- stage 4
|
-- stage 4
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_4.png"}
|
def.tiles = {"farming_wheat_4.png"}
|
||||||
minetest.register_node("farming:wheat_4", table.copy(def))
|
core.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))
|
||||||
|
|
||||||
|
-- stage 6
|
||||||
|
|
||||||
|
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 = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:wheat_5", table.copy(def))
|
core.register_node("farming:wheat_6", table.copy(def))
|
||||||
|
|
||||||
-- stage 6
|
-- stage 7
|
||||||
def.tiles = {"farming_wheat_6.png"}
|
|
||||||
|
def.tiles = {"farming_wheat_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:wheat"}, rarity = 2},
|
{items = {"farming:wheat"}, rarity = 2},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 1}
|
{items = {"farming:seed_wheat"}, rarity = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:wheat_6", table.copy(def))
|
core.register_node("farming:wheat_7", table.copy(def))
|
||||||
|
|
||||||
-- stage 7
|
|
||||||
def.tiles = {"farming_wheat_7.png"}
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:wheat"}, rarity = 1},
|
|
||||||
{items = {"farming:wheat"}, rarity = 3},
|
|
||||||
{items = {"farming:seed_wheat"}, rarity = 1},
|
|
||||||
{items = {"farming:seed_wheat"}, rarity = 3}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:wheat_7", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 8 (final)
|
-- stage 8 (final)
|
||||||
|
|
||||||
def.tiles = {"farming_wheat_8.png"}
|
def.tiles = {"farming_wheat_8.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 = {
|
items = {
|
||||||
{items = {"farming:wheat"}, rarity = 1},
|
{items = {"farming:wheat 2"}, rarity = 1},
|
||||||
{items = {"farming:wheat"}, rarity = 3},
|
{items = {"farming:wheat"}, rarity = 2},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 1},
|
{items = {"farming:seed_wheat 2"}, rarity = 1},
|
||||||
{items = {"farming:seed_wheat"}, rarity = 3}
|
{items = {"farming:seed_wheat"}, rarity = 2}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node("farming:wheat_8", table.copy(def))
|
core.register_node("farming:wheat_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
|
|
||||||
farming.registered_plants["farming:wheat"] = {
|
farming.registered_plants["farming:wheat"] = {
|
||||||
crop = "farming:wheat",
|
crop = "farming:wheat",
|
||||||
seed = "farming:seed_wheat",
|
seed = "farming:seed_wheat",
|
||||||
@@ -199,16 +132,3 @@ farming.registered_plants["farming:wheat"] = {
|
|||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 8
|
steps = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
-- fuels
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:straw",
|
|
||||||
burntime = 3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "farming:wheat",
|
|
||||||
burntime = 1
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -9,40 +9,41 @@
|
|||||||
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.001
|
farming.carrot = 0.002
|
||||||
farming.potato = 0.001
|
farming.potato = 0.002
|
||||||
farming.tomato = 0.001
|
farming.tomato = 0.002
|
||||||
farming.cucumber = 0.001
|
farming.cucumber = 0.002
|
||||||
farming.corn = 0.001
|
farming.corn = 0.002
|
||||||
farming.coffee = 0.001
|
farming.coffee = 0.002
|
||||||
farming.melon = 0.001
|
farming.melon = 0.009
|
||||||
farming.pumpkin = 0.001
|
farming.pumpkin = 0.009
|
||||||
farming.cocoa = true -- true or false only
|
farming.cocoa = true -- true or false only
|
||||||
farming.raspberry = 0.001
|
farming.raspberry = 0.002
|
||||||
farming.blueberry = 0.001
|
farming.blueberry = 0.002
|
||||||
farming.rhubarb = 0.001
|
farming.rhubarb = 0.002
|
||||||
farming.beans = 0.001
|
farming.beans = 0.002
|
||||||
farming.grapes = 0.001
|
farming.grapes = 0.002
|
||||||
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.001
|
farming.garlic = 0.002
|
||||||
farming.onion = 0.001
|
farming.onion = 0.002
|
||||||
farming.pepper = 0.002
|
farming.pepper = 0.002
|
||||||
farming.pineapple = 0.001
|
farming.pineapple = 0.003
|
||||||
farming.peas = 0.001
|
farming.peas = 0.002
|
||||||
farming.beetroot = 0.001
|
farming.beetroot = 0.002
|
||||||
farming.mint = 0.005
|
farming.mint = 0.005
|
||||||
farming.cabbage = 0.001
|
farming.cabbage = 0.002
|
||||||
farming.blackberry = 0.002
|
farming.blackberry = 0.002
|
||||||
farming.lettuce = 0.001
|
farming.lettuce = 0.002
|
||||||
farming.soy = 0.001
|
farming.soy = 0.002
|
||||||
farming.vanilla = 0.001
|
farming.vanilla = 0.002
|
||||||
farming.artichoke = 0.001
|
farming.artichoke = 0.002
|
||||||
farming.parsley = 0.002
|
farming.parsley = 0.002
|
||||||
farming.sunflower = 0.001
|
farming.sunflower = 0.002
|
||||||
farming.ginger = 0.002
|
farming.ginger = 0.002
|
||||||
farming.strawberry = not minetest.get_modpath("ethereal") and 0.002
|
farming.cotton = 0.003
|
||||||
|
farming.strawberry = 0.002
|
||||||
farming.grains = true -- true or false only
|
farming.grains = true -- true or false only
|
||||||
farming.rice = true
|
farming.rice = true
|
||||||
|
|
||||||
|
|||||||
864
food.lua
@@ -1,864 +0,0 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- sliced bread
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:bread_slice", {
|
|
||||||
description = S("Sliced Bread"),
|
|
||||||
inventory_image = "farming_bread_slice.png",
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
groups = {food_bread_slice = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:bread_slice 5",
|
|
||||||
recipe = {{"group:food_bread", a.cutting_board}},
|
|
||||||
replacements = {{"group:food_cutting_board", "farming:cutting_board"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- toast
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:toast", {
|
|
||||||
description = S("Toast"),
|
|
||||||
inventory_image = "farming_toast.png",
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
groups = {food_toast = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 3,
|
|
||||||
output = "farming:toast",
|
|
||||||
recipe = "farming:bread_slice"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- toast sandwich
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:toast_sandwich", {
|
|
||||||
description = S("Toast Sandwich"),
|
|
||||||
inventory_image = "farming_toast_sandwich.png",
|
|
||||||
on_use = minetest.item_eat(4),
|
|
||||||
groups = {flammable = 2, compostability = 85}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:toast_sandwich",
|
|
||||||
recipe = {
|
|
||||||
{"farming:bread_slice"},
|
|
||||||
{"farming:toast"},
|
|
||||||
{"farming:bread_slice"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- filter sea water into river water
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.bucket_river_water,
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre"},
|
|
||||||
{"farming:hemp_fibre"},
|
|
||||||
{a.bucket_water}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if farming.mcl then
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_potions:river_water",
|
|
||||||
recipe = {
|
|
||||||
{"farming:hemp_fibre"},
|
|
||||||
{"mcl_potions:water"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- glass of water
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:glass_water", {
|
|
||||||
description = S("Glass of Water"),
|
|
||||||
inventory_image = "farming_water_glass.png",
|
|
||||||
groups = {food_glass_water = 1, flammable = 3, vessel = 1}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:glass_water 4",
|
|
||||||
recipe = {
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{a.bucket_river_water, ""}
|
|
||||||
},
|
|
||||||
replacements = {{a.bucket_river_water, a.bucket_empty}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:glass_water 4",
|
|
||||||
recipe = {
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{a.bucket_water, "farming:hemp_fibre"}
|
|
||||||
},
|
|
||||||
replacements = {{a.bucket_water, a.bucket_empty}}
|
|
||||||
})
|
|
||||||
|
|
||||||
if minetest.get_modpath("bucket_wooden") then
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:glass_water 4",
|
|
||||||
recipe = {
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{a.drinking_glass, a.drinking_glass},
|
|
||||||
{"group:water_bucket_wooden", "farming:hemp_fibre"}
|
|
||||||
},
|
|
||||||
replacements = {{"group:water_bucket_wooden", "bucket_wooden:bucket_empty"}}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Sugar
|
|
||||||
|
|
||||||
if not farming.mcl then
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:sugar", {
|
|
||||||
description = S("Sugar"),
|
|
||||||
inventory_image = "farming_sugar.png",
|
|
||||||
groups = {food_sugar = 1, flammable = 3}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 3,
|
|
||||||
output = "farming:sugar 2",
|
|
||||||
recipe = "default:papyrus"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_node("farming:sugar_cube", {
|
|
||||||
description = S("Sugar Cube"),
|
|
||||||
tiles = {"farming_sugar_cube.png"},
|
|
||||||
groups = {shovely = 1, handy = 1, crumbly = 2},
|
|
||||||
floodable = true,
|
|
||||||
sounds = farming.sounds.node_sound_gravel_defaults(),
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:sugar_cube",
|
|
||||||
recipe = {
|
|
||||||
{a.sugar, a.sugar, a.sugar},
|
|
||||||
{a.sugar, a.sugar, a.sugar},
|
|
||||||
{a.sugar, a.sugar, a.sugar}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = a.sugar .. " 9",
|
|
||||||
recipe = {{"farming:sugar_cube"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Sugar caramel
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:caramel", {
|
|
||||||
description = S("Caramel"),
|
|
||||||
inventory_image = "farming_caramel.png",
|
|
||||||
groups = {compostability = 40}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 6,
|
|
||||||
output = "farming:caramel",
|
|
||||||
recipe = "group:food_sugar"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Salt
|
|
||||||
|
|
||||||
minetest.register_node("farming:salt", {
|
|
||||||
description = S("Salt"),
|
|
||||||
inventory_image = "farming_salt.png",
|
|
||||||
wield_image = "farming_salt.png",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.8,
|
|
||||||
paramtype = "light",
|
|
||||||
tiles = {"farming_salt.png"},
|
|
||||||
groups = {food_salt = 1, vessel = 1, dig_immediate = 3,
|
|
||||||
attached_node = 1},
|
|
||||||
sounds = farming.sounds.node_sound_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
-- special function to make salt crystals form inside water
|
|
||||||
dropped_step = function(self, pos, dtime)
|
|
||||||
|
|
||||||
self.ctimer = (self.ctimer or 0) + dtime
|
|
||||||
if self.ctimer < 15.0 then return end
|
|
||||||
self.ctimer = 0
|
|
||||||
|
|
||||||
local needed
|
|
||||||
|
|
||||||
if self.node_inside
|
|
||||||
and self.node_inside.name == a.water_source then
|
|
||||||
needed = 8
|
|
||||||
|
|
||||||
elseif self.node_inside
|
|
||||||
and self.node_inside.name == a.river_water_source then
|
|
||||||
needed = 9
|
|
||||||
end
|
|
||||||
|
|
||||||
if not needed then return end
|
|
||||||
|
|
||||||
local objs = core.get_objects_inside_radius(pos, 0.5)
|
|
||||||
|
|
||||||
if not objs or #objs ~= 1 then return end
|
|
||||||
|
|
||||||
local salt, ent = nil, nil
|
|
||||||
|
|
||||||
for k, obj in pairs(objs) do
|
|
||||||
|
|
||||||
ent = obj:get_luaentity()
|
|
||||||
|
|
||||||
if ent and ent.name == "__builtin:item"
|
|
||||||
and ent.itemstring == "farming:salt " .. needed then
|
|
||||||
|
|
||||||
obj:remove()
|
|
||||||
|
|
||||||
core.add_item(pos, "farming:salt_crystal")
|
|
||||||
|
|
||||||
return false -- return with no further action
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 15,
|
|
||||||
output = "farming:salt",
|
|
||||||
recipe = a.bucket_water,
|
|
||||||
replacements = {{a.bucket_water, a.bucket_empty}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Salt Crystal
|
|
||||||
|
|
||||||
minetest.register_node("farming:salt_crystal", {
|
|
||||||
description = S("Salt crystal"),
|
|
||||||
inventory_image = "farming_salt_crystal.png",
|
|
||||||
wield_image = "farming_salt_crystal.png",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.8,
|
|
||||||
paramtype = "light",
|
|
||||||
light_source = 1,
|
|
||||||
tiles = {"farming_salt_crystal.png"},
|
|
||||||
groups = {dig_immediate = 3, attached_node = 1},
|
|
||||||
sounds = farming.sounds.node_sound_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
},
|
|
||||||
_mcl_hardness = 0.8,
|
|
||||||
_mcl_blast_resistance = 1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:salt 9",
|
|
||||||
recipe = {
|
|
||||||
{"farming:salt_crystal", a.mortar_pestle}
|
|
||||||
},
|
|
||||||
replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:salt_crystal",
|
|
||||||
recipe = {
|
|
||||||
{"farming:salt", "farming:salt", "farming:salt"},
|
|
||||||
{"farming:salt", "farming:salt", "farming:salt"},
|
|
||||||
{"farming:salt", "farming:salt", "farming:salt"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Mayonnaise
|
|
||||||
|
|
||||||
minetest.register_node("farming:mayonnaise", {
|
|
||||||
description = S("Mayonnaise"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_mayo.png"},
|
|
||||||
inventory_image = "farming_mayo.png",
|
|
||||||
wield_image = "farming_mayo.png",
|
|
||||||
paramtype = "light",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
on_use = minetest.item_eat(3),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.45, 0.25}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
compostability = 65, food_mayonnaise = 1, vessel = 1, dig_immediate = 3,
|
|
||||||
attached_node = 1
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_glass_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:mayonnaise",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_olive_oil", "group:food_lemon"},
|
|
||||||
{"group:food_egg", "farming:salt"}
|
|
||||||
},
|
|
||||||
replacements = {{"farming:olive_oil", a.glass_bottle}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Rose Water
|
|
||||||
|
|
||||||
minetest.register_node("farming:rose_water", {
|
|
||||||
description = S("Rose Water"),
|
|
||||||
inventory_image = "farming_rose_water.png",
|
|
||||||
wield_image = "farming_rose_water.png",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 0.8,
|
|
||||||
paramtype = "light",
|
|
||||||
tiles = {"farming_rose_water.png"},
|
|
||||||
groups = {
|
|
||||||
food_rose_water = 1, vessel = 1, dig_immediate = 3, attached_node = 1
|
|
||||||
},
|
|
||||||
sounds = farming.sounds.node_sound_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:rose_water",
|
|
||||||
recipe = {
|
|
||||||
{a.rose, a.rose, a.rose},
|
|
||||||
{a.rose, a.rose, a.rose},
|
|
||||||
{"group:food_glass_water", a.pot, a.glass_bottle}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_glass_water", a.drinking_glass},
|
|
||||||
{"group:food_pot", "farming:pot"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Turkish Delight
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:turkish_delight", {
|
|
||||||
description = S("Turkish Delight"),
|
|
||||||
inventory_image = "farming_turkish_delight.png",
|
|
||||||
groups = {flammable = 3, compostability = 85},
|
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:turkish_delight 4",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_gelatin", "group:food_sugar", "group:food_gelatin"},
|
|
||||||
{"group:food_sugar", "group:food_rose_water", "group:food_sugar"},
|
|
||||||
{"group:food_sugar", a.dye_pink, "group:food_sugar"}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_cornstarch", a.bowl},
|
|
||||||
{"group:food_cornstarch", a.bowl},
|
|
||||||
{"group:food_rose_water", a.glass_bottle}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Garlic Bread
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:garlic_bread", {
|
|
||||||
description = S("Garlic Bread"),
|
|
||||||
inventory_image = "farming_garlic_bread.png",
|
|
||||||
groups = {flammable = 3, compostability = 65},
|
|
||||||
on_use = minetest.item_eat(2)
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:garlic_bread",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Donuts (thanks to Bockwurst for making the donut images)
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:donut", {
|
|
||||||
description = S("Donut"),
|
|
||||||
inventory_image = "farming_donut.png",
|
|
||||||
on_use = minetest.item_eat(4),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:donut 3",
|
|
||||||
recipe = {
|
|
||||||
{"", "group:food_wheat", ""},
|
|
||||||
{"group:food_wheat", "group:food_sugar", "group:food_wheat"},
|
|
||||||
{"", "group:food_wheat", ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:donut_chocolate", {
|
|
||||||
description = S("Chocolate Donut"),
|
|
||||||
inventory_image = "farming_donut_chocolate.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:donut_chocolate",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_cocoa"},
|
|
||||||
{"farming:donut"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:donut_apple", {
|
|
||||||
description = S("Apple Donut"),
|
|
||||||
inventory_image = "farming_donut_apple.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:donut_apple",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_apple"},
|
|
||||||
{"farming:donut"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Porridge Oats
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:porridge", {
|
|
||||||
description = S("Porridge"),
|
|
||||||
inventory_image = "farming_porridge.png",
|
|
||||||
on_use = minetest.item_eat(6, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:porridge",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_oats", "group:food_oats", "group:food_oats"},
|
|
||||||
{"group:food_oats", "group:food_bowl", "group:food_milk_glass"}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"mobs:glass_milk", a.drinking_glass},
|
|
||||||
{"farming:soy_milk", a.drinking_glass}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Jaffa Cake
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:jaffa_cake", {
|
|
||||||
description = S("Jaffa Cake"),
|
|
||||||
inventory_image = "farming_jaffa_cake.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:jaffa_cake 3",
|
|
||||||
recipe = {
|
|
||||||
{a.baking_tray, "group:food_egg", "group:food_sugar"},
|
|
||||||
{a.flour, "group:food_cocoa", "group:food_orange"},
|
|
||||||
{"group:food_milk", "", ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"farming:baking_tray", "farming:baking_tray"},
|
|
||||||
{"mobs:bucket_milk", a.bucket_empty},
|
|
||||||
{"mobs:wooden_bucket_milk", "wooden_bucket:bucket_wood_empty"},
|
|
||||||
{"farming:soy_milk", a.drinking_glass}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Apple Pie
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:apple_pie", {
|
|
||||||
description = S("Apple Pie"),
|
|
||||||
inventory_image = "farming_apple_pie.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 75}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:apple_pie",
|
|
||||||
recipe = {
|
|
||||||
{a.flour, "group:food_sugar", "group:food_apple"},
|
|
||||||
{"", a.baking_tray, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Cactus Juice
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:cactus_juice", {
|
|
||||||
description = S("Cactus Juice"),
|
|
||||||
inventory_image = "farming_cactus_juice.png",
|
|
||||||
groups = {vessel = 1, drink = 1, compostability = 55},
|
|
||||||
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
|
||||||
|
|
||||||
if user then
|
|
||||||
|
|
||||||
local num = math.random(5) == 1 and -1 or 2
|
|
||||||
|
|
||||||
return minetest.do_item_eat(num, "vessels:drinking_glass",
|
|
||||||
itemstack, user, pointed_thing)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:cactus_juice",
|
|
||||||
recipe = {
|
|
||||||
{a.juicer},
|
|
||||||
{a.cactus},
|
|
||||||
{a.drinking_glass}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_juicer", "farming:juicer"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Pasta
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:pasta", {
|
|
||||||
description = S("Pasta"),
|
|
||||||
inventory_image = "farming_pasta.png",
|
|
||||||
groups = {compostability = 65, food_pasta = 1}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pasta",
|
|
||||||
recipe = {
|
|
||||||
{a.flour, "group:food_butter", a.mixing_bowl}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:pasta",
|
|
||||||
recipe = {
|
|
||||||
{a.flour, "group:food_oil", a.mixing_bowl}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_mixing_bowl", "farming:mixing_bowl"},
|
|
||||||
{"group:food_oil", a.glass_bottle}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Mac & Cheese
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:mac_and_cheese", {
|
|
||||||
description = S("Mac & Cheese"),
|
|
||||||
inventory_image = "farming_mac_and_cheese.png",
|
|
||||||
on_use = minetest.item_eat(6, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:mac_and_cheese",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_pasta", "group:food_cheese", "group:food_bowl"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Spaghetti
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:spaghetti", {
|
|
||||||
description = S("Spaghetti"),
|
|
||||||
inventory_image = "farming_spaghetti.png",
|
|
||||||
on_use = minetest.item_eat(8),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:spaghetti",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_pasta", "group:food_tomato", a.saucepan},
|
|
||||||
{"group:food_garlic_clove", "group:food_garlic_clove", ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_saucepan", "farming:saucepan"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Korean Bibimbap
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:bibimbap", {
|
|
||||||
description = S("Bibimbap"),
|
|
||||||
inventory_image = "farming_bibimbap.png",
|
|
||||||
on_use = minetest.item_eat(8, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:bibimbap",
|
|
||||||
recipe = {
|
|
||||||
{a.skillet, "group:food_bowl", "group:food_egg"},
|
|
||||||
{"group:food_rice", "group:food_chicken_raw", "group:food_cabbage"},
|
|
||||||
{"group:food_carrot", "group:food_chili_pepper", ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:bibimbap",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
a.skillet, "group:food_bowl", "group:food_mushroom",
|
|
||||||
"group:food_rice", "group:food_cabbage", "group:food_carrot",
|
|
||||||
"group:food_mushroom", "group:food_chili_pepper"
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Burger
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:burger", {
|
|
||||||
description = S("Burger"),
|
|
||||||
inventory_image = "farming_burger.png",
|
|
||||||
on_use = minetest.item_eat(16),
|
|
||||||
groups = {compostability = 95}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:burger",
|
|
||||||
recipe = {
|
|
||||||
{a.bread, "group:food_meat", "group:food_cheese"},
|
|
||||||
{"group:food_tomato", "group:food_cucumber", "group:food_onion"},
|
|
||||||
{"group:food_lettuce", "", ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Salad
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:salad", {
|
|
||||||
description = S("Salad"),
|
|
||||||
inventory_image = "farming_salad.png",
|
|
||||||
on_use = minetest.item_eat(8, a.bowl),
|
|
||||||
groups = {compostability = 45}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:salad",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"group:food_bowl", "group:food_tomato", "group:food_cucumber",
|
|
||||||
"group:food_lettuce", "group:food_oil"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Triple Berry Smoothie
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:smoothie_berry", {
|
|
||||||
description = S("Triple Berry Smoothie"),
|
|
||||||
inventory_image = "farming_berry_smoothie.png",
|
|
||||||
on_use = minetest.item_eat(6, "vessels:drinking_glass"),
|
|
||||||
groups = {vessel = 1, drink = 1, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:smoothie_berry",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"group:food_raspberries", "group:food_blackberries",
|
|
||||||
"group:food_strawberry", "group:food_banana",
|
|
||||||
a.drinking_glass
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Patatas a la importancia
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:spanish_potatoes", {
|
|
||||||
description = S("Spanish Potatoes"),
|
|
||||||
inventory_image = "farming_spanish_potatoes.png",
|
|
||||||
on_use = minetest.item_eat(8, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:spanish_potatoes",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_potato", "group:food_parsley", "group:food_potato"},
|
|
||||||
{"group:food_egg", a.flour, "group:food_onion"},
|
|
||||||
{"farming:garlic_clove", "group:food_bowl", a.skillet}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Potato omelet
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:potato_omelet", {
|
|
||||||
description = S("Potato omelet"),
|
|
||||||
inventory_image = "farming_potato_omelet.png",
|
|
||||||
on_use = minetest.item_eat(6, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:potato_omelet",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_egg", "group:food_potato", "group:food_onion"},
|
|
||||||
{a.skillet, "group:food_bowl", ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Paella
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:paella", {
|
|
||||||
description = S("Paella"),
|
|
||||||
inventory_image = "farming_paella.png",
|
|
||||||
on_use = minetest.item_eat(8, a.bowl),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:paella",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_rice", a.dye_orange, "farming:pepper_red"},
|
|
||||||
{"group:food_peas", "group:food_chicken", "group:food_bowl"},
|
|
||||||
{"", a.skillet, ""}
|
|
||||||
},
|
|
||||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Flan
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:flan", {
|
|
||||||
description = S("Vanilla Flan"),
|
|
||||||
inventory_image = "farming_vanilla_flan.png",
|
|
||||||
on_use = minetest.item_eat(6),
|
|
||||||
groups = {compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:flan",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_sugar", "group:food_milk", "farming:caramel"},
|
|
||||||
{"group:food_egg", "group:food_egg", "farming:vanilla_extract"}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"cucina_vegana:soy_milk", a.drinking_glass},
|
|
||||||
{"mobs:bucket_milk", "bucket:bucket_empty"},
|
|
||||||
{"mobs:wooden_bucket_milk", "wooden_bucket:bucket_wood_empty"},
|
|
||||||
{"farming:vanilla_extract", a.glass_bottle}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Vegan Cheese
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:cheese_vegan", {
|
|
||||||
description = S("Vegan Cheese"),
|
|
||||||
inventory_image = "farming_cheese_vegan.png",
|
|
||||||
on_use = minetest.item_eat(2),
|
|
||||||
groups = {compostability = 65, food_cheese = 1, flammable = 2}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:cheese_vegan",
|
|
||||||
recipe = {
|
|
||||||
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
|
|
||||||
{"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol"},
|
|
||||||
{"group:food_gelatin", a.pot, ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"farming:soy_milk", a.drinking_glass .. " 3"},
|
|
||||||
{"farming:pot", "farming:pot"},
|
|
||||||
{"farming:bottle_ethanol", a.glass_bottle}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:cheese_vegan",
|
|
||||||
recipe = {
|
|
||||||
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
|
|
||||||
{"group:food_salt", "group:food_peppercorn", "group:food_lemon"},
|
|
||||||
{"group:food_gelatin", a.pot, ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"farming:soy_milk", a.drinking_glass .. " 3"},
|
|
||||||
{"farming:pot", "farming:pot"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Onigiri
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:onigiri", {
|
|
||||||
description = S("Onigiri"),
|
|
||||||
inventory_image = "farming_onigiri.png",
|
|
||||||
on_use = minetest.item_eat(2),
|
|
||||||
groups = {flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:onigiri",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_rice", "group:food_salt", "group:food_rice"},
|
|
||||||
{"", "group:food_seaweed", ""}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Gyoza
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:gyoza", {
|
|
||||||
description = S("Gyoza"),
|
|
||||||
inventory_image = "farming_gyoza.png",
|
|
||||||
on_use = minetest.item_eat(4),
|
|
||||||
groups = {flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:gyoza 4",
|
|
||||||
recipe = {
|
|
||||||
{"group:food_cabbage", "group:food_garlic_clove", "group:food_onion"},
|
|
||||||
{"group:food_meat_raw", "group:food_salt", a.flour},
|
|
||||||
{"", a.skillet, ""}
|
|
||||||
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_skillet", "farming:skillet"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Mochi
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:mochi", {
|
|
||||||
description = S("Mochi"),
|
|
||||||
inventory_image = "farming_mochi.png",
|
|
||||||
on_use = minetest.item_eat(3),
|
|
||||||
groups = {flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:mochi",
|
|
||||||
recipe = {
|
|
||||||
{"", a.mortar_pestle, ""},
|
|
||||||
{"group:food_rice", "group:food_sugar", "group:food_rice"},
|
|
||||||
{"", "group:food_glass_water", ""}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:food_mortar_pestle", "farming:mortar_pestle"},
|
|
||||||
{"group:food_glass_water", a.drinking_glass}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Gingerbread Man
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:gingerbread_man", {
|
|
||||||
description = S("Gingerbread Man"),
|
|
||||||
inventory_image = "farming_gingerbread_man.png",
|
|
||||||
on_use = minetest.item_eat(2),
|
|
||||||
groups = {compostability = 85}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "farming:gingerbread_man 3",
|
|
||||||
recipe = {
|
|
||||||
{"", "group:food_egg", ""},
|
|
||||||
{"group:food_wheat", "group:food_ginger", "group:food_wheat"},
|
|
||||||
{"group:food_sugar", "", "group:food_sugar"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
37
grass.lua
@@ -1,16 +1,18 @@
|
|||||||
|
|
||||||
-- Override grasses to drop seeds
|
-- Override grass to drop wheat and oat seeds
|
||||||
|
|
||||||
if minetest.registered_nodes["default:grass_1"] then
|
local rarity_lookup = {[1] = 50, [2] = 50, [3] = 50, [4] = 5, [5] = 5}
|
||||||
|
|
||||||
for i = 4, 5 do
|
if core.registered_nodes["default:grass_1"] then
|
||||||
|
|
||||||
minetest.override_item("default:grass_" .. i, {
|
for i = 1, 5 do
|
||||||
|
|
||||||
|
core.override_item("default:grass_" .. i, {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_wheat"}, rarity = 5},
|
{items = {"farming:seed_wheat"}, rarity = rarity_lookup[i]},
|
||||||
{items = {"farming:seed_oat"},rarity = 5},
|
{items = {"farming:seed_oat"},rarity = rarity_lookup[i]},
|
||||||
{items = {"default:grass_1"}}
|
{items = {"default:grass_1"}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,16 +20,18 @@ if minetest.registered_nodes["default:grass_1"] then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes["default:dry_grass_1"] then
|
-- override dry grass to drop barley and rye seeds
|
||||||
|
|
||||||
for i = 4, 5 do
|
if core.registered_nodes["default:dry_grass_1"] then
|
||||||
|
|
||||||
minetest.override_item("default:dry_grass_" .. i, {
|
for i = 1, 5 do
|
||||||
|
|
||||||
|
core.override_item("default:dry_grass_" .. i, {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:seed_barley"}, rarity = 5},
|
{items = {"farming:seed_barley"}, rarity = rarity_lookup[i]},
|
||||||
{items = {"farming:seed_rye"}, rarity = 5},
|
{items = {"farming:seed_rye"}, rarity = rarity_lookup[i]},
|
||||||
{items = {"default:dry_grass_1"}}
|
{items = {"default:dry_grass_1"}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,9 +39,11 @@ if minetest.registered_nodes["default:dry_grass_1"] then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes["default:junglegrass"] then
|
-- override jungle grass to drop cotton and rice seeds
|
||||||
|
|
||||||
minetest.override_item("default:junglegrass", {
|
if core.registered_nodes["default:junglegrass"] then
|
||||||
|
|
||||||
|
core.override_item("default:junglegrass", {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@@ -49,9 +55,11 @@ if minetest.registered_nodes["default:junglegrass"] then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- override mineclone tallgrass to drop all of the above seeds
|
||||||
|
|
||||||
if farming.mcl then
|
if farming.mcl then
|
||||||
|
|
||||||
minetest.override_item("mcl_flowers:tallgrass", {
|
core.override_item("mcl_flowers:tallgrass", {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@@ -65,3 +73,4 @@ if farming.mcl then
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
369
hoes.lua
@@ -1,52 +1,47 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
-- translation and mod check
|
||||||
local tr = minetest.get_modpath("toolranks")
|
|
||||||
|
local S = core.get_translator("farming")
|
||||||
|
local mod_tr = core.get_modpath("toolranks")
|
||||||
|
|
||||||
-- Hoe registration function
|
-- Hoe registration function
|
||||||
|
|
||||||
farming.register_hoe = function(name, def)
|
farming.register_hoe = function(name, def)
|
||||||
|
|
||||||
-- Check for : prefix (register new hoes in your mod's namespace)
|
-- Check for : prefix (register new hoes in your mod's namespace)
|
||||||
if name:sub(1,1) ~= ":" then
|
if name:sub(1,1) ~= ":" then name = ":" .. name end
|
||||||
name = ":" .. name
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check def table
|
-- Check def table
|
||||||
if def.description == nil then
|
if def.description == nil then def.description = S("Hoe") end
|
||||||
def.description = S("Hoe")
|
|
||||||
end
|
|
||||||
|
|
||||||
if def.inventory_image == nil then
|
if def.inventory_image == nil then def.inventory_image = "unknown_item.png" end
|
||||||
def.inventory_image = "unknown_item.png"
|
|
||||||
end
|
|
||||||
|
|
||||||
if def.max_uses == nil then
|
if def.max_uses == nil then def.max_uses = 30 end
|
||||||
def.max_uses = 30
|
|
||||||
end
|
|
||||||
|
|
||||||
-- add hoe group
|
-- add hoe group
|
||||||
def.groups = def.groups or {}
|
def.groups = def.groups or {}
|
||||||
def.groups.hoe = 1
|
def.groups.hoe = 1
|
||||||
|
|
||||||
-- Register the tool
|
-- Register the tool
|
||||||
minetest.register_tool(name, {
|
core.register_tool(name, {
|
||||||
description = def.description,
|
description = def.description,
|
||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
|
groups = def.groups,
|
||||||
|
sound = {breaks = "default_tool_breaks"},
|
||||||
|
damage_groups = def.damage_groups or {fleshy = 1},
|
||||||
|
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
|
return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
|
||||||
end,
|
end
|
||||||
groups = def.groups,
|
|
||||||
sound = {breaks = "default_tool_breaks"}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Register its recipe
|
-- Register its recipe
|
||||||
if def.recipe then
|
if def.recipe then
|
||||||
minetest.register_craft({
|
core.register_craft({ output = name:sub(2), recipe = def.recipe })
|
||||||
output = name:sub(2),
|
|
||||||
recipe = def.recipe
|
|
||||||
})
|
|
||||||
elseif def.material then
|
elseif def.material then
|
||||||
minetest.register_craft({
|
|
||||||
|
core.register_craft({
|
||||||
output = name:sub(2),
|
output = name:sub(2),
|
||||||
recipe = {
|
recipe = {
|
||||||
{def.material, def.material, ""},
|
{def.material, def.material, ""},
|
||||||
@@ -61,76 +56,87 @@ end
|
|||||||
|
|
||||||
function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing or {}
|
||||||
|
local is_used = false
|
||||||
|
|
||||||
-- am I going to hoe the top of a dirt node?
|
-- am I going to hoe the top of a dirt node?
|
||||||
if not pt or pt.type ~= "node"
|
if pt.type == "node" and pt.above.y == pt.under.y + 1 then
|
||||||
or pt.above.y ~= pt.under.y + 1 then
|
|
||||||
return
|
local under = core.get_node(pt.under)
|
||||||
|
local upos = pointed_thing.under
|
||||||
|
|
||||||
|
if core.is_protected(upos, user:get_player_name()) then
|
||||||
|
core.record_protection_violation(upos, user:get_player_name())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local p = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z}
|
||||||
|
local above = core.get_node(p)
|
||||||
|
|
||||||
|
-- return if any of the nodes is not registered
|
||||||
|
if not core.registered_nodes[under.name]
|
||||||
|
or not core.registered_nodes[above.name] then return end
|
||||||
|
|
||||||
|
-- check if the node above the pointed thing is air
|
||||||
|
if above.name ~= "air" then return end
|
||||||
|
|
||||||
|
-- check if pointing at dirt
|
||||||
|
if core.get_item_group(under.name, "soil") ~= 1 then return end
|
||||||
|
|
||||||
|
-- check if (wet) soil defined
|
||||||
|
local ndef = core.registered_nodes[under.name]
|
||||||
|
|
||||||
|
if ndef.soil == nil or ndef.soil.wet == nil or ndef.soil.dry == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if core.is_protected(pt.under, user:get_player_name()) then
|
||||||
|
core.record_protection_violation(pt.under, user:get_player_name())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- turn the node into soil, wear out item and play sound
|
||||||
|
core.set_node(pt.under, {name = ndef.soil.dry}) ; is_used = true
|
||||||
|
|
||||||
|
core.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
|
||||||
local upos = pointed_thing.under
|
|
||||||
|
|
||||||
if minetest.is_protected(upos, user:get_player_name()) then
|
|
||||||
minetest.record_protection_violation(upos, user:get_player_name())
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local p = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z}
|
|
||||||
local above = minetest.get_node(p)
|
|
||||||
|
|
||||||
-- return if any of the nodes is not registered
|
|
||||||
if not minetest.registered_nodes[under.name]
|
|
||||||
or not minetest.registered_nodes[above.name] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if the node above the pointed thing is air
|
|
||||||
if above.name ~= "air" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if pointing at dirt
|
|
||||||
if minetest.get_item_group(under.name, "soil") ~= 1 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if (wet) soil defined
|
|
||||||
local ndef = minetest.registered_nodes[under.name]
|
|
||||||
if ndef.soil == nil or ndef.soil.wet == nil or ndef.soil.dry == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.is_protected(pt.under, user:get_player_name()) then
|
|
||||||
minetest.record_protection_violation(pt.under, user:get_player_name())
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- turn the node into soil, wear out item and play sound
|
|
||||||
minetest.set_node(pt.under, {name = ndef.soil.dry})
|
|
||||||
|
|
||||||
minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}, true)
|
|
||||||
|
|
||||||
local wdef = itemstack:get_definition()
|
local wdef = itemstack:get_definition()
|
||||||
local wear = 65535 / (uses - 1)
|
local wear = 65535 / (uses - 1)
|
||||||
|
|
||||||
if farming.is_creative(user:get_player_name()) then
|
-- using hoe as weapon
|
||||||
if tr then
|
if pt.type == "object" then
|
||||||
wear = 1
|
|
||||||
else
|
local ent = pt.ref and pt.ref:get_luaentity()
|
||||||
wear = 0
|
local dir = user:get_look_dir()
|
||||||
|
|
||||||
|
if (ent and ent.name ~= "__builtin:item"
|
||||||
|
and ent.name ~= "__builtin:falling_node") or pt.ref:is_player() then
|
||||||
|
|
||||||
|
pt.ref:punch(user, nil, {full_punch_interval = 1.0,
|
||||||
|
damage_groups = wdef.damage_groups}, dir)
|
||||||
|
|
||||||
|
is_used = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if tr then
|
-- only when used on soil top or external entity
|
||||||
itemstack = toolranks.new_afteruse(itemstack, user, under, {wear = wear})
|
if is_used then
|
||||||
else
|
|
||||||
itemstack:add_wear(wear)
|
|
||||||
end
|
|
||||||
|
|
||||||
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
-- cretive doesnt wear tools but toolranks registers uses with wear so set to 1
|
||||||
minetest.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5}, true)
|
if farming.is_creative(user:get_player_name()) then
|
||||||
|
if mod_tr then wear = 1 else wear = 0 end
|
||||||
|
end
|
||||||
|
|
||||||
|
if mod_tr then
|
||||||
|
itemstack = toolranks.new_afteruse(itemstack, user, under, {wear = wear})
|
||||||
|
else
|
||||||
|
itemstack:add_wear(wear)
|
||||||
|
end
|
||||||
|
|
||||||
|
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)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
@@ -145,7 +151,7 @@ farming.register_hoe(":farming:hoe_wood", {
|
|||||||
material = "group:wood"
|
material = "group:wood"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
core.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "farming:hoe_wood",
|
recipe = "farming:hoe_wood",
|
||||||
burntime = 5
|
burntime = 5
|
||||||
@@ -162,14 +168,17 @@ farming.register_hoe(":farming:hoe_steel", {
|
|||||||
description = S("Steel Hoe"),
|
description = S("Steel Hoe"),
|
||||||
inventory_image = "farming_tool_steelhoe.png",
|
inventory_image = "farming_tool_steelhoe.png",
|
||||||
max_uses = 200,
|
max_uses = 200,
|
||||||
material = "default:steel_ingot"
|
material = "default:steel_ingot",
|
||||||
|
damage_groups = {fleshy = 2}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_bronze", {
|
farming.register_hoe(":farming:hoe_bronze", {
|
||||||
description = S("Bronze Hoe"),
|
description = S("Bronze Hoe"),
|
||||||
inventory_image = "farming_tool_bronzehoe.png",
|
inventory_image = "farming_tool_bronzehoe.png",
|
||||||
max_uses = 500,
|
max_uses = 250,
|
||||||
groups = {not_in_creative_inventory = 1}
|
groups = {not_in_creative_inventory = 1},
|
||||||
|
material = "default:bronze_ingot",
|
||||||
|
damage_groups = {fleshy = 2}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_mese", {
|
farming.register_hoe(":farming:hoe_mese", {
|
||||||
@@ -177,142 +186,116 @@ farming.register_hoe(":farming:hoe_mese", {
|
|||||||
inventory_image = "farming_tool_mesehoe.png",
|
inventory_image = "farming_tool_mesehoe.png",
|
||||||
max_uses = 350,
|
max_uses = 350,
|
||||||
groups = {not_in_creative_inventory = 1},
|
groups = {not_in_creative_inventory = 1},
|
||||||
|
damage_groups = {fleshy = 3}
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_diamond", {
|
farming.register_hoe(":farming:hoe_diamond", {
|
||||||
description = S("Diamond Hoe"),
|
description = S("Diamond Hoe"),
|
||||||
inventory_image = "farming_tool_diamondhoe.png",
|
inventory_image = "farming_tool_diamondhoe.png",
|
||||||
max_uses = 500,
|
max_uses = 500,
|
||||||
groups = {not_in_creative_inventory = 1}
|
groups = {not_in_creative_inventory = 1},
|
||||||
|
damage_groups = {fleshy = 3}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Toolranks support
|
-- Toolranks support
|
||||||
if tr then
|
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_wood", {
|
if mod_tr then
|
||||||
|
|
||||||
|
core.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"))})
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_stone", {
|
core.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"))})
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_steel", {
|
core.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"))})
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_bronze", {
|
core.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"))})
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_mese", {
|
core.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"))})
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_diamond", {
|
core.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
|
||||||
|
|
||||||
|
|
||||||
-- hoe bomb function
|
-- hoe bomb function
|
||||||
|
|
||||||
local function hoe_area(pos, player)
|
local function hoe_area(pos, player)
|
||||||
|
|
||||||
-- check for protection
|
-- check for protection
|
||||||
if minetest.is_protected(pos, player:get_player_name()) then
|
if core.is_protected(pos, player:get_player_name()) then
|
||||||
minetest.record_protection_violation(pos, player:get_player_name())
|
core.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 = minetest.find_nodes_in_area(
|
local res = core.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 + 2, z = pos.z + r},
|
{x = pos.x + r, y = pos.y + 1, 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
|
||||||
minetest.swap_node(res[n], {name = "air"})
|
core.swap_node(res[n], {name = "air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- replace dirt with tilled soil
|
-- replace dirt with tilled soil
|
||||||
res = nil
|
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
|
||||||
minetest.swap_node(res[n], {name = "farming:soil"})
|
core.swap_node(res[n], {name = "farming:soil"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- throwable hoe bomb entity
|
||||||
|
|
||||||
-- throwable hoe bomb
|
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.1,-0.1,-0.1,0.1,0.1,0.1}
|
collisionbox = {-0.2,-0.2,-0.2,0.2,0.2,0.2}
|
||||||
},
|
},
|
||||||
|
|
||||||
lastpos = {},
|
on_step = function(self, dtime, moveresult)
|
||||||
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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- actual throwing function
|
-- actual throwing function
|
||||||
|
|
||||||
local function throw_potion(itemstack, player)
|
local function throw_potion(itemstack, player)
|
||||||
|
|
||||||
local playerpos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
|
|
||||||
local obj = minetest.add_entity({
|
local obj = core.add_entity({
|
||||||
x = playerpos.x,
|
x = pos.x, y = pos.y + 1.5, z = pos.z}, "farming:hoebomb_entity")
|
||||||
y = playerpos.y + 1.5,
|
|
||||||
z = playerpos.z
|
|
||||||
}, "farming:hoebomb_entity")
|
|
||||||
|
|
||||||
if not obj then return end
|
if not obj then return end
|
||||||
|
|
||||||
@@ -326,16 +309,17 @@ local function throw_potion(itemstack, player)
|
|||||||
obj:get_luaentity().player = player
|
obj:get_luaentity().player = player
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- hoe bomb item
|
-- hoe bomb item
|
||||||
minetest.register_craftitem("farming:hoe_bomb", {
|
|
||||||
|
core.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},
|
||||||
|
|
||||||
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.above, user)
|
hoe_area(pointed_thing.under, user)
|
||||||
else
|
else
|
||||||
throw_potion(itemstack, user)
|
throw_potion(itemstack, user)
|
||||||
|
|
||||||
@@ -349,7 +333,21 @@ minetest.register_craftitem("farming:hoe_bomb", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Mithril Scythe (special item)
|
-- helper function
|
||||||
|
|
||||||
|
local function node_not_num(nodename)
|
||||||
|
|
||||||
|
local num = #nodename:split("_")
|
||||||
|
local str = ""
|
||||||
|
|
||||||
|
if not num or num == 1 then return end
|
||||||
|
|
||||||
|
for v = 1, (num - 1) do
|
||||||
|
str = str .. nodename:split("_")[v] .. "_"
|
||||||
|
end
|
||||||
|
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
|
||||||
farming.scythe_not_drops = {"farming:trellis", "farming:beanpole"}
|
farming.scythe_not_drops = {"farming:trellis", "farming:beanpole"}
|
||||||
|
|
||||||
@@ -357,37 +355,33 @@ farming.add_to_scythe_not_drops = function(item)
|
|||||||
table.insert(farming.scythe_not_drops, item)
|
table.insert(farming.scythe_not_drops, item)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_tool("farming:scythe_mithril", {
|
-- Mithril Scythe (special item)
|
||||||
|
|
||||||
|
core.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"},
|
||||||
|
|
||||||
on_use = function(itemstack, placer, pointed_thing)
|
on_use = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
local name = placer:get_player_name()
|
local name = placer:get_player_name()
|
||||||
|
|
||||||
if minetest.is_protected(pos, name) then
|
if core.is_protected(pos, name) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local node = minetest.get_node_or_nil(pos)
|
local node = core.get_node_or_nil(pos)
|
||||||
|
|
||||||
if not node then
|
if not node then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = core.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 = minetest.get_node_drops(node.name, "")
|
local drops = core.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
|
||||||
@@ -395,14 +389,9 @@ minetest.register_tool("farming:scythe_mithril", {
|
|||||||
|
|
||||||
-- get crop name
|
-- get crop name
|
||||||
local mname = node.name:split(":")[1]
|
local mname = node.name:split(":")[1]
|
||||||
local pname = node.name:split(":")[2]
|
local pname = node_not_num(node.name:split(":")[2])
|
||||||
local sname = tonumber(pname:split("_")[2])
|
|
||||||
|
|
||||||
pname = pname:split("_")[1]
|
if not pname then return end
|
||||||
|
|
||||||
if not sname then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- add dropped items
|
-- add dropped items
|
||||||
for _, dropped_item in pairs(drops) do
|
for _, dropped_item in pairs(drops) do
|
||||||
@@ -417,15 +406,12 @@ minetest.register_tool("farming:scythe_mithril", {
|
|||||||
|
|
||||||
if dropped_item then
|
if dropped_item then
|
||||||
|
|
||||||
local obj = minetest.add_item(pos, dropped_item)
|
local obj = core.add_item(pos, dropped_item)
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
|
|
||||||
obj:set_velocity({
|
obj:set_velocity({
|
||||||
x = math.random(-10, 10) / 9,
|
x = math.random() - 0.5, y = 3, z = math.random() - 0.5})
|
||||||
y = 3,
|
|
||||||
z = math.random(-10, 10) / 9
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -436,17 +422,18 @@ minetest.register_tool("farming:scythe_mithril", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- play sound
|
-- play sound
|
||||||
minetest.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}, true)
|
core.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}, true)
|
||||||
|
|
||||||
local replace = mname .. ":" .. pname .. "_1"
|
-- replace with seed or crop_1
|
||||||
|
local replace = mname .. ":" .. pname .. "1"
|
||||||
|
|
||||||
if minetest.registered_nodes[replace] then
|
if core.registered_nodes[replace] then
|
||||||
|
|
||||||
local p2 = minetest.registered_nodes[replace].place_param2 or 1
|
local p2 = core.registered_nodes[replace].place_param2 or 1
|
||||||
|
|
||||||
minetest.set_node(pos, {name = replace, param2 = p2})
|
core.set_node(pos, {name = replace, param2 = p2})
|
||||||
else
|
else
|
||||||
minetest.set_node(pos, {name = "air"})
|
core.set_node(pos, {name = "air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
if not farming.is_creative(name) then
|
if not farming.is_creative(name) then
|
||||||
@@ -455,12 +442,14 @@ minetest.register_tool("farming:scythe_mithril", {
|
|||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("moreores") then
|
-- if moreores found add mithril scythe recipe
|
||||||
|
|
||||||
minetest.register_craft({
|
if core.get_modpath("moreores") then
|
||||||
|
|
||||||
|
core.register_craft({
|
||||||
output = "farming:scythe_mithril",
|
output = "farming:scythe_mithril",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "moreores:mithril_ingot", "moreores:mithril_ingot"},
|
{"", "moreores:mithril_ingot", "moreores:mithril_ingot"},
|
||||||
|
|||||||
553
init.lua
@@ -1,76 +1,75 @@
|
|||||||
--[[
|
--[[
|
||||||
Farming Redo Mod
|
Farming Redo Mod by TenPlus1
|
||||||
by TenPlus1
|
|
||||||
NEW growing routine by prestidigitator
|
NEW growing routine by prestidigitator
|
||||||
auto-refill by crabman77
|
auto-refill by crabman77
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
-- Translation support
|
||||||
|
|
||||||
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
|
-- global
|
||||||
|
|
||||||
farming = {
|
farming = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20231206",
|
version = "20251114",
|
||||||
path = minetest.get_modpath("farming"),
|
path = core.get_modpath("farming"),
|
||||||
select = {
|
select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}},
|
||||||
type = "fixed",
|
select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}},
|
||||||
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}
|
|
||||||
},
|
|
||||||
registered_plants = {},
|
registered_plants = {},
|
||||||
min_light = 12,
|
min_light = 12, max_light = 15,
|
||||||
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"),
|
||||||
sounds = {}
|
mcl_hardness = 0.01,
|
||||||
|
translate = S
|
||||||
}
|
}
|
||||||
|
|
||||||
-- default sound functions just incase
|
-- determine which sounds to use, default or mcl_sounds
|
||||||
function farming.sounds.node_sound_defaults() end
|
|
||||||
function farming.sounds.node_sound_glass_defaults() end
|
|
||||||
function farming.sounds.node_sound_gravel_defaults() end
|
|
||||||
function farming.sounds.node_sound_leaves_defaults() end
|
|
||||||
function farming.sounds.node_sound_stone_defaults() end
|
|
||||||
function farming.sounds.node_sound_wood_defaults() end
|
|
||||||
|
|
||||||
-- sounds check
|
local function sound_helper(snd)
|
||||||
if farming.mtg then farming.sounds = default end
|
|
||||||
if farming.mcl then farming.sounds = mcl_sounds end
|
farming[snd] = (farming.mtg and default[snd]) or (farming.mcl and mcl_sounds[snd])
|
||||||
|
or function() return {} end
|
||||||
|
end
|
||||||
|
|
||||||
|
sound_helper("node_sound_defaults")
|
||||||
|
sound_helper("node_sound_stone_defaults")
|
||||||
|
sound_helper("node_sound_dirt_defaults")
|
||||||
|
sound_helper("node_sound_sand_defaults")
|
||||||
|
sound_helper("node_sound_gravel_defaults")
|
||||||
|
sound_helper("node_sound_wood_defaults")
|
||||||
|
sound_helper("node_sound_leaves_defaults")
|
||||||
|
sound_helper("node_sound_ice_defaults")
|
||||||
|
sound_helper("node_sound_metal_defaults")
|
||||||
|
sound_helper("node_sound_water_defaults")
|
||||||
|
sound_helper("node_sound_snow_defaults")
|
||||||
|
sound_helper("node_sound_glass_defaults")
|
||||||
|
|
||||||
-- check for creative mode or priv
|
-- check for creative mode or priv
|
||||||
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
|
||||||
|
local creative_mode_cache = core.settings:get_bool("creative_mode")
|
||||||
|
|
||||||
function farming.is_creative(name)
|
function farming.is_creative(name)
|
||||||
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
|
return creative_mode_cache or core.check_player_privs(name, {creative = true})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 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
|
||||||
-- Translation support
|
local time_speed = tonumber(core.settings:get("time_speed")) or 72
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
farming.translate = S
|
|
||||||
|
|
||||||
-- localise
|
|
||||||
local random = math.random
|
|
||||||
local floor = math.floor
|
|
||||||
|
|
||||||
-- Utility Function
|
|
||||||
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)
|
local function clamp(x, min, max) return (x < min and min) or (x > max and max) or x end
|
||||||
return (x < min and min) or (x > max and max) or x
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- return amount of day or night that has elapsed
|
-- return amount of day or night that has elapsed
|
||||||
-- dt is time elapsed, count_day if true counts day, otherwise night
|
-- dt is time elapsed, count_day if true counts day, otherwise night
|
||||||
|
|
||||||
local function day_or_night_time(dt, count_day)
|
local function day_or_night_time(dt, count_day)
|
||||||
|
|
||||||
local t_day = minetest.get_timeofday()
|
local t_day = core.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)
|
||||||
|
|
||||||
@@ -96,7 +95,9 @@ local function day_or_night_time(dt, count_day)
|
|||||||
local dt_c = clamp(t2_c, 0, 0.5) - clamp(t1_c, 0, 0.5) -- this cycle
|
local dt_c = clamp(t2_c, 0, 0.5) - clamp(t1_c, 0, 0.5) -- this cycle
|
||||||
|
|
||||||
if t1_c < -0.5 then
|
if t1_c < -0.5 then
|
||||||
|
|
||||||
local nc = floor(-t1_c)
|
local nc = floor(-t1_c)
|
||||||
|
|
||||||
t1_c = t1_c + nc
|
t1_c = t1_c + nc
|
||||||
dt_c = dt_c + 0.5 * nc + clamp(-t1_c - 0.5, 0, 0.5)
|
dt_c = dt_c + 0.5 * nc + clamp(-t1_c - 0.5, 0, 0.5)
|
||||||
end
|
end
|
||||||
@@ -104,43 +105,39 @@ local function day_or_night_time(dt, count_day)
|
|||||||
return dt_c * SECS_PER_CYCLE
|
return dt_c * SECS_PER_CYCLE
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Growth Logic
|
-- Growth Logic
|
||||||
local STAGE_LENGTH_AVG = tonumber(
|
|
||||||
minetest.settings:get("farming_stage_length")) or 200
|
local STAGE_LENGTH_AVG = tonumber(core.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
|
||||||
farming.start_seed_timer = function(pos)
|
|
||||||
|
|
||||||
local timer = minetest.get_node_timer(pos)
|
function farming.start_seed_timer(pos)
|
||||||
|
|
||||||
|
local timer = core.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)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- return plant name and stage from node provided
|
-- return plant name and stage from node provided
|
||||||
|
|
||||||
local function plant_name_stage(node)
|
local function plant_name_stage(node)
|
||||||
|
|
||||||
local name
|
local name
|
||||||
|
|
||||||
if type(node) == "table" then
|
if type(node) == "table" then
|
||||||
|
|
||||||
if node.name then
|
if node.name then name = node.name
|
||||||
name = node.name
|
|
||||||
elseif node.x and node.y and node.z then
|
elseif node.x and node.y and node.z then
|
||||||
node = minetest.get_node_or_nil(node)
|
node = core.get_node_or_nil(node)
|
||||||
name = node and node.name
|
name = node and node.name
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
name = tostring(node)
|
name = tostring(node)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not name or name == "ignore" then
|
if not name or name == "ignore" then return nil end
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local sep_pos = name:find("_[^_]+$")
|
local sep_pos = name:find("_[^_]+$")
|
||||||
|
|
||||||
@@ -156,7 +153,6 @@ local function plant_name_stage(node)
|
|||||||
return name, 0
|
return name, 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Map from node name to
|
-- Map from node name to
|
||||||
-- { plant_name = ..., name = ..., stage = n, stages_left = { node_name, ... } }
|
-- { plant_name = ..., name = ..., stage = n, stages_left = { node_name, ... } }
|
||||||
|
|
||||||
@@ -165,32 +161,24 @@ local plant_stages = {}
|
|||||||
farming.plant_stages = plant_stages
|
farming.plant_stages = plant_stages
|
||||||
|
|
||||||
--- Registers the stages of growth of a (possible plant) node.
|
--- Registers the stages of growth of a (possible plant) node.
|
||||||
--
|
-- @param node - Node or position table, or node name.
|
||||||
-- @param node
|
-- @return - The (possibly zero) number of stages of growth the plant will go through
|
||||||
-- Node or position table, or node name.
|
-- before being fully grown, or nil if not a plant.
|
||||||
-- @return
|
|
||||||
-- The (possibly zero) number of stages of growth the plant will go through
|
|
||||||
-- before being fully grown, or nil if not a plant.
|
|
||||||
|
|
||||||
local register_plant_node
|
|
||||||
|
|
||||||
-- Recursive helper
|
-- Recursive helper
|
||||||
|
|
||||||
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 minetest.registered_nodes[node_name]
|
local node_def = node_name and core.registered_nodes[node_name]
|
||||||
|
|
||||||
if not node_def then
|
if not node_def then return nil end
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local stages = plant_stages[node_name]
|
local stages = plant_stages[node_name]
|
||||||
|
|
||||||
if stages then
|
if stages then return stages end
|
||||||
return stages
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_item_group(node_name, "growing") > 0 then
|
if core.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 {}
|
||||||
@@ -207,24 +195,20 @@ 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
|
||||||
|
|
||||||
minetest.override_item(node_name, {
|
core.override_item(node_name, {
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
|
||||||
if old_constr then
|
if old_constr then old_constr(pos) end
|
||||||
old_constr(pos)
|
|
||||||
end
|
|
||||||
|
|
||||||
farming.handle_growth(pos)
|
farming.handle_growth(pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
|
|
||||||
minetest.get_node_timer(pos):stop()
|
core.get_node_timer(pos):stop()
|
||||||
|
|
||||||
if old_destr then
|
if old_destr then old_destr(pos) end
|
||||||
old_destr(pos)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
@@ -250,28 +234,27 @@ local function reg_plant_stages(plant_name, stage, force_last)
|
|||||||
return stages
|
return stages
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- split name and stage and register crop
|
||||||
|
|
||||||
local register_plant_node = function(node)
|
local function register_plant_node(node)
|
||||||
|
|
||||||
local plant_name, stage = plant_name_stage(node)
|
local plant_name, stage = plant_name_stage(node)
|
||||||
|
|
||||||
if plant_name then
|
if plant_name then
|
||||||
|
|
||||||
local stages = reg_plant_stages(plant_name, stage, false)
|
local stages = reg_plant_stages(plant_name, stage, false)
|
||||||
|
|
||||||
return stages and #stages.stages_left
|
return stages and #stages.stages_left
|
||||||
else
|
|
||||||
return nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- check for further growth and set or stop timer
|
||||||
|
|
||||||
local function set_growing(pos, stages_left)
|
local function set_growing(pos, stages_left)
|
||||||
|
|
||||||
if not stages_left then
|
if not stages_left then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local timer = minetest.get_node_timer(pos)
|
local timer = core.get_node_timer(pos)
|
||||||
|
|
||||||
if stages_left > 0 then
|
if stages_left > 0 then
|
||||||
|
|
||||||
@@ -279,7 +262,8 @@ local function set_growing(pos, stages_left)
|
|||||||
|
|
||||||
local stage_length = statistics.normal(STAGE_LENGTH_AVG, STAGE_LENGTH_DEV)
|
local stage_length = statistics.normal(STAGE_LENGTH_AVG, STAGE_LENGTH_DEV)
|
||||||
|
|
||||||
stage_length = clamp(stage_length, 0.5 * STAGE_LENGTH_AVG, 3.0 * STAGE_LENGTH_AVG)
|
stage_length = clamp(
|
||||||
|
stage_length, 0.5 * STAGE_LENGTH_AVG, 3.0 * STAGE_LENGTH_AVG)
|
||||||
|
|
||||||
timer:set(stage_length, -0.5 * random() * STAGE_LENGTH_AVG)
|
timer:set(stage_length, -0.5 * random() * STAGE_LENGTH_AVG)
|
||||||
end
|
end
|
||||||
@@ -289,141 +273,105 @@ local function set_growing(pos, stages_left)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- detects a crop at given position, starting or stopping growth timer when needed
|
-- detects a crop at given position, starting or stopping growth timer when needed
|
||||||
|
|
||||||
function farming.handle_growth(pos, node)
|
function farming.handle_growth(pos, node)
|
||||||
|
|
||||||
if not pos then
|
if not pos then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local stages_left = register_plant_node(node or pos)
|
local stages_left = register_plant_node(node or pos)
|
||||||
|
|
||||||
if stages_left then
|
if stages_left then set_growing(pos, stages_left) end
|
||||||
set_growing(pos, stages_left)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- register crops nodes and add timer functions
|
||||||
|
|
||||||
minetest.after(0, function()
|
core.after(0, function()
|
||||||
|
|
||||||
for _, node_def in pairs(minetest.registered_nodes) do
|
for _, node_def in pairs(core.registered_nodes) do
|
||||||
register_plant_node(node_def)
|
register_plant_node(node_def)
|
||||||
end
|
end
|
||||||
end)
|
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).
|
||||||
minetest.register_abm({
|
|
||||||
|
core.register_lbm({
|
||||||
label = "Start crop timer",
|
label = "Start crop timer",
|
||||||
|
name = "farming:start_crop_timer",
|
||||||
nodenames = {"group:growing"},
|
nodenames = {"group:growing"},
|
||||||
interval = 300,
|
run_at_every_load = false,
|
||||||
chance = 1,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
|
|
||||||
-- skip if node timer already active
|
action = function(pos, node, dtime_s)
|
||||||
if minetest.get_node_timer(pos):is_started() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if group:growing node is a seed
|
local timer = core.get_node_timer(pos)
|
||||||
local def = minetest.registered_nodes[node.name]
|
|
||||||
|
|
||||||
if def and def.groups and def.groups.seed then
|
if timer:is_started() then return end
|
||||||
|
|
||||||
-- start node timer if found
|
farming.start_seed_timer(pos)
|
||||||
if def.on_timer then
|
|
||||||
|
|
||||||
farming.start_seed_timer(pos)
|
|
||||||
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local next_stage = def.next_plant
|
|
||||||
|
|
||||||
def = minetest.registered_nodes[next_stage]
|
|
||||||
|
|
||||||
-- switch seed without timer to stage_1 of crop
|
|
||||||
if def then
|
|
||||||
|
|
||||||
local p2 = def.place_param2 or 1
|
|
||||||
|
|
||||||
minetest.set_node(pos, {name = next_stage, param2 = p2})
|
|
||||||
end
|
|
||||||
else
|
|
||||||
-- start normal crop timer
|
|
||||||
farming.handle_growth(pos, node)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- default check crop is on wet soil
|
||||||
|
|
||||||
|
farming.can_grow = function(pos)
|
||||||
|
|
||||||
|
local below = core.get_node({x = pos.x, y = pos.y -1, z = pos.z})
|
||||||
|
|
||||||
|
return core.get_item_group(below.name, "soil") >= 3
|
||||||
|
end
|
||||||
|
|
||||||
-- Plant timer function that grows plants under the right conditions.
|
-- Plant timer function that grows plants under the right conditions.
|
||||||
|
|
||||||
function farming.plant_growth_timer(pos, elapsed, node_name)
|
function farming.plant_growth_timer(pos, elapsed, node_name)
|
||||||
|
|
||||||
local stages = plant_stages[node_name]
|
local stages = plant_stages[node_name]
|
||||||
|
|
||||||
if not stages then
|
if not stages then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local max_growth = #stages.stages_left
|
local max_growth = #stages.stages_left
|
||||||
|
|
||||||
if max_growth <= 0 then
|
if max_growth <= 0 then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- custom growth check
|
local chk1 = core.registered_nodes[node_name].growth_check -- old
|
||||||
local chk = minetest.registered_nodes[node_name].growth_check
|
local chk2 = core.registered_nodes[node_name].can_grow -- new
|
||||||
|
|
||||||
if chk then
|
if chk1 then -- custom farming redo growth_check function
|
||||||
|
|
||||||
if not chk(pos, node_name) then
|
if not chk1(pos, node_name) then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
-- otherwise check for wet soil beneath crop
|
elseif chk2 then -- custom mt 5.9x farming can_grow function
|
||||||
else
|
|
||||||
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
|
||||||
|
|
||||||
if minetest.get_item_group(under.name, "soil") < 3 then
|
if not chk2(pos) then return true end
|
||||||
return true
|
|
||||||
end
|
-- default mt 5.9x farming.can_grow function
|
||||||
end
|
elseif not farming.can_grow(pos) then return true end
|
||||||
|
|
||||||
local growth
|
local growth
|
||||||
local light_pos = {x = pos.x, y = pos.y, z = pos.z}
|
local light_pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||||
local lambda = elapsed / STAGE_LENGTH_AVG
|
local lambda = elapsed / STAGE_LENGTH_AVG
|
||||||
|
|
||||||
if lambda < 0.1 then
|
if lambda < 0.1 then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or farming.min_light
|
local MIN_LIGHT = core.registered_nodes[node_name].minlight or farming.min_light
|
||||||
local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or farming.max_light
|
local MAX_LIGHT = core.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 = (minetest.get_node_light(light_pos) or 0)
|
local light = (core.get_node_light(light_pos) or 0)
|
||||||
|
|
||||||
if light < MIN_LIGHT or light > MAX_LIGHT then
|
if light < MIN_LIGHT or light > MAX_LIGHT then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
growth = 1
|
growth = 1
|
||||||
else
|
else
|
||||||
local night_light = (minetest.get_node_light(light_pos, 0) or 0)
|
local night_light = core.get_node_light(light_pos, 0) or 0
|
||||||
local day_light = (minetest.get_node_light(light_pos, 0.5) or 0)
|
local day_light = core.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
|
||||||
|
|
||||||
if not night_growth then
|
if not night_growth then
|
||||||
|
|
||||||
if not day_growth then
|
if not day_growth then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
lambda = day_or_night_time(elapsed, true) / STAGE_LENGTH_AVG
|
lambda = day_or_night_time(elapsed, true) / STAGE_LENGTH_AVG
|
||||||
|
|
||||||
@@ -434,16 +382,14 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
|||||||
|
|
||||||
growth = statistics.poisson(lambda, max_growth)
|
growth = statistics.poisson(lambda, max_growth)
|
||||||
|
|
||||||
if growth < 1 then
|
if growth < 1 then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes[stages.stages_left[growth]] then
|
if core.registered_nodes[stages.stages_left[growth]] then
|
||||||
|
|
||||||
local p2 = minetest.registered_nodes[stages.stages_left[growth] ].place_param2 or 1
|
local p2 = core.registered_nodes[stages.stages_left[growth] ].place_param2 or 1
|
||||||
|
|
||||||
minetest.set_node(pos, {name = stages.stages_left[growth], param2 = p2})
|
core.set_node(pos, {name = stages.stages_left[growth], param2 = p2})
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -451,21 +397,15 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
|||||||
return growth ~= max_growth
|
return growth ~= max_growth
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- refill placed plant by crabman (26/08/2015) updated by TenPlus1
|
-- refill placed plant by crabman (26/08/2015) updated by TenPlus1
|
||||||
|
|
||||||
function farming.refill_plant(player, plantname, index)
|
function farming.refill_plant(player, plantname, index)
|
||||||
|
|
||||||
if not player then return end
|
local inv = player and player:get_inventory() ; if not inv then return end
|
||||||
|
|
||||||
local inv = player:get_inventory()
|
|
||||||
|
|
||||||
if not inv then return end
|
|
||||||
|
|
||||||
local old_stack = inv:get_stack("main", index)
|
local old_stack = inv:get_stack("main", index)
|
||||||
|
|
||||||
if old_stack:get_name() ~= "" then
|
if old_stack:get_name() ~= "" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
for i, stack in ipairs(inv:get_list("main")) do
|
for i, stack in ipairs(inv:get_list("main")) do
|
||||||
|
|
||||||
@@ -480,62 +420,57 @@ function farming.refill_plant(player, plantname, index)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Place Seeds on Soil
|
-- Place Seeds on Soil
|
||||||
|
|
||||||
function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
||||||
|
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
|
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt or pt.type ~= "node" then
|
if not itemstack or not pt or pt.type ~= "node" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
local under = core.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 = minetest.registered_nodes[under.name]
|
local def = core.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 = minetest.get_node(pt.above)
|
local above = core.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
|
if pt.above.y ~= pt.under.y + 1 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return if any of the nodes is not registered
|
-- return if any of the nodes is not registered
|
||||||
if not minetest.registered_nodes[under.name]
|
if not core.registered_nodes[under.name]
|
||||||
or not minetest.registered_nodes[above.name] then
|
or not core.registered_nodes[above.name] then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- can I replace above node, and am I pointing at soil
|
-- can I replace above node, and am I pointing directly at soil
|
||||||
if not minetest.registered_nodes[above.name].buildable_to
|
if not core.registered_nodes[above.name].buildable_to
|
||||||
or minetest.get_item_group(under.name, "soil") < 2
|
or core.get_item_group(under.name, "soil") < 2
|
||||||
-- avoid multiple seed placement bug
|
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 minetest.is_protected(pt.above, name) then
|
if not core.is_protected(pt.above, name) then
|
||||||
|
|
||||||
local p2 = minetest.registered_nodes[plantname].place_param2 or 1
|
local p2 = core.registered_nodes[plantname].place_param2 or 1
|
||||||
|
|
||||||
minetest.set_node(pt.above, {name = plantname, param2 = p2})
|
core.set_node(pt.above, {name = plantname, param2 = p2})
|
||||||
|
|
||||||
farming.start_seed_timer(pt.above)
|
farming.start_seed_timer(pt.above)
|
||||||
--minetest.get_node_timer(pt.above):start(1)
|
|
||||||
--farming.handle_growth(pt.above)--, node)
|
|
||||||
|
|
||||||
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
core.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
||||||
|
|
||||||
|
core.log("action", string.format("%s planted %s at %s",
|
||||||
|
(placer and placer:is_player() and placer:get_player_name() or "A mod"),
|
||||||
|
itemstack:get_name(), core.pos_to_string(pt.above)
|
||||||
|
))
|
||||||
|
|
||||||
if placer and itemstack
|
if placer and itemstack
|
||||||
and not farming.is_creative(placer:get_player_name()) then
|
and not farming.is_creative(placer:get_player_name()) then
|
||||||
@@ -547,12 +482,8 @@ farming.start_seed_timer(pt.above)
|
|||||||
-- check for refill
|
-- check for refill
|
||||||
if itemstack:get_count() == 0 then
|
if itemstack:get_count() == 0 then
|
||||||
|
|
||||||
minetest.after(0.2,
|
core.after(0.2, farming.refill_plant,
|
||||||
farming.refill_plant,
|
placer, name, placer:get_wield_index())
|
||||||
placer,
|
|
||||||
name,
|
|
||||||
placer:get_wield_index()
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -560,13 +491,11 @@ farming.start_seed_timer(pt.above)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Function to register plants (default farming compatibility)
|
-- Function to register plants (default farming compatibility)
|
||||||
farming.register_plant = function(name, def)
|
|
||||||
|
|
||||||
if not def.steps then
|
function farming.register_plant(name, def)
|
||||||
return nil
|
|
||||||
end
|
if not def.steps then return nil end
|
||||||
|
|
||||||
local mname = name:split(":")[1]
|
local mname = name:split(":")[1]
|
||||||
local pname = name:split(":")[2]
|
local pname = name:split(":")[2]
|
||||||
@@ -574,11 +503,11 @@ farming.register_plant = function(name, def)
|
|||||||
-- Check def
|
-- Check def
|
||||||
def.description = def.description or S("Seed")
|
def.description = def.description or S("Seed")
|
||||||
def.inventory_image = def.inventory_image or "unknown_item.png"
|
def.inventory_image = def.inventory_image or "unknown_item.png"
|
||||||
def.minlight = def.minlight or 12
|
def.minlight = def.minlight or farming.min_light
|
||||||
def.maxlight = def.maxlight or 15
|
def.maxlight = def.maxlight or farming.max_light
|
||||||
|
|
||||||
-- Register seed
|
-- Register seed
|
||||||
minetest.register_node(":" .. mname .. ":seed_" .. pname, {
|
core.register_node(":" .. mname .. ":seed_" .. pname, {
|
||||||
|
|
||||||
description = def.description,
|
description = def.description,
|
||||||
tiles = {def.inventory_image},
|
tiles = {def.inventory_image},
|
||||||
@@ -589,34 +518,35 @@ farming.register_plant = function(name, def)
|
|||||||
seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1,
|
seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1,
|
||||||
compostability = 65, handy = 1
|
compostability = 65, handy = 1
|
||||||
},
|
},
|
||||||
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
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 = minetest.registered_nodes[mname .. ":" .. pname .. "_1"]
|
local def = core.registered_nodes[mname .. ":" .. pname .. "_1"]
|
||||||
|
|
||||||
if def then
|
if def then
|
||||||
minetest.swap_node(pos, {
|
core.set_node(pos, {name = def.name, param2 = def.place_param2})
|
||||||
name = def.next_plant,
|
|
||||||
param2 = def.place_param2
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing,
|
return farming.place_seed(itemstack, placer, pointed_thing,
|
||||||
mname .. ":seed_" .. pname)
|
mname .. ":seed_" .. pname)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Register harvest
|
-- Register harvest
|
||||||
minetest.register_craftitem(":" .. mname .. ":" .. pname, {
|
core.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},
|
||||||
@@ -661,7 +591,10 @@ farming.register_plant = function(name, def)
|
|||||||
next_plant = mname .. ":" .. pname .. "_" .. (i + 1)
|
next_plant = mname .. ":" .. pname .. "_" .. (i + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node(node_name, {
|
local desc = pname:gsub("^%l", string.upper)
|
||||||
|
|
||||||
|
core.register_node(node_name, {
|
||||||
|
description = S(desc) .. S(" Crop"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
waving = 1,
|
waving = 1,
|
||||||
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
|
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
|
||||||
@@ -674,104 +607,116 @@ farming.register_plant = function(name, def)
|
|||||||
drop = drop,
|
drop = drop,
|
||||||
selection_box = sel,
|
selection_box = sel,
|
||||||
groups = g,
|
groups = g,
|
||||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
_mcl_hardness = farming.mcl_hardness,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
minlight = def.minlight,
|
minlight = def.minlight,
|
||||||
maxlight = def.maxlight,
|
maxlight = def.maxlight,
|
||||||
next_plant = next_plant
|
next_plant = next_plant
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add to farming.registered_plants
|
-- add to farming.registered_plants
|
||||||
farming.registered_plants[mname .. ":" .. pname] = {
|
farming.registered_plants[mname .. ":" .. pname] = {
|
||||||
crop = mname .. ":" .. pname,
|
crop = mname .. ":" .. pname,
|
||||||
seed = mname .. ":seed_" .. pname,
|
seed = mname .. ":seed_" .. pname,
|
||||||
steps = def.steps,
|
steps = def.steps,
|
||||||
minlight = def.minlight,
|
minlight = def.minlight,
|
||||||
maxlight = def.maxlight
|
maxlight = def.maxlight
|
||||||
}
|
}
|
||||||
--print(dump(farming.registered_plants[mname .. ":" .. pname]))
|
-- print(dump(farming.registered_plants[mname .. ":" .. pname]))
|
||||||
-- Return info
|
|
||||||
return {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname}
|
return {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- default settings
|
-- default settings
|
||||||
|
|
||||||
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.001
|
farming.carrot = 0.002
|
||||||
farming.potato = 0.001
|
farming.potato = 0.002
|
||||||
farming.tomato = 0.001
|
farming.tomato = 0.002
|
||||||
farming.cucumber = 0.001
|
farming.cucumber = 0.002
|
||||||
farming.corn = 0.001
|
farming.corn = 0.002
|
||||||
farming.coffee = 0.001
|
farming.coffee = 0.002
|
||||||
farming.melon = 0.001
|
farming.melon = 0.009
|
||||||
farming.pumpkin = 0.001
|
farming.pumpkin = 0.009
|
||||||
farming.cocoa = true
|
farming.cocoa = true
|
||||||
farming.raspberry = 0.001
|
farming.raspberry = 0.002
|
||||||
farming.blueberry = 0.001
|
farming.blueberry = 0.002
|
||||||
farming.rhubarb = 0.001
|
farming.rhubarb = 0.002
|
||||||
farming.beans = 0.001
|
farming.beans = 0.002
|
||||||
farming.grapes = 0.001
|
farming.grapes = 0.002
|
||||||
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.001
|
farming.garlic = 0.002
|
||||||
farming.onion = 0.001
|
farming.onion = 0.002
|
||||||
farming.pepper = 0.002
|
farming.pepper = 0.002
|
||||||
farming.pineapple = 0.001
|
farming.pineapple = 0.003
|
||||||
farming.peas = 0.001
|
farming.peas = 0.002
|
||||||
farming.beetroot = 0.001
|
farming.beetroot = 0.002
|
||||||
farming.mint = 0.005
|
farming.mint = 0.005
|
||||||
farming.cabbage = 0.001
|
farming.cabbage = 0.002
|
||||||
farming.blackberry = 0.002
|
farming.blackberry = 0.002
|
||||||
farming.soy = 0.001
|
farming.soy = 0.002
|
||||||
farming.vanilla = 0.001
|
farming.vanilla = 0.002
|
||||||
farming.lettuce = 0.001
|
farming.lettuce = 0.002
|
||||||
farming.artichoke = 0.001
|
farming.artichoke = 0.002
|
||||||
farming.parsley = 0.002
|
farming.parsley = 0.002
|
||||||
farming.sunflower = 0.001
|
farming.sunflower = 0.002
|
||||||
farming.ginger = 0.002
|
farming.ginger = 0.002
|
||||||
farming.strawberry = not minetest.get_modpath("ethereal") and 0.002
|
farming.strawberry = 0.002
|
||||||
|
farming.cotton = 0.003
|
||||||
farming.grains = true
|
farming.grains = true
|
||||||
farming.rice = true
|
farming.rice = true
|
||||||
|
|
||||||
|
|
||||||
-- Load new global settings if found inside mod folder
|
-- Load new global settings if found inside mod folder
|
||||||
|
|
||||||
local input = io.open(farming.path .. "/farming.conf", "r")
|
local input = io.open(farming.path .. "/farming.conf", "r")
|
||||||
if input then
|
|
||||||
dofile(farming.path .. "/farming.conf")
|
if input then dofile(farming.path .. "/farming.conf") ; input:close() end
|
||||||
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 = minetest.get_worldpath()
|
|
||||||
|
local worldpath = core.get_worldpath()
|
||||||
|
|
||||||
input = io.open(worldpath .. "/farming.conf", "r")
|
input = io.open(worldpath .. "/farming.conf", "r")
|
||||||
if input then
|
|
||||||
dofile(worldpath .. "/farming.conf")
|
if input then dofile(worldpath .. "/farming.conf") ; input:close() end
|
||||||
input:close()
|
|
||||||
|
-- helper function to add {eatable} group to food items, also {flammable}
|
||||||
|
|
||||||
|
function farming.add_eatable(item, hp)
|
||||||
|
|
||||||
|
local def = core.registered_items[item]
|
||||||
|
|
||||||
|
if def then
|
||||||
|
|
||||||
|
local groups = table.copy(def.groups) or {}
|
||||||
|
|
||||||
|
groups.eatable = hp ; groups.flammable = 2
|
||||||
|
|
||||||
|
core.override_item(item, {groups = groups})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- recipe items
|
-- recipe item list and alternatives
|
||||||
dofile(farming.path .. "/items.lua")
|
|
||||||
|
|
||||||
-- important items
|
dofile(farming.path .. "/item_list.lua")
|
||||||
if minetest.get_modpath("default") then
|
|
||||||
|
-- setup soil, register hoes, override grass
|
||||||
|
|
||||||
|
if core.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
|
||||||
|
|
||||||
dofile(farming.path.."/grass.lua")
|
dofile(farming.path.."/grass.lua")
|
||||||
dofile(farming.path.."/utensils.lua")
|
|
||||||
|
|
||||||
-- default crops
|
|
||||||
if not farming.mcl then
|
|
||||||
dofile(farming.path.."/crops/wheat.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
dofile(farming.path.."/crops/cotton.lua")
|
|
||||||
|
|
||||||
-- disable crops Mineclone already has
|
-- disable crops Mineclone already has
|
||||||
|
|
||||||
if farming.mcl then
|
if farming.mcl then
|
||||||
farming.carrot = nil
|
farming.carrot = nil
|
||||||
farming.potato = nil
|
farming.potato = nil
|
||||||
@@ -780,14 +725,17 @@ if farming.mcl then
|
|||||||
farming.beetroot = nil
|
farming.beetroot = nil
|
||||||
farming.sunflower = nil
|
farming.sunflower = nil
|
||||||
farming.pumpkin = nil
|
farming.pumpkin = nil
|
||||||
|
else
|
||||||
|
dofile(farming.path.."/crops/wheat.lua") -- default crop outwith mineclone
|
||||||
end
|
end
|
||||||
|
|
||||||
|
dofile(farming.path.."/crops/cotton.lua") -- default crop
|
||||||
|
|
||||||
-- helper function
|
-- helper function
|
||||||
|
|
||||||
local function ddoo(file, check)
|
local function ddoo(file, check)
|
||||||
|
|
||||||
if check then
|
if check then dofile(farming.path .. "/crops/" .. file) end
|
||||||
dofile(farming.path .. "/crops/" .. file)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add additional crops and food (if enabled)
|
-- add additional crops and food (if enabled)
|
||||||
@@ -814,7 +762,7 @@ ddoo("pineapple.lua", farming.pineapple)
|
|||||||
ddoo("peas.lua", farming.peas)
|
ddoo("peas.lua", farming.peas)
|
||||||
ddoo("beetroot.lua", farming.beetroot)
|
ddoo("beetroot.lua", farming.beetroot)
|
||||||
ddoo("chili.lua", farming.chili)
|
ddoo("chili.lua", farming.chili)
|
||||||
ddoo("ryeoatrice.lua", farming.grains)
|
ddoo("rye_oat.lua", farming.grains)
|
||||||
ddoo("rice.lua", farming.rice)
|
ddoo("rice.lua", farming.rice)
|
||||||
ddoo("mint.lua", farming.mint)
|
ddoo("mint.lua", farming.mint)
|
||||||
ddoo("cabbage.lua", farming.cabbage)
|
ddoo("cabbage.lua", farming.cabbage)
|
||||||
@@ -831,13 +779,18 @@ ddoo("eggplant.lua", farming.eggplant)
|
|||||||
ddoo("spinach.lua", farming.eggplant)
|
ddoo("spinach.lua", farming.eggplant)
|
||||||
ddoo("ginger.lua", farming.ginger)
|
ddoo("ginger.lua", farming.ginger)
|
||||||
|
|
||||||
dofile(farming.path .. "/food.lua")
|
-- register food items, non-food items, recipes and stairs
|
||||||
|
|
||||||
|
dofile(farming.path .. "/item_non_food.lua")
|
||||||
|
dofile(farming.path .. "/item_food.lua")
|
||||||
|
dofile(farming.path .. "/item_recipes.lua")
|
||||||
|
dofile(farming.path .. "/item_stairs.lua")
|
||||||
|
|
||||||
if not farming.mcl then
|
if not farming.mcl then
|
||||||
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
|
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("lucky_block") then
|
if core.get_modpath("lucky_block") then
|
||||||
dofile(farming.path .. "/lucky_block.lua")
|
dofile(farming.path .. "/lucky_block.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
1034
item_food.lua
Normal file
@@ -1,21 +1,24 @@
|
|||||||
|
|
||||||
-- add group function
|
-- add group helper
|
||||||
|
|
||||||
local function add_groups(item, groups)
|
local function add_groups(item, groups)
|
||||||
|
|
||||||
local def = minetest.registered_items[item]
|
local def = core.registered_items[item]
|
||||||
|
|
||||||
if not def then return end
|
if def then
|
||||||
|
|
||||||
local grp = def.groups
|
local grps = table.copy(def.groups) or {}
|
||||||
|
|
||||||
for k, v in pairs(groups) do
|
for k, v in pairs(groups) do
|
||||||
grp[k] = v
|
grps[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
core.override_item(item, {groups = grps})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.override_item(item, {groups = grp})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- default recipe items
|
-- default recipe items
|
||||||
|
|
||||||
farming.recipe_items = {
|
farming.recipe_items = {
|
||||||
|
|
||||||
-- if utensils are disabled then use blank item
|
-- if utensils are disabled then use blank item
|
||||||
@@ -62,7 +65,8 @@ farming.recipe_items = {
|
|||||||
add_groups("default:apple", {food_apple = 1})
|
add_groups("default:apple", {food_apple = 1})
|
||||||
|
|
||||||
|
|
||||||
-- change recipe items to mineclone variations
|
-- if mineclone found then change recipe items
|
||||||
|
|
||||||
if farming.mcl then
|
if farming.mcl then
|
||||||
|
|
||||||
local a = farming.recipe_items
|
local a = farming.recipe_items
|
||||||
@@ -97,6 +101,8 @@ if farming.mcl then
|
|||||||
a.stone = "mcl_core:stone"
|
a.stone = "mcl_core:stone"
|
||||||
a.glass = "mcl_core:glass"
|
a.glass = "mcl_core:glass"
|
||||||
|
|
||||||
|
-- add missing groups for recipes to work properly
|
||||||
|
|
||||||
add_groups("mcl_core:sugar", {food_sugar = 1})
|
add_groups("mcl_core:sugar", {food_sugar = 1})
|
||||||
add_groups("mcl_throwing:egg", {food_egg = 1})
|
add_groups("mcl_throwing:egg", {food_egg = 1})
|
||||||
add_groups("mcl_farming:wheat_item", {food_wheat = 1})
|
add_groups("mcl_farming:wheat_item", {food_wheat = 1})
|
||||||
@@ -114,8 +120,6 @@ if farming.mcl then
|
|||||||
add_groups("mcl_mobitems:milk_bucket", {food_milk = 1})
|
add_groups("mcl_mobitems:milk_bucket", {food_milk = 1})
|
||||||
add_groups("mcl_ocean:dried_kelp", {food_seaweed = 1})
|
add_groups("mcl_ocean:dried_kelp", {food_seaweed = 1})
|
||||||
add_groups("mcl_potions:river_water", {food_glass_water = 1})
|
add_groups("mcl_potions:river_water", {food_glass_water = 1})
|
||||||
|
|
||||||
-- add missing food groups to current items so recipes work
|
|
||||||
add_groups("mcl_dye:yellow", {food_lemon = 1, food_banana = 1})
|
add_groups("mcl_dye:yellow", {food_lemon = 1, food_banana = 1})
|
||||||
add_groups("mcl_dye:orange", {food_orange = 1})
|
add_groups("mcl_dye:orange", {food_orange = 1})
|
||||||
add_groups("mcl_flowers:sunflower", {food_olive_oil = 1, food_butter = 1})
|
add_groups("mcl_flowers:sunflower", {food_olive_oil = 1, food_butter = 1})
|
||||||
312
item_non_food.lua
Normal file
@@ -0,0 +1,312 @@
|
|||||||
|
|
||||||
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
|
-- water floorb
|
||||||
|
|
||||||
|
core.register_craftitem("farming:water_floorb", {
|
||||||
|
description = S("Water Floorb"),
|
||||||
|
inventory_image = "farming_water_floorb.png",
|
||||||
|
groups = {flammable = 1}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- saucepan
|
||||||
|
|
||||||
|
core.register_craftitem("farming:saucepan", {
|
||||||
|
description = S("Saucepan"),
|
||||||
|
inventory_image = "farming_saucepan.png",
|
||||||
|
groups = {food_saucepan = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- cooking pot
|
||||||
|
|
||||||
|
core.register_craftitem("farming:pot", {
|
||||||
|
description = S("Cooking Pot"),
|
||||||
|
inventory_image = "farming_pot.png",
|
||||||
|
groups = {food_pot = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- baking tray
|
||||||
|
|
||||||
|
core.register_craftitem("farming:baking_tray", {
|
||||||
|
description = S("Baking Tray"),
|
||||||
|
inventory_image = "farming_baking_tray.png",
|
||||||
|
groups = {food_baking_tray = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- skillet
|
||||||
|
|
||||||
|
core.register_craftitem("farming:skillet", {
|
||||||
|
description = S("Skillet"),
|
||||||
|
inventory_image = "farming_skillet.png",
|
||||||
|
groups = {food_skillet = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- mortar & pestle
|
||||||
|
|
||||||
|
core.register_craftitem("farming:mortar_pestle", {
|
||||||
|
description = S("Mortar and Pestle"),
|
||||||
|
inventory_image = "farming_mortar_pestle.png",
|
||||||
|
groups = {food_mortar_pestle = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- cutting board
|
||||||
|
|
||||||
|
core.register_craftitem("farming:cutting_board", {
|
||||||
|
description = S("Cutting Board"),
|
||||||
|
inventory_image = "farming_cutting_board.png",
|
||||||
|
groups = {food_cutting_board = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- juicer
|
||||||
|
|
||||||
|
core.register_craftitem("farming:juicer", {
|
||||||
|
description = S("Juicer"),
|
||||||
|
inventory_image = "farming_juicer.png",
|
||||||
|
groups = {food_juicer = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- glass mixing bowl
|
||||||
|
|
||||||
|
core.register_craftitem("farming:mixing_bowl", {
|
||||||
|
description = S("Glass Mixing Bowl"),
|
||||||
|
inventory_image = "farming_mixing_bowl.png",
|
||||||
|
groups = {food_mixing_bowl = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Ethanol (thanks to JKMurray for this idea)
|
||||||
|
|
||||||
|
core.register_node("farming:bottle_ethanol", {
|
||||||
|
description = S("Bottle of Ethanol"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_bottle_ethanol.png"},
|
||||||
|
inventory_image = "farming_bottle_ethanol.png",
|
||||||
|
wield_image = "farming_bottle_ethanol.png",
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = false,
|
||||||
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||||
|
},
|
||||||
|
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, handy = 1},
|
||||||
|
sounds = farming.node_sound_glass_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
|
-- straw
|
||||||
|
|
||||||
|
core.register_node("farming:straw", {
|
||||||
|
description = S("Straw"),
|
||||||
|
tiles = {"farming_straw.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
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
|
||||||
|
})
|
||||||
|
|
||||||
|
-- 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
|
||||||
|
|
||||||
|
core.register_node("farming:hemp_oil", {
|
||||||
|
description = S("Bottle of Hemp Oil"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_hemp_oil.png"},
|
||||||
|
inventory_image = "farming_hemp_oil.png",
|
||||||
|
wield_image = "farming_hemp_oil.png",
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = false,
|
||||||
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||||
|
},
|
||||||
|
groups = {
|
||||||
|
food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1,
|
||||||
|
compostability = 45, handy = 1
|
||||||
|
},
|
||||||
|
sounds = farming.node_sound_glass_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
|
-- hemp fibre
|
||||||
|
|
||||||
|
core.register_craftitem("farming:hemp_fibre", {
|
||||||
|
description = S("Hemp Fibre"),
|
||||||
|
inventory_image = "farming_hemp_fibre.png",
|
||||||
|
groups = {compostability = 55}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- hemp block
|
||||||
|
|
||||||
|
core.register_node("farming:hemp_block", {
|
||||||
|
description = S("Hemp Block"),
|
||||||
|
tiles = {"farming_hemp_block.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
groups = {
|
||||||
|
axey = 1, handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2,
|
||||||
|
compostability = 85
|
||||||
|
},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
_mcl_hardness = 0.8,
|
||||||
|
_mcl_blast_resistance = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
-- hemp rope
|
||||||
|
|
||||||
|
core.register_node("farming:hemp_rope", {
|
||||||
|
description = S("Hemp Rope"),
|
||||||
|
walkable = false,
|
||||||
|
climbable = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
tiles = {"farming_hemp_rope.png"},
|
||||||
|
wield_image = "farming_hemp_rope.png",
|
||||||
|
inventory_image = "farming_hemp_rope.png",
|
||||||
|
drawtype = "plantlike",
|
||||||
|
groups = {
|
||||||
|
handy = 1, axey = 1, swordy = 1, flammable = 2, choppy = 3,
|
||||||
|
oddly_breakable_by_hand = 3, compostability = 55
|
||||||
|
},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_leaves_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
|
||||||
|
},
|
||||||
|
_mcl_hardness = 0.8,
|
||||||
|
_mcl_blast_resistance = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
--- Wooden scarecrow base
|
||||||
|
|
||||||
|
core.register_node("farming:scarecrow_bottom", {
|
||||||
|
description = S("Scarecrow Bottom"),
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
tiles = {"default_wood.png"},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
|
||||||
|
{-12/16, 4/16, -1/16, 12/16, 2/16, 1/16},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = {axey = 1, handy = 1, snappy = 3, flammable = 2},
|
||||||
|
is_ground_content = false,
|
||||||
|
_mcl_hardness = 0.8,
|
||||||
|
_mcl_blast_resistance = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
--= Items we shouldn't add when using Mineclonia/VoxeLibre
|
||||||
|
|
||||||
|
if not farming.mcl then
|
||||||
|
|
||||||
|
-- Wooden bowl
|
||||||
|
|
||||||
|
core.register_craftitem("farming:bowl", {
|
||||||
|
description = S("Wooden Bowl"),
|
||||||
|
inventory_image = "farming_bowl.png",
|
||||||
|
groups = {food_bowl = 1, flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- String
|
||||||
|
|
||||||
|
core.register_craftitem("farming:string", {
|
||||||
|
description = S("String"),
|
||||||
|
inventory_image = "farming_string.png",
|
||||||
|
groups = {flammable = 2}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Jack 'O Lantern
|
||||||
|
|
||||||
|
core.register_node("farming:jackolantern", {
|
||||||
|
description = S("Jack 'O Lantern (punch to turn on and off)"),
|
||||||
|
tiles = {
|
||||||
|
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
||||||
|
"farming_pumpkin_bottom.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png^farming_pumpkin_face_off.png"
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {
|
||||||
|
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2
|
||||||
|
},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
|
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
local name = puncher:get_player_name() or ""
|
||||||
|
if core.is_protected(pos, name) then return end
|
||||||
|
node.name = "farming:jackolantern_on"
|
||||||
|
core.swap_node(pos, node)
|
||||||
|
end,
|
||||||
|
_mcl_hardness = 0.8,
|
||||||
|
_mcl_blast_resistance = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
core.register_node("farming:jackolantern_on", {
|
||||||
|
tiles = {
|
||||||
|
"farming_pumpkin_bottom.png^farming_pumpkin_top.png",
|
||||||
|
"farming_pumpkin_bottom.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png",
|
||||||
|
"farming_pumpkin_side.png^farming_pumpkin_face_on.png"
|
||||||
|
},
|
||||||
|
light_source = core.LIGHT_MAX - 1,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {
|
||||||
|
handy = 1, snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2,
|
||||||
|
not_in_creative_inventory = 1
|
||||||
|
},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = farming.node_sound_wood_defaults(),
|
||||||
|
drop = "farming:jackolantern",
|
||||||
|
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
local name = puncher:get_player_name() or ""
|
||||||
|
if core.is_protected(pos, name) then return end
|
||||||
|
node.name = "farming:jackolantern"
|
||||||
|
core.swap_node(pos, node)
|
||||||
|
end,
|
||||||
|
_mcl_hardness = 0.8,
|
||||||
|
_mcl_blast_resistance = 1
|
||||||
|
})
|
||||||
|
end
|
||||||
1461
item_recipes.lua
Normal file
35
item_stairs.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
-- check and register stairs
|
||||||
|
|
||||||
|
if core.global_exists("stairs") then
|
||||||
|
|
||||||
|
if stairs.mod and stairs.mod == "redo" then
|
||||||
|
|
||||||
|
stairs.register_all("straw", "farming:straw",
|
||||||
|
{snappy = 3, flammable = 4},
|
||||||
|
{"farming_straw.png"},
|
||||||
|
"Straw",
|
||||||
|
farming.node_sound_leaves_defaults())
|
||||||
|
|
||||||
|
stairs.register_all("hemp_block", "farming:hemp_block",
|
||||||
|
{snappy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
|
{"farming_hemp_block.png"},
|
||||||
|
"Hemp Block",
|
||||||
|
farming.node_sound_leaves_defaults())
|
||||||
|
else
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("straw", "farming:straw",
|
||||||
|
{snappy = 3, flammable = 4},
|
||||||
|
{"farming_straw.png"},
|
||||||
|
"Straw Stair",
|
||||||
|
"Straw Slab",
|
||||||
|
farming.node_sound_leaves_defaults())
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("hemp_block", "farming:hemp_block",
|
||||||
|
{snappy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
|
{"farming_hemp_block.png"},
|
||||||
|
"Hemp Block Stair",
|
||||||
|
"Hemp Block Slab",
|
||||||
|
farming.node_sound_leaves_defaults())
|
||||||
|
end
|
||||||
|
end
|
||||||
29
license.txt
@@ -24,6 +24,17 @@ THE SOFTWARE.
|
|||||||
License of media (textures):
|
License of media (textures):
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
Created by TenPlus1 (CC0):
|
||||||
|
alt_textures/ethereal_strawberry*.png
|
||||||
|
farming_spanish_potatoes.png
|
||||||
|
|
||||||
|
Created by Hugues Ross (CC BY-SA 4.0):
|
||||||
|
ethereal_strawberry*.png
|
||||||
|
|
||||||
|
Created by NameNotQuality (CC0):
|
||||||
|
farming_vanilla_flan.png
|
||||||
|
farming_spaghetti.png
|
||||||
|
|
||||||
Created by Oz-tal (license: CC BY-SA 3.0):
|
Created by Oz-tal (license: CC BY-SA 3.0):
|
||||||
crops_garlic_*.png
|
crops_garlic_*.png
|
||||||
crops_onion.png
|
crops_onion.png
|
||||||
@@ -164,11 +175,14 @@ Created by VanessaE and edited by SpaghettiToastBook (CC0):
|
|||||||
Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0):
|
Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0):
|
||||||
farming_barley.png
|
farming_barley.png
|
||||||
|
|
||||||
Created by OgelGames (CC BY-SA 4.0)
|
Created by OgelGames (CC BY-SA 4.0):
|
||||||
farming_berry_smoothie.png
|
farming_berry_smoothie.png
|
||||||
farming_cactus_juice.png
|
farming_cactus_juice.png
|
||||||
farming_salad.png
|
farming_salad.png
|
||||||
|
|
||||||
|
Created by Huhues Ross (CC BY-SA 4.0):
|
||||||
|
farming_sunflower_bread.png
|
||||||
|
|
||||||
Created by Felfa (CC0)
|
Created by Felfa (CC0)
|
||||||
farming_blackberry*.png
|
farming_blackberry*.png
|
||||||
farming_lettuce*.png
|
farming_lettuce*.png
|
||||||
@@ -176,12 +190,12 @@ Created by Felfa (CC0)
|
|||||||
farming_vanilla_*.png
|
farming_vanilla_*.png
|
||||||
farming_artichoke*.png
|
farming_artichoke*.png
|
||||||
farming_parsley*.png
|
farming_parsley*.png
|
||||||
farming_paella.png
|
farming_paella*.png
|
||||||
farming_potato_omelette.png
|
farming_potato_omelette.png
|
||||||
farming_spanish_potatoes.png
|
farming_spanish_potatoes_32px.png
|
||||||
farming_vanilla_flan.png
|
farming_vanilla_flan_32px.png
|
||||||
farming_sunflower*.png
|
farming_sunflower*.png [except sunflower_bread.png]
|
||||||
farming_mayo.png
|
farming_mayo*.png
|
||||||
|
|
||||||
Created by gorlock (CC0)
|
Created by gorlock (CC0)
|
||||||
farming_salt_crystal.png
|
farming_salt_crystal.png
|
||||||
@@ -191,7 +205,8 @@ Created by sirrobzeroone (CC0)
|
|||||||
farming_pineapple_ring.png
|
farming_pineapple_ring.png
|
||||||
|
|
||||||
Created by smoke_th (CC0 - https://opengameart.org/content/popcorn-icon)
|
Created by smoke_th (CC0 - https://opengameart.org/content/popcorn-icon)
|
||||||
farming_popcorn.png
|
farming_popcorn_32px.png
|
||||||
|
farming_popcorn.png [resized and edited by TenPlus1]
|
||||||
|
|
||||||
Created by DMBuce (MIT - https://github.com/DMBuce/hatchling-snacks)
|
Created by DMBuce (MIT - https://github.com/DMBuce/hatchling-snacks)
|
||||||
farming_mac_and_cheese.png
|
farming_mac_and_cheese.png
|
||||||
|
|||||||
189
locale/farming.da.tr
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
# textdomain: farming
|
||||||
|
Banana=Banan
|
||||||
|
Banana Leaves=Bananblade
|
||||||
|
Orange=Appelsin
|
||||||
|
Artichoke=Artiskok
|
||||||
|
Crop=Afgrøde
|
||||||
|
Asparagus=Asparges
|
||||||
|
Barley Seed=Bygkorn
|
||||||
|
Barley=Byg
|
||||||
|
Green Beans=Grønne bønner
|
||||||
|
Bean Pole (place on soil before planting beans)=Bønnestang (placer på jord før bønner plantes)
|
||||||
|
Beetroot=Rødbede
|
||||||
|
Blackberries=Brombær
|
||||||
|
Blackberry=Brombær
|
||||||
|
Wild Blueberries=Vilde blåbær
|
||||||
|
Blueberry=Blåbær
|
||||||
|
Cabbage=Kål
|
||||||
|
Carrot=Gulerod
|
||||||
|
Chili Pepper=Chili
|
||||||
|
Raw Cocoa Beans=Rå kakaobønner
|
||||||
|
Cocoa Beans=Kakaobønner
|
||||||
|
Coffee Beans=Kaffebønner
|
||||||
|
Coffee=Kaffe
|
||||||
|
Corn=Majs
|
||||||
|
Cotton Seed=Bomuldsfrø
|
||||||
|
Cotton=Bomuld
|
||||||
|
Wild Cotton=Vild bomuld
|
||||||
|
Cucumber=Agurk
|
||||||
|
Eggplant=Aubergine
|
||||||
|
Garlic clove=Hvidløgsfed
|
||||||
|
Garlic=Hvidløg
|
||||||
|
Ginger=Ingefær
|
||||||
|
Grapes=Druer
|
||||||
|
Trellis (place on soil before planting grapes)=Espalier (placer på jord før druer plantes)
|
||||||
|
Hemp Seed=Hampfrø
|
||||||
|
Hemp Leaf=Hampblad
|
||||||
|
Hemp=Hamp
|
||||||
|
Lettuce=Salat
|
||||||
|
Melon Slice=Melonskive
|
||||||
|
Melon=Melon
|
||||||
|
Mint Seeds=Myntefrø
|
||||||
|
Mint Leaf=Mynteblad
|
||||||
|
Mint=Mynte
|
||||||
|
Onion=Løg
|
||||||
|
Parsley=Persille
|
||||||
|
Pea Pod=Ærteskæl
|
||||||
|
Pea=Ært
|
||||||
|
Peppercorn=Peberkorn
|
||||||
|
Green Pepper=Grøn peberfrugt
|
||||||
|
Yellow Pepper=Gul peberfrugt
|
||||||
|
Red Pepper=Rød peberfrugt
|
||||||
|
Pepper=Peberfrugt
|
||||||
|
Pineapple Top=Ananas-top
|
||||||
|
Pineapple=Ananas
|
||||||
|
Potato=Kartoffel
|
||||||
|
Pumpkin Slice=Græskarstykke
|
||||||
|
Pumpkin=Græskar
|
||||||
|
Raspberries=Hindbær
|
||||||
|
Raspberry=Hindbær
|
||||||
|
Rhubarb=Rabarber
|
||||||
|
Rice Seed=Riskorn
|
||||||
|
Rice=Ris
|
||||||
|
Rye seed=Rugforn
|
||||||
|
Rye=Rug
|
||||||
|
Oat seed=Havrekorn
|
||||||
|
Oats=Havre
|
||||||
|
Soy Pod=Sojabælg
|
||||||
|
Soy=Soya
|
||||||
|
Spinach=Spinat
|
||||||
|
Strawberry=Jordbær
|
||||||
|
Sunflower Seeds=Solsikkefrø
|
||||||
|
Sunflower=Solsikke
|
||||||
|
Tomato=Tomat
|
||||||
|
Vanilla=Vanilje
|
||||||
|
Wheat Seed=Hvedekorn
|
||||||
|
Wheat=Hvede
|
||||||
|
Hoe=Hakke
|
||||||
|
Wooden Hoe=Træhakke
|
||||||
|
Stone Hoe=Stenhakke
|
||||||
|
Steel Hoe=Stålhakke
|
||||||
|
Bronze Hoe=Bronzehakke
|
||||||
|
Mese Hoe=Mesehakke
|
||||||
|
Diamond Hoe=Diamanthakke
|
||||||
|
Wood Hoe=Træhakke
|
||||||
|
Hoe Bomb (use or throw on grassy areas to hoe land)=Hakke-bombe (brug eller kast på græsarealer for at hakke jord)
|
||||||
|
Mithril Scythe (Use to harvest and replant crops)=Mithril-le (brug til at høste og genplante afgrøder)
|
||||||
|
Seed=Frø
|
||||||
|
Flour=Mel
|
||||||
|
Garlic Braid=Hvidløgsfletning
|
||||||
|
Corn on the Cob=Majskolbe
|
||||||
|
Popcorn=Popcorn
|
||||||
|
Cornstarch=Majsstivelse
|
||||||
|
Cup of Coffee=Kop kaffe
|
||||||
|
Bar of Dark Chocolate=Plade mørk chokolade
|
||||||
|
Chocolate Block=Chokoladeblok
|
||||||
|
Bowl of Chili=Chiliret
|
||||||
|
Chili Powder=Chilipulver
|
||||||
|
Carrot Juice=Gulerodssaft
|
||||||
|
Blueberry Pie=Blåbærkage
|
||||||
|
Blueberry Muffin=Blåbærmuffin
|
||||||
|
Tomato Soup=Tomatsuppe
|
||||||
|
Sliced Bread=Skåret brød
|
||||||
|
Toast=Ristet brød
|
||||||
|
Toast Sandwich=Toast
|
||||||
|
Glass of Water=Glas vand
|
||||||
|
Sugar Cube=Sukkertop
|
||||||
|
Caramel=Karamel
|
||||||
|
Salt=Salt
|
||||||
|
Salt crystal=Saltkrystal
|
||||||
|
Mayonnaise=Mayonnaise
|
||||||
|
Rose Water=Rosenvand
|
||||||
|
Turkish Delight=Tyrkisk delight
|
||||||
|
Garlic Bread=Hvidløgsbrød
|
||||||
|
Donut=Donut
|
||||||
|
Chocolate Donut=Chokoladedonut
|
||||||
|
Apple Donut=Æbledonut
|
||||||
|
Porridge=Grød
|
||||||
|
Jaffa Cake= Jaffakage
|
||||||
|
Apple Pie=Æblekage
|
||||||
|
Cactus Juice=Kaktussaft
|
||||||
|
Pasta=Pasta
|
||||||
|
Mac & Cheese=Macaroni med ost
|
||||||
|
Spaghetti=Spaghetti
|
||||||
|
Bibimbap=Bibimbap
|
||||||
|
Burger=Burger
|
||||||
|
Salad=Salat
|
||||||
|
Triple Berry Smoothie=Trebærsmoothie
|
||||||
|
Spanish Potatoes=Spanske kartofler
|
||||||
|
Potato omelette=Kartoflomelet
|
||||||
|
Paella=Paella
|
||||||
|
Vanilla Flan=Vaniljecreme
|
||||||
|
Vegan Cheese=Vegansk ost
|
||||||
|
Vegan Butter=Vegansk smør
|
||||||
|
Onigiri=Onigiri
|
||||||
|
Gyoza=Gyoza
|
||||||
|
Mochi=Mochi
|
||||||
|
Gingerbread Man=Peberkagemand
|
||||||
|
Mint Tea=Myntete
|
||||||
|
Onion Soup=Løgsuppe
|
||||||
|
Pea Soup=Ærtesuppe
|
||||||
|
Ground Pepper=Kværnet peber
|
||||||
|
Pineapple Ring=Ananasskive
|
||||||
|
Pineapple Juice=Ananassaft
|
||||||
|
Cucumber and Potato Salad=Agurk- og kartoflsalat
|
||||||
|
Pumpkin Dough=Græskardej
|
||||||
|
Pumpkin Bread=Græskarbrød
|
||||||
|
Raspberry Smoothie=Hindbærsmoothie
|
||||||
|
Rhubarb Pie=Rabarberkage
|
||||||
|
Rice Flour=Rismel
|
||||||
|
Rice Bread=Risbrød
|
||||||
|
Multigrain Flour=Flerkornsmel
|
||||||
|
Multigrain Bread=Flerkornsbrød
|
||||||
|
Soy Sauce=Sojasovs
|
||||||
|
Soy Milk=Soyamælk
|
||||||
|
Tofu=Tofu
|
||||||
|
Cooked Tofu=Tilberedt tofu
|
||||||
|
Toasted Sunflower Seeds=Ristede solsikkefrø
|
||||||
|
Bottle of Sunflower Oil=Flaske solsikkeolie
|
||||||
|
Sunflower Seed Bread=Solsikkefrøbrød
|
||||||
|
Vanilla Extract=Vaniljeekstrakt
|
||||||
|
Jerusalem Artichokes=Jordskokker
|
||||||
|
Bread=Brød
|
||||||
|
Cookie=Småkage
|
||||||
|
Golden Carrot=Gylden gulerod
|
||||||
|
Beetroot Soup=Rødbedesuppe
|
||||||
|
Sugar=Sukker
|
||||||
|
Baked Potato=Bagt kartoffel
|
||||||
|
Saucepan=Gryde
|
||||||
|
Cooking Pot=Kogegrej
|
||||||
|
Baking Tray=Bageplade
|
||||||
|
Skillet=Stegepande
|
||||||
|
Mortar and Pestle=Morter og stødder
|
||||||
|
Cutting Board=Skærebræt
|
||||||
|
Juicer=Juicer
|
||||||
|
Glass Mixing Bowl=Glasskål
|
||||||
|
Bottle of Ethanol=Flaske ethanol
|
||||||
|
Straw=Strå
|
||||||
|
Bottle of Hemp Oil=Flaske hampolie
|
||||||
|
Hemp Fibre=Hampfiber
|
||||||
|
Hemp Block=Hampblok
|
||||||
|
Hemp Rope=Hampreb
|
||||||
|
Scarecrow Bottom=Fugleskræmselsunderskab
|
||||||
|
Wooden Bowl=Træskål
|
||||||
|
String=Snor
|
||||||
|
Jack 'O Lantern (punch to turn on and off)=Halloween-græskar (bank for at tænde/slukke)
|
||||||
|
Savanna Soil=Savannejord
|
||||||
|
Wet Savanna Soil=Fugtig savannejord
|
||||||
|
Soil=Jord
|
||||||
|
Wet Soil=Fugtig jord
|
||||||
@@ -1,88 +1,79 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Artichoke=
|
|
||||||
Asparagus=
|
|
||||||
Barley Seed=Gerstenkörner
|
|
||||||
Barley=Gerste
|
|
||||||
Green Beans=Grüne Bohnen
|
|
||||||
Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen)
|
|
||||||
Beetroot=Rote Beete
|
|
||||||
Beetroot Soup=Rote Beete Suppe
|
|
||||||
Blackberries=
|
|
||||||
Wild Blueberries=Wilde Blaubeeren
|
|
||||||
Blueberry Muffin=Blaubeermuffin
|
|
||||||
Blueberry Pie=Blaubeerkuchen
|
|
||||||
Cabbage=Kohl
|
|
||||||
Carrot=Möhre
|
|
||||||
Carrot Juice=Möhrensaft
|
|
||||||
Golden Carrot=Goldene Möhre
|
|
||||||
Chili Pepper=Chili
|
|
||||||
Bowl of Chili=Chili Schale
|
|
||||||
Chili Powder=
|
|
||||||
Raw Cocoa Beans=
|
|
||||||
Cocoa Beans=Kakaobohne
|
|
||||||
Cookie=Keks
|
|
||||||
Bar of Dark Chocolate=Tafel Zartbitterschokolade
|
|
||||||
Chocolate Block=Schokoladenstück
|
|
||||||
Coffee Beans=Kaffeebohnen
|
|
||||||
Cup of Coffee=Tasse Kaffee
|
|
||||||
Banana=Banane
|
Banana=Banane
|
||||||
Banana Leaves=Bananenblätter
|
Banana Leaves=Bananenblätter
|
||||||
Orange=Apfelsine
|
Orange=Orange
|
||||||
|
Artichoke=Artischocke
|
||||||
|
Crop=-Pflanze
|
||||||
|
Asparagus=Spargel
|
||||||
|
Barley Seed=Gerstensamen
|
||||||
|
Barley=Gerste
|
||||||
|
Green Beans=Grüne Bohnen
|
||||||
|
Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den@nAckerboden stellen)
|
||||||
|
Beetroot=Rote Beete
|
||||||
|
Blackberries=Brombeeren
|
||||||
|
Blackberry=Brombeere
|
||||||
|
Wild Blueberries=Wilde Blaubeeren
|
||||||
|
Blueberry=Blaubeere
|
||||||
|
Cabbage=Kohl
|
||||||
|
Carrot=Möhre
|
||||||
|
Chili Pepper=Chili
|
||||||
|
Raw Cocoa Beans=Rohe Kakaobohnen
|
||||||
|
Cocoa Beans=Kakaobohnen
|
||||||
|
Coffee Beans=Kaffeebohnen
|
||||||
|
Coffee=Kaffee
|
||||||
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
|
||||||
String=Faden
|
Wild Cotton=Wilde Baumwolle
|
||||||
Cucumber=Gurke
|
Cucumber=Gurke
|
||||||
Eggplant=
|
Eggplant=Aubergine
|
||||||
Glass of Water=
|
|
||||||
Sugar=Zucker
|
|
||||||
Sugar Cube=
|
|
||||||
Caramel=
|
|
||||||
Salt=Salz
|
|
||||||
Mayonnaise=
|
|
||||||
Rose Water=Rosenwasser
|
|
||||||
Turkish Delight=Lokum
|
|
||||||
Garlic Bread=Knoblauchbrot
|
|
||||||
Donut=Donut
|
|
||||||
Chocolate Donut=Schokodonut
|
|
||||||
Apple Donut=Apfeldonut
|
|
||||||
Porridge=Haferbrei
|
|
||||||
Jaffa Cake=Jaffakeks
|
|
||||||
Apple Pie=Apfelkuchen
|
|
||||||
Cactus Juice=Kaktussaft
|
|
||||||
Pasta=Pasta
|
|
||||||
Mac & Cheese=
|
|
||||||
Spaghetti=Spaghetti
|
|
||||||
Bibimbap=Bibimbap
|
|
||||||
Burger=
|
|
||||||
Salad=Salat
|
|
||||||
Triple Berry Smoothie=
|
|
||||||
Spanish Potatoes=
|
|
||||||
Potato omelet=
|
|
||||||
Paella=
|
|
||||||
Vanilla Flan=
|
|
||||||
Vegan Cheese=
|
|
||||||
Onigiri=
|
|
||||||
Gyoza=
|
|
||||||
Mochi=
|
|
||||||
Gingerbread Man=
|
|
||||||
Garlic clove=Knoblauchzehe
|
Garlic clove=Knoblauchzehe
|
||||||
Garlic=Knoblauch
|
Garlic=Knoblauch
|
||||||
Garlic Braid=Knoblauchzopf
|
Ginger=Lebkuchen
|
||||||
Ginger=
|
|
||||||
Grapes=Weintrauben
|
Grapes=Weintrauben
|
||||||
Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen)
|
Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den@nAckerboden stellen)
|
||||||
Hemp Seed=Hanfsamen
|
Hemp Seed=Hanfsamen
|
||||||
Hemp Leaf=Hanfblatt
|
Hemp Leaf=Hanfblatt
|
||||||
Bottle of Hemp Oil=Flasche mit Hanföl
|
Hemp=Hanf
|
||||||
Hemp Fibre=Hanffaser
|
Lettuce=Kopfsalat
|
||||||
Hemp Block=Hanfblock
|
Melon Slice=Melonenscheibe
|
||||||
Hemp Rope=Hanfseil
|
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
|
Hoe=Hacke
|
||||||
Wooden Hoe=Holzhacke
|
Wooden Hoe=Holzhacke
|
||||||
Stone Hoe=Steinhacke
|
Stone Hoe=Steinhacke
|
||||||
@@ -90,72 +81,90 @@ Steel Hoe=Stahlhacke
|
|||||||
Bronze Hoe=Bronzehacke
|
Bronze Hoe=Bronzehacke
|
||||||
Mese Hoe=Mesehacke
|
Mese Hoe=Mesehacke
|
||||||
Diamond Hoe=Diamanthacke
|
Diamond Hoe=Diamanthacke
|
||||||
Wood Hoe=
|
Wood Hoe=Holzhacke
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen)
|
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)=
|
Mithril Scythe (Use to harvest and replant crops)=Mithrilsichel (Benutzen, um Nutzpflanzen zu ernten und neu zu pflanzen)
|
||||||
Seed=Saatgut
|
Seed=Saatgut
|
||||||
Lettuce=
|
Flour=Mehl
|
||||||
Melon Slice=Melonenscheibe
|
Garlic Braid=Knoblauchzopf
|
||||||
Melon=Melone
|
Corn on the Cob=Maiskolben
|
||||||
Mint Seeds=Minzsamen
|
Popcorn=Popcorn
|
||||||
Mint Leaf=Minzblatt
|
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 crystal=Salzkristall
|
||||||
|
Mayonnaise=Mayonnaise
|
||||||
|
Rose Water=Rosenwasser
|
||||||
|
Turkish Delight=Lokum
|
||||||
|
Garlic Bread=Knoblauchbrot
|
||||||
|
Donut=Donut
|
||||||
|
Chocolate Donut=Schokodonut
|
||||||
|
Apple Donut=Apfeldonut
|
||||||
|
Porridge=Haferbrei
|
||||||
|
Jaffa Cake=Jaffa
|
||||||
|
Apple Pie=Apfelkuchen
|
||||||
|
Cactus Juice=Kaktussaft
|
||||||
|
Pasta=Pasta
|
||||||
|
Mac & Cheese=Makkaroni mit Käse
|
||||||
|
Spaghetti=Spaghetti
|
||||||
|
Bibimbap=Bibimbap
|
||||||
|
Burger=Burger
|
||||||
|
Salad=Salat
|
||||||
|
Triple Berry Smoothie=Dreibeersmoothie
|
||||||
|
Spanish Potatoes=Spanische Kartoffeln
|
||||||
|
Potato omelette=Kartoffelomelette
|
||||||
|
Paella=Paella
|
||||||
|
Vanilla Flan=Vanilletorte
|
||||||
|
Vegan Cheese=Veganer Käse
|
||||||
|
Vegan Butter=Vegane Butter
|
||||||
|
Onigiri=Onigiri
|
||||||
|
Gyoza=Gyoza
|
||||||
|
Mochi=Mochi
|
||||||
|
Gingerbread Man=Lebkuchenmann
|
||||||
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
|
||||||
Potato=Kartoffel
|
Cucumber and Potato Salad=Gurken-Kartoffelsalat
|
||||||
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 Dough=Kürbisteig
|
Pumpkin Dough=Kürbisteig
|
||||||
Pumpkin=Kürbis
|
Pumpkin Bread=Kürbisbrot
|
||||||
Raspberries=Himbeeren
|
|
||||||
Raspberry Smoothie=Himbeersmoothie
|
Raspberry Smoothie=Himbeersmoothie
|
||||||
Rhubarb=Rhabarber
|
|
||||||
Rhubarb Pie=Rhabarberkuchen
|
Rhubarb Pie=Rhabarberkuchen
|
||||||
Rice Seed=
|
|
||||||
Rice=Reis
|
|
||||||
Rice Bread=Reiswaffel
|
|
||||||
Rice Flour=Reismehl
|
Rice Flour=Reismehl
|
||||||
Rye seed=Roggensaat
|
Rice Bread=Reiswaffel
|
||||||
Rye=Roggen
|
|
||||||
Oat seed=Hafersamen
|
|
||||||
Oats=Hafer
|
|
||||||
Multigrain Flour=Mehrkornmehl
|
Multigrain Flour=Mehrkornmehl
|
||||||
Multigrain Bread=Mehrkornbrot
|
Multigrain Bread=Mehrkornbrot
|
||||||
Savanna Soil=Savannaerde
|
Soy Sauce=Sojasoße
|
||||||
Wet Savanna Soil=Feuchte Savannaerde
|
Soy Milk=Sojamilch
|
||||||
Soil=Ackerboden
|
Tofu=Tofu
|
||||||
Wet Soil=Bewässerter Ackerboden
|
Cooked Tofu=Gekochter Tofu
|
||||||
Soy Pod=
|
Toasted Sunflower Seeds=Geröstete Sonnenblumensamen
|
||||||
Soy Sauce=
|
Bottle of Sunflower Oil=Flasche Sonnenblumenöl
|
||||||
Soy Milk=
|
Sunflower Seed Bread=Sonnenblumensamenbrot
|
||||||
Tofu=
|
Vanilla Extract=Vanilleextrakt
|
||||||
Cooked Tofu=
|
Jerusalem Artichokes=Jerusalemartischocken
|
||||||
Spinach=
|
Bread=Brot
|
||||||
Strawberry=Erdbeere
|
Cookie=Keks
|
||||||
Sunflower=
|
Golden Carrot=Goldene Möhre
|
||||||
Sunflower Seeds=
|
Beetroot Soup=Rote-Beete-Suppe
|
||||||
Toasted Sunflower Seeds=
|
Sugar=Zucker
|
||||||
Bottle of Sunflower Oil=
|
Baked Potato=Ofenkartoffel
|
||||||
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
|
||||||
@@ -164,13 +173,17 @@ 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
|
||||||
Vanilla=
|
Bottle of Ethanol=Flasche Ethanol
|
||||||
Vanilla Extract=
|
|
||||||
Wheat Seed=Weizenkörner
|
|
||||||
Wheat=Weizen
|
|
||||||
Straw=Stroh
|
Straw=Stroh
|
||||||
Flour=Mehl
|
Bottle of Hemp Oil=Flasche mit Hanföl
|
||||||
Bread=Brot
|
Hemp Fibre=Hanffaser
|
||||||
Sliced Bread=Geschnittenes Brot
|
Hemp Block=Hanfblock
|
||||||
Toast=Toast
|
Hemp Rope=Hanfseil
|
||||||
Toast Sandwich=Toast Sandwich
|
Scarecrow Bottom=Vogelscheuchengestell
|
||||||
|
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,4 +1,5 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
|
Crop=
|
||||||
Artichoke=
|
Artichoke=
|
||||||
Asparagus=
|
Asparagus=
|
||||||
Barley Seed=
|
Barley Seed=
|
||||||
@@ -7,8 +8,10 @@ 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=
|
||||||
Wild Blueberries=
|
Wild Blueberries=
|
||||||
|
Blueberry=
|
||||||
Blueberry Muffin=
|
Blueberry Muffin=
|
||||||
Blueberry Pie=
|
Blueberry Pie=
|
||||||
Cabbage=
|
Cabbage=
|
||||||
@@ -23,6 +26,7 @@ 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=
|
||||||
@@ -77,6 +81,7 @@ 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=
|
||||||
@@ -97,14 +102,17 @@ 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=
|
||||||
@@ -123,6 +131,7 @@ Scarecrow Bottom=
|
|||||||
Pumpkin Bread=
|
Pumpkin Bread=
|
||||||
Pumpkin Dough=
|
Pumpkin Dough=
|
||||||
Pumpkin=
|
Pumpkin=
|
||||||
|
Raspberry=
|
||||||
Raspberries=
|
Raspberries=
|
||||||
Raspberry Smoothie=
|
Raspberry Smoothie=
|
||||||
Rhubarb=
|
Rhubarb=
|
||||||
@@ -141,6 +150,7 @@ 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=
|
||||||
|
|||||||
186
locale/farming.hu.tr
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
# textdomain: farming
|
||||||
|
Crop= Termény
|
||||||
|
Artichoke=Articsóka
|
||||||
|
Asparagus=Spárga
|
||||||
|
Barley Seed=Árpamag
|
||||||
|
Barley=Árpa
|
||||||
|
Green Beans=Zöldbab
|
||||||
|
Bean Pole (place on soil before planting beans)=Karó babhoz (szúrd a földbe és oda vess babot)
|
||||||
|
Beetroot=Cékla
|
||||||
|
Beetroot Soup=Céklaleves
|
||||||
|
Blackberry=Szeder
|
||||||
|
Blackberries=Szedrek
|
||||||
|
Wild Blueberries=Vadáfonya
|
||||||
|
Blueberry=Áfonya
|
||||||
|
Blueberry Muffin=Áfonyamuffin
|
||||||
|
Blueberry Pie=Áfonyatorta
|
||||||
|
Cabbage=Káposzta
|
||||||
|
Carrot=Répa
|
||||||
|
Carrot Juice=Répalé
|
||||||
|
Golden Carrot=Aranyrépa
|
||||||
|
Chili Pepper=Chilipaprika
|
||||||
|
Bowl of Chili=Chilis tál
|
||||||
|
Chili Powder=Chilipor
|
||||||
|
Raw Cocoa Beans=Nyers kakaóbab
|
||||||
|
Cocoa Beans=Kakaóbab
|
||||||
|
Cookie=Süti
|
||||||
|
Bar of Dark Chocolate=Étcsoki rúd
|
||||||
|
Chocolate Block=Csokoládé tömb
|
||||||
|
Coffee=Kávé
|
||||||
|
Coffee Beans=Kávébab
|
||||||
|
Cup of Coffee=Csésze kávé
|
||||||
|
Banana=Banán
|
||||||
|
Banana Leaves=Banánlevél
|
||||||
|
Orange=Narancs
|
||||||
|
Corn=Kukorica
|
||||||
|
Corn on the Cob=Főtt kukorica
|
||||||
|
Popcorn=Pattogatott kukorica
|
||||||
|
Cornstarch=Keményítő
|
||||||
|
Bottle of Ethanol=Üveg etanol
|
||||||
|
Wild Cotton=Vadgyapot
|
||||||
|
Cotton Seed=Gyapotmag
|
||||||
|
Cotton=Gyapot
|
||||||
|
String=Madzag
|
||||||
|
Cucumber=Uborka
|
||||||
|
Eggplant=Padlizsán
|
||||||
|
Glass of Water=Pohár víz
|
||||||
|
Sugar=Cukor
|
||||||
|
Sugar Cube=Kockacukor
|
||||||
|
Caramel=Karamell
|
||||||
|
Salt=Só
|
||||||
|
Mayonnaise=Majonéz
|
||||||
|
Rose Water=Rózsavíz
|
||||||
|
Turkish Delight=Török desszert
|
||||||
|
Garlic Bread=Fokhagymás kenyér
|
||||||
|
Donut=Fánk
|
||||||
|
Chocolate Donut=Csokis fánk
|
||||||
|
Apple Donut=Almás fánk
|
||||||
|
Porridge=Zabkása
|
||||||
|
Jaffa Cake=Jaffatorta
|
||||||
|
Apple Pie=Almáspite
|
||||||
|
Cactus Juice=Kaktuszlé
|
||||||
|
Pasta=Tészta
|
||||||
|
Mac & Cheese=Sajtos makaróni
|
||||||
|
Spaghetti=Spagetti
|
||||||
|
Bibimbap=Bibimbap
|
||||||
|
Burger=Burger
|
||||||
|
Salad=Saláta
|
||||||
|
Triple Berry Smoothie=Hárombogyós turmix
|
||||||
|
Spanish Potatoes=Tepsis krumpli
|
||||||
|
Potato omelet=Krumplis rántotta
|
||||||
|
Paella=Paella
|
||||||
|
Vanilla Flan=Vaníliás gyümölcstorta
|
||||||
|
Vegan Cheese=Vegán sajt
|
||||||
|
Onigiri=Onigiri
|
||||||
|
Gyoza=Gyoza
|
||||||
|
Mochi=Mochi
|
||||||
|
Gingerbread Man=Mézeskalács-emberke
|
||||||
|
Garlic clove=Fokhagymagerezd
|
||||||
|
Garlic=Fokhagyma
|
||||||
|
Garlic Braid=Fokhagymafüzér
|
||||||
|
Ginger=Gyömbér
|
||||||
|
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)
|
||||||
|
Hemp=Kender
|
||||||
|
Hemp Seed=Kendermag
|
||||||
|
Hemp Leaf=Kenderlevél
|
||||||
|
Bottle of Hemp Oil=Üveg kenderolaj
|
||||||
|
Hemp Fibre=Kenderrost
|
||||||
|
Hemp Block=Kender tömb
|
||||||
|
Hemp Rope=Kenderkötél
|
||||||
|
Hoe=Kapa
|
||||||
|
Wooden Hoe=Fakapa
|
||||||
|
Stone Hoe=Kőkapa
|
||||||
|
Steel Hoe=Acélkapa
|
||||||
|
Bronze Hoe=Bronzkapa
|
||||||
|
Mese Hoe=Mesekapa
|
||||||
|
Diamond Hoe=Gyémántkapa
|
||||||
|
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)
|
||||||
|
Mithril Scythe (Use to harvest and replant crops)=Mithrilkasza (használd termények begyűjtéséhez és újravetéséhez)
|
||||||
|
Seed=Mag
|
||||||
|
Lettuce=Saláta
|
||||||
|
Melon Slice=Dinnyeszelet
|
||||||
|
Melon=Dinnye
|
||||||
|
Mint=Menta
|
||||||
|
Mint Seeds=Mentamag
|
||||||
|
Mint Leaf=Mentalevél
|
||||||
|
Mint Tea=Mentatea
|
||||||
|
Onion=Hagyma
|
||||||
|
Onion Soup=Hagymaleves
|
||||||
|
Parsley=Petrezselyem
|
||||||
|
Pea=Borsó
|
||||||
|
Pea Pod=Hüvelyes borsó
|
||||||
|
Pea Soup=Borsóleves
|
||||||
|
Pepper=Bors
|
||||||
|
Peppercorn=Borsszemek
|
||||||
|
Green Pepper=Zöldpaprika
|
||||||
|
Yellow Pepper=Sárga paprika
|
||||||
|
Red Pepper=Pirospaprika
|
||||||
|
Ground Pepper=Őrölt bors
|
||||||
|
Pineapple Top=Ananászüstök
|
||||||
|
Pineapple=Ananász
|
||||||
|
Pineapple Ring=Ananász szelet
|
||||||
|
Pineapple Juice=Ananászlé
|
||||||
|
Potato=Krumpli
|
||||||
|
Baked Potato=Sült krumpli
|
||||||
|
Cucumber and Potato Salad=Uborkás krumplisaláta
|
||||||
|
Pumpkin Slice=Tök szelet
|
||||||
|
Jack 'O Lantern (punch to turn on and off)=Töklámpás (ütéssel kapcsold ki és be)
|
||||||
|
Scarecrow Bottom=Madárijesztő alja
|
||||||
|
Pumpkin Bread=Tökkenyér
|
||||||
|
Pumpkin Dough=Töktészta
|
||||||
|
Pumpkin=Tök
|
||||||
|
Raspberry=Málna
|
||||||
|
Raspberries=Málnák
|
||||||
|
Raspberry Smoothie=Málnaturmix
|
||||||
|
Rhubarb=Rebarbara
|
||||||
|
Rhubarb Pie=Rebarbaratorta
|
||||||
|
Rice Seed=Rizsmag
|
||||||
|
Rice=Rizs
|
||||||
|
Rice Bread=Rizskenyér
|
||||||
|
Rice Flour=Rizsliszt
|
||||||
|
Rye seed=Rozsmag
|
||||||
|
Rye=Rozs
|
||||||
|
Oat seed=Zabmag
|
||||||
|
Oats=Zab
|
||||||
|
Multigrain Flour=Vegyesliszt
|
||||||
|
Multigrain Bread=Vegyesliszt-kenyér
|
||||||
|
Savanna Soil=Szavannatalaj
|
||||||
|
Wet Savanna Soil=Nedves szavannatalaj
|
||||||
|
Soil=Talaj
|
||||||
|
Wet Soil=Nedves talaj
|
||||||
|
Soy=Szója
|
||||||
|
Soy Pod=Hüvelyes szója
|
||||||
|
Soy Sauce=Szójaszósz
|
||||||
|
Soy Milk=Szójatej
|
||||||
|
Tofu=Tofu
|
||||||
|
Cooked Tofu=Főtt tofu
|
||||||
|
Spinach=Spenót
|
||||||
|
Strawberry=Eper
|
||||||
|
Sunflower=Napraforgó
|
||||||
|
Sunflower Seeds=Napraforgómag
|
||||||
|
Toasted Sunflower Seeds=Pirított napraforgómag
|
||||||
|
Bottle of Sunflower Oil=Üveg napraforgó-olaj
|
||||||
|
Sunflower Seed Bread=Napraforgómagos kenyér
|
||||||
|
Tomato=Paradicsom
|
||||||
|
Tomato Soup=Paradicsomleves
|
||||||
|
Wooden Bowl=Fatál
|
||||||
|
Saucepan=Szószostál
|
||||||
|
Cooking Pot=Főzőedény
|
||||||
|
Baking Tray=Sütőtál
|
||||||
|
Skillet=Serpenyő
|
||||||
|
Mortar and Pestle=Mozsár és zúzó
|
||||||
|
Cutting Board=Vágódeszka
|
||||||
|
Juicer=Facsaró
|
||||||
|
Glass Mixing Bowl=Üver keverőedény
|
||||||
|
Vanilla=Vanília
|
||||||
|
Vanilla Extract=Vaníliakivonat
|
||||||
|
Wheat Seed=Búzamag
|
||||||
|
Wheat=Búza
|
||||||
|
Straw=Szalma
|
||||||
|
Flour=Liszt
|
||||||
|
Bread=Kenyér
|
||||||
|
Sliced Bread=Szeletelt kenyér
|
||||||
|
Toast=Pirítós
|
||||||
|
Toast Sandwich=Pirítósszendvics
|
||||||
186
locale/farming.pl.tr
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
# textdomain: farming
|
||||||
|
Crop=Roślina
|
||||||
|
Artichoke=Karczhoch
|
||||||
|
Asparagus=Szparag
|
||||||
|
Barley Seed=Nasiona Jęczmienia
|
||||||
|
Barley=Jęczmień
|
||||||
|
Green Beans=Fasola
|
||||||
|
Bean Pole (place on soil before planting beans)=Tyczka Fasolowa (postaw na glebie prrzed zasadzeniem fasoli)
|
||||||
|
Beetroot=Burak
|
||||||
|
Beetroot Soup=Barszcz
|
||||||
|
Blackberry=Jeżyna
|
||||||
|
Blackberries=Jeżyny
|
||||||
|
Wild Blueberries=Dzikie borówki
|
||||||
|
Blueberry=Borówka
|
||||||
|
Blueberry Muffin=Muffinka Borówkowa
|
||||||
|
Blueberry Pie=Ciasto Borówkowe
|
||||||
|
Cabbage=Kapusta
|
||||||
|
Carrot=Marchewka
|
||||||
|
Carrot Juice=Sok Marchewkowy
|
||||||
|
Golden Carrot=Złota Marchewka
|
||||||
|
Chili Pepper=Papryka Chili
|
||||||
|
Bowl of Chili=Miska Chili
|
||||||
|
Chili Powder=Chili W Proszku
|
||||||
|
Raw Cocoa Beans=Surowe Ziarna Kakao
|
||||||
|
Cocoa Beans=Ziarna Kakao
|
||||||
|
Cookie=Ciastko
|
||||||
|
Bar of Dark Chocolate=Tabliczka Czarnej Czekolady
|
||||||
|
Chocolate Block=Blok Czekolady
|
||||||
|
Coffee=Kawa
|
||||||
|
Coffee Beans=Ziarna Kawy
|
||||||
|
Cup of Coffee=Filiżanka Kawy
|
||||||
|
Banana=Banan
|
||||||
|
Banana Leaves=Liście Bananowca
|
||||||
|
Orange=Pomarańcza
|
||||||
|
Corn=Kukurydza
|
||||||
|
Corn on the Cob=Pieczona Kukurydza
|
||||||
|
Popcorn=Popcorn
|
||||||
|
Cornstarch=Skrobia Kukurydziana
|
||||||
|
Bottle of Ethanol=Butelka Etanolu
|
||||||
|
Wild Cotton=Dzika Bawełna
|
||||||
|
Cotton Seed=Nasiona Bawełny
|
||||||
|
Cotton=Bawełna
|
||||||
|
String=Nić
|
||||||
|
Cucumber=Ogórek
|
||||||
|
Eggplant=Bakłażan
|
||||||
|
Glass of Water=Szklanka wody
|
||||||
|
Sugar=Cukier
|
||||||
|
Sugar Cube=Kostka Cukru
|
||||||
|
Caramel=Karmel
|
||||||
|
Salt=Sól
|
||||||
|
Mayonnaise=Majonez
|
||||||
|
Rose Water=Woda różana
|
||||||
|
Turkish Delight=Rachatłukum
|
||||||
|
Garlic Bread=Chleb Czosnkowy
|
||||||
|
Donut=Pączek
|
||||||
|
Chocolate Donut=Czekoladowy Pączek
|
||||||
|
Apple Donut=Jabłkowy Pączek
|
||||||
|
Porridge=Owsianka
|
||||||
|
Jaffa Cake=Ciastko Z Dżemem Pomarańczowym
|
||||||
|
Apple Pie=Ciasto Jabłkowe
|
||||||
|
Cactus Juice=Sok Kaktusowy
|
||||||
|
Pasta=Makaron
|
||||||
|
Mac & Cheese=Makaron Z Serem
|
||||||
|
Spaghetti=Spaghetti
|
||||||
|
Bibimbap=Bibimbap
|
||||||
|
Burger=Burger
|
||||||
|
Salad=Sałatka
|
||||||
|
Triple Berry Smoothie=Koktajl Jagodowy
|
||||||
|
Spanish Potatoes=Ziemniaki Po Hiszpańsku
|
||||||
|
Potato omelet=Omlet Z Ziemniakami
|
||||||
|
Paella=Paella
|
||||||
|
Vanilla Flan=Flan Waniliowy
|
||||||
|
Vegan Cheese=Wegański Ser
|
||||||
|
Onigiri=Onigiri
|
||||||
|
Gyoza=Gyoza
|
||||||
|
Mochi=Mochi
|
||||||
|
Gingerbread Man=Piernikowy Ludzik
|
||||||
|
Garlic clove=Ząbek Czosnku
|
||||||
|
Garlic=Czosnek
|
||||||
|
Garlic Braid=Warkocz Czosnku
|
||||||
|
Ginger=Imbir
|
||||||
|
Grapes=Winogrona
|
||||||
|
Trellis (place on soil before planting grapes)=Trelaż (postaw na glebie przed posadzeniem winogron)
|
||||||
|
Hemp=Konopia
|
||||||
|
Hemp Seed=Nasiono Konopii
|
||||||
|
Hemp Leaf=Liść Konopii
|
||||||
|
Bottle of Hemp Oil=Butelka Oleju Konopnego
|
||||||
|
Hemp Fibre=Włókno Konopne
|
||||||
|
Hemp Block=Blok Konopii
|
||||||
|
Hemp Rope=Lina Konopna
|
||||||
|
Hoe=Motyka
|
||||||
|
Wooden Hoe=Drewniana Motyka
|
||||||
|
Stone Hoe=Kamienna Motyka
|
||||||
|
Steel Hoe=Stalowa Motyka
|
||||||
|
Bronze Hoe=Brązowa Motyka
|
||||||
|
Mese Hoe=Mesowa Motyka
|
||||||
|
Diamond Hoe=Diamentowa Motyka
|
||||||
|
Wood Hoe=Drewniana Motyka
|
||||||
|
Hoe Bomb (use or throw on grassy areas to hoe land)=Motykowa Bomba (użyj lub rzuć na trawie, aby spulchniać glebę)
|
||||||
|
Mithril Scythe (Use to harvest and replant crops)=Mithrilowa Kosa (Użyj, aby zbierać i na nowo siać rośliny)
|
||||||
|
Seed=Nasiono
|
||||||
|
Lettuce=Sałata
|
||||||
|
Melon Slice=Kawałek Arbuza
|
||||||
|
Melon=Arbuz
|
||||||
|
Mint=Mięta
|
||||||
|
Mint Seeds=Nasiona Mięty
|
||||||
|
Mint Leaf=Liść Mięty
|
||||||
|
Mint Tea=Liść Herbaty
|
||||||
|
Onion=Cebula
|
||||||
|
Onion Soup=Zupa Cebulowa
|
||||||
|
Parsley=Pietruszka
|
||||||
|
Pea=Groszek
|
||||||
|
Pea Pod=Strąk Groszku
|
||||||
|
Pea Soup=Zupa Crochowa
|
||||||
|
Pepper=Papryka
|
||||||
|
Peppercorn=Ziarna Pieprzu
|
||||||
|
Green Pepper=Zielona Papryka
|
||||||
|
Yellow Pepper=Zółta Papryka
|
||||||
|
Red Pepper=Czerwona Papryka
|
||||||
|
Ground Pepper=Pieprz Mielony
|
||||||
|
Pineapple Top=Piętka Ananasa
|
||||||
|
Pineapple=Ananas
|
||||||
|
Pineapple Ring=Kawałek Ananasa
|
||||||
|
Pineapple Juice=Sok Ananasowy
|
||||||
|
Potato=Ziemniak
|
||||||
|
Baked Potato=Pieczony Ziemniak
|
||||||
|
Cucumber and Potato Salad=Sałatka Ziemniaczana
|
||||||
|
Pumpkin Slice=Kawałek Dyni
|
||||||
|
Jack 'O Lantern (punch to turn on and off)= Latarnia Z Dyni (uderz, aby włączyć lub wyłączyć)
|
||||||
|
Scarecrow Bottom=tułów Stracha Na Wróble
|
||||||
|
Pumpkin Bread=Chleb Dyniowy
|
||||||
|
Pumpkin Dough=Ciasto Dyniowe
|
||||||
|
Pumpkin=Dynia
|
||||||
|
Raspberry=Malina
|
||||||
|
Raspberries=Maliny
|
||||||
|
Raspberry Smoothie=Koktajl Malinowy
|
||||||
|
Rhubarb=Rabarbar
|
||||||
|
Rhubarb Pie=Cisto Rabarbarowe
|
||||||
|
Rice Seed=Nasiona Ryżu
|
||||||
|
Rice=Ryż
|
||||||
|
Rice Bread=Chleb Ryżowy
|
||||||
|
Rice Flour=Mąka Ryżowa
|
||||||
|
Rye seed=Nasiona Żyta
|
||||||
|
Rye=Żyto
|
||||||
|
Oat seed=Nasiona Owsa
|
||||||
|
Oats=Owies
|
||||||
|
Multigrain Flour=Mąka Wielozbożowa
|
||||||
|
Multigrain Bread=Chleb Wielozbożowy
|
||||||
|
Savanna Soil=Sawannowa Gleba
|
||||||
|
Wet Savanna Soil=Wilgotna Sawannowa Gleba
|
||||||
|
Soil=Gleba
|
||||||
|
Wet Soil=Wilgotna Gleba
|
||||||
|
Soy=Soja
|
||||||
|
Soy Pod=Strąk Soi
|
||||||
|
Soy Sauce=Sos Sojowy
|
||||||
|
Soy Milk=Mleko Sojowe
|
||||||
|
Tofu=Tofu
|
||||||
|
Cooked Tofu=Pieczone Tofu
|
||||||
|
Spinach=Szpinak
|
||||||
|
Strawberry=Truskawka
|
||||||
|
Sunflower=Słonecznik
|
||||||
|
Sunflower Seeds=Ziarna Słonecznika
|
||||||
|
Toasted Sunflower Seeds=Piecone Nasiona Słonecznika
|
||||||
|
Bottle of Sunflower Oil=Butelka Oleju Słonecznikowego
|
||||||
|
Sunflower Seed Bread=Chleb Z Ziarnami Słonecznika
|
||||||
|
Tomato=Pomidor
|
||||||
|
Tomato Soup=Zupa Pomidorowa
|
||||||
|
Wooden Bowl=Drewniana Miska
|
||||||
|
Saucepan=Patelnia
|
||||||
|
Cooking Pot=Garnek
|
||||||
|
Baking Tray=Blacha Do Pieczenia
|
||||||
|
Skillet=Rondel
|
||||||
|
Mortar and Pestle=Moździerz I Tłuczek
|
||||||
|
Cutting Board=Deska Do Krojenia
|
||||||
|
Juicer=Wyciskarka Do Soku
|
||||||
|
Glass Mixing Bowl=Miska Do Mieszania
|
||||||
|
Vanilla=Wanilia
|
||||||
|
Vanilla Extract=Ekstrakt Z Wanilii
|
||||||
|
Wheat Seed=Nasiono Pszenicy
|
||||||
|
Wheat=Pszenica
|
||||||
|
Straw=Siano
|
||||||
|
Flour=Mąka
|
||||||
|
Bread=Chleb
|
||||||
|
Sliced Bread=Kromka Chleba
|
||||||
|
Toast=Tost
|
||||||
|
Toast Sandwich=Kanapka Tostowa
|
||||||
@@ -1,28 +1,32 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Artichoke=
|
Crop=.
|
||||||
Asparagus=
|
Artichoke=Артишок
|
||||||
|
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=Борщ
|
||||||
Blackberries=
|
Blackberry=Ежевика
|
||||||
|
Blackberries=Ежевика
|
||||||
Wild Blueberries=Голубика
|
Wild Blueberries=Голубика
|
||||||
|
Blueberry=Голубика
|
||||||
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=Банан
|
||||||
@@ -30,7 +34,7 @@ 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=Дикорастущий хлопок
|
||||||
@@ -38,13 +42,13 @@ 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=Чесночный хлеб
|
||||||
@@ -55,28 +59,29 @@ 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=Картофельный омлет
|
||||||
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=Бутылка конопляного масла
|
||||||
@@ -90,25 +95,28 @@ 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=Ананас
|
||||||
@@ -123,38 +131,40 @@ 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 Pod=
|
Soy=Соя
|
||||||
Soy Sauce=
|
Soy Pod=Соевый стручок
|
||||||
Soy Milk=
|
Soy Sauce=Соевый соус
|
||||||
Tofu=
|
Soy Milk=Соевое молоко
|
||||||
Cooked Tofu=
|
Tofu=Тофу
|
||||||
Spinach=
|
Cooked Tofu=Вареный тофу
|
||||||
|
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=Котел
|
||||||
@@ -164,8 +174,8 @@ 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=Солома
|
||||||
|
|||||||
@@ -1,51 +1,55 @@
|
|||||||
# textdomain: farming
|
# textdomain: farming
|
||||||
Artichoke=
|
Crop=植株
|
||||||
Asparagus=
|
Artichoke=洋蓟
|
||||||
|
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=甜菜根汤
|
||||||
Blackberries=
|
Blackberry=黑莓
|
||||||
|
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=甜甜圈
|
||||||
@@ -53,30 +57,32 @@ 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=土豆煎蛋饼
|
||||||
Paella=
|
Potato omelette=土豆煎蛋饼
|
||||||
Vanilla Flan=
|
Paella=西班牙什锦饭
|
||||||
Vegan Cheese=
|
Vanilla Flan=香草布丁
|
||||||
Onigiri=
|
Vegan Cheese=植物奶酪
|
||||||
Gyoza=
|
Onigiri=饭团
|
||||||
Mochi=
|
Gyoza=煎饺
|
||||||
Gingerbread Man=
|
Mochi=麻薯
|
||||||
|
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=一瓶大麻油
|
||||||
@@ -86,31 +92,34 @@ 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 Seeds=
|
Mint=薄荷
|
||||||
Mint Leaf=
|
Mint Seeds=薄荷种子
|
||||||
Mint Tea=
|
Mint Leaf=薄荷叶
|
||||||
|
Mint Tea=薄荷茶
|
||||||
Onion=洋葱
|
Onion=洋葱
|
||||||
Onion Soup=
|
Onion Soup=洋葱汤
|
||||||
Parsley=
|
Parsley=欧芹
|
||||||
|
Pea=豌豆
|
||||||
Pea Pod=豌豆荚
|
Pea Pod=豌豆荚
|
||||||
Pea Soup=豌豆汤
|
Pea Soup=豌豆汤
|
||||||
Peppercorn=胡椒粉
|
Pepper=胡椒
|
||||||
Green Pepper=
|
Peppercorn=胡椒粒
|
||||||
Yellow Pepper=
|
Green Pepper=青椒
|
||||||
Red Pepper=
|
Yellow Pepper=黄椒
|
||||||
|
Red Pepper=红椒
|
||||||
Ground Pepper=胡椒粉
|
Ground Pepper=胡椒粉
|
||||||
Pineapple Top=菠萝上衣
|
Pineapple Top=菠萝头
|
||||||
Pineapple=菠萝
|
Pineapple=菠萝
|
||||||
Pineapple Ring=菠萝圈
|
Pineapple Ring=菠萝圈
|
||||||
Pineapple Juice=菠萝汁
|
Pineapple Juice=菠萝汁
|
||||||
@@ -123,49 +132,51 @@ 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 Pod=
|
Soy=大豆
|
||||||
Soy Sauce=
|
Soy Pod=大豆
|
||||||
Soy Milk=
|
Soy Sauce=酱油
|
||||||
Tofu=
|
Soy Milk=豆浆
|
||||||
Cooked Tofu=
|
Tofu=豆腐
|
||||||
Spinach=
|
Cooked Tofu=熟豆腐
|
||||||
|
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=稻草
|
||||||
@@ -174,3 +185,9 @@ 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=杂草捆
|
||||||
|
|||||||
@@ -1,177 +0,0 @@
|
|||||||
# textdomain: farming
|
|
||||||
Banana=
|
|
||||||
Banana Leaves=
|
|
||||||
Orange=
|
|
||||||
Artichoke=
|
|
||||||
Asparagus=
|
|
||||||
Barley Seed=
|
|
||||||
Barley=
|
|
||||||
Green Beans=
|
|
||||||
Bean Pole (place on soil before planting beans)=
|
|
||||||
Beetroot=
|
|
||||||
Beetroot Soup=
|
|
||||||
Blackberries=
|
|
||||||
Wild Blueberries=
|
|
||||||
Blueberry Muffin=
|
|
||||||
Blueberry Pie=
|
|
||||||
Cabbage=
|
|
||||||
Carrot=
|
|
||||||
Carrot Juice=
|
|
||||||
Golden Carrot=
|
|
||||||
Chili Pepper=
|
|
||||||
Bowl of Chili=
|
|
||||||
Chili Powder=
|
|
||||||
Raw Cocoa Beans=
|
|
||||||
Cocoa Beans=
|
|
||||||
Cookie=
|
|
||||||
Bar of Dark Chocolate=
|
|
||||||
Chocolate Block=
|
|
||||||
Coffee Beans=
|
|
||||||
Cup of Coffee=
|
|
||||||
Corn=
|
|
||||||
Corn on the Cob=
|
|
||||||
Popcorn=
|
|
||||||
Cornstarch=
|
|
||||||
Bottle of Ethanol=
|
|
||||||
Wild Cotton=
|
|
||||||
Cotton Seed=
|
|
||||||
Cotton=
|
|
||||||
String=
|
|
||||||
Cucumber=
|
|
||||||
Eggplant=
|
|
||||||
Garlic clove=
|
|
||||||
Garlic=
|
|
||||||
Garlic Braid=
|
|
||||||
Ginger=
|
|
||||||
Grapes=
|
|
||||||
Trellis (place on soil before planting grapes)=
|
|
||||||
Hemp Seed=
|
|
||||||
Hemp Leaf=
|
|
||||||
Bottle of Hemp Oil=
|
|
||||||
Hemp Fibre=
|
|
||||||
Hemp Block=
|
|
||||||
Hemp Rope=
|
|
||||||
Lettuce=
|
|
||||||
Melon Slice=
|
|
||||||
Melon=
|
|
||||||
Mint Seeds=
|
|
||||||
Mint Leaf=
|
|
||||||
Mint Tea=
|
|
||||||
Onion=
|
|
||||||
Onion Soup=
|
|
||||||
Parsley=
|
|
||||||
Pea Pod=
|
|
||||||
Pea Soup=
|
|
||||||
Peppercorn=
|
|
||||||
Green Pepper=
|
|
||||||
Yellow Pepper=
|
|
||||||
Red Pepper=
|
|
||||||
Ground Pepper=
|
|
||||||
Pineapple Top=
|
|
||||||
Pineapple=
|
|
||||||
Pineapple Ring=
|
|
||||||
Pineapple Juice=
|
|
||||||
Potato=
|
|
||||||
Baked Potato=
|
|
||||||
Cucumber and Potato Salad=
|
|
||||||
Pumpkin Slice=
|
|
||||||
Jack 'O Lantern (punch to turn on and off)=
|
|
||||||
Scarecrow Bottom=
|
|
||||||
Pumpkin Bread=
|
|
||||||
Pumpkin Dough=
|
|
||||||
Pumpkin=
|
|
||||||
Raspberries=
|
|
||||||
Raspberry Smoothie=
|
|
||||||
Rhubarb=
|
|
||||||
Rhubarb Pie=
|
|
||||||
Rice Seed=
|
|
||||||
Rice=
|
|
||||||
Rice Bread=
|
|
||||||
Rice Flour=
|
|
||||||
Rye seed=
|
|
||||||
Rye=
|
|
||||||
Oat seed=
|
|
||||||
Oats=
|
|
||||||
Multigrain Flour=
|
|
||||||
Multigrain Bread=
|
|
||||||
Soy Pod=
|
|
||||||
Soy Sauce=
|
|
||||||
Soy Milk=
|
|
||||||
Tofu=
|
|
||||||
Cooked Tofu=
|
|
||||||
Spinach=
|
|
||||||
Strawberry=
|
|
||||||
Sunflower=
|
|
||||||
Sunflower Seeds=
|
|
||||||
Toasted Sunflower Seeds=
|
|
||||||
Bottle of Sunflower Oil=
|
|
||||||
Sunflower Seed Bread=
|
|
||||||
Tomato=
|
|
||||||
Tomato Soup=
|
|
||||||
Vanilla=
|
|
||||||
Vanilla Extract=
|
|
||||||
Wheat Seed=
|
|
||||||
Wheat=
|
|
||||||
Straw=
|
|
||||||
Flour=
|
|
||||||
Bread=
|
|
||||||
Sliced Bread=
|
|
||||||
Toast=
|
|
||||||
Toast Sandwich=
|
|
||||||
Glass of Water=
|
|
||||||
Sugar=
|
|
||||||
Sugar Cube=
|
|
||||||
Caramel=
|
|
||||||
Salt=
|
|
||||||
Salt crystal=
|
|
||||||
Mayonnaise=
|
|
||||||
Rose Water=
|
|
||||||
Turkish Delight=
|
|
||||||
Garlic Bread=
|
|
||||||
Donut=
|
|
||||||
Chocolate Donut=
|
|
||||||
Apple Donut=
|
|
||||||
Porridge=
|
|
||||||
Jaffa Cake=
|
|
||||||
Apple Pie=
|
|
||||||
Cactus Juice=
|
|
||||||
Pasta=
|
|
||||||
Mac & Cheese=
|
|
||||||
Spaghetti=
|
|
||||||
Bibimbap=
|
|
||||||
Burger=
|
|
||||||
Salad=
|
|
||||||
Triple Berry Smoothie=
|
|
||||||
Spanish Potatoes=
|
|
||||||
Potato omelet=
|
|
||||||
Paella=
|
|
||||||
Vanilla Flan=
|
|
||||||
Vegan Cheese=
|
|
||||||
Onigiri=
|
|
||||||
Gyoza=
|
|
||||||
Mochi=
|
|
||||||
Gingerbread Man=
|
|
||||||
Hoe=
|
|
||||||
Wooden Hoe=
|
|
||||||
Stone Hoe=
|
|
||||||
Steel Hoe=
|
|
||||||
Bronze Hoe=
|
|
||||||
Mese Hoe=
|
|
||||||
Diamond Hoe=
|
|
||||||
Wood Hoe=
|
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=
|
|
||||||
Mithril Scythe (Use to harvest and replant crops)=
|
|
||||||
Seed=
|
|
||||||
Savanna Soil=
|
|
||||||
Wet Savanna Soil=
|
|
||||||
Soil=
|
|
||||||
Wet Soil=
|
|
||||||
Wooden Bowl=
|
|
||||||
Saucepan=
|
|
||||||
Cooking Pot=
|
|
||||||
Baking Tray=
|
|
||||||
Skillet=
|
|
||||||
Mortar and Pestle=
|
|
||||||
Cutting Board=
|
|
||||||
Juicer=
|
|
||||||
Glass Mixing Bowl=
|
|
||||||
@@ -1,19 +1,25 @@
|
|||||||
|
|
||||||
|
local mcl = farming.mcl
|
||||||
|
|
||||||
|
-- add lucky blocks
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
|
|
||||||
{"dro", {"farming:corn"}, 5},
|
{"dro", {"farming:corn"}, 5},
|
||||||
{"dro", {"farming:coffee_cup_hot"}, 1},
|
{"dro", {"farming:coffee_cup_hot"}, 1},
|
||||||
{"dro", {"farming:bread"}, 5},
|
{"dro", {(mcl and "mcl_farming:bread" or "farming:bread")}, 5},
|
||||||
{"nod", "farming:jackolantern", 0},
|
{"nod", (mcl and "mcl_farming:pumpkin_face_light" or "farming:jackolantern"), 0},
|
||||||
{"tro", "farming:jackolantern_on"},
|
{"tro", (mcl and "mcl_farming:pumpkin_face_light" or "farming:jackolantern_on")},
|
||||||
{"nod", "default:river_water_source", 1},
|
{"nod", (mcl and "mcl_core:water_source" or "default:river_water_source"), 1},
|
||||||
{"tel"},
|
{"tel"},
|
||||||
{"dro", {"farming:trellis", "farming:grapes"}, 5},
|
{"dro", {"farming:trellis", "farming:grapes"}, 5},
|
||||||
{"dro", {"farming:bottle_ethanol"}, 1},
|
{"dro", {"farming:bottle_ethanol"}, 1},
|
||||||
{"nod", "farming:melon", 0},
|
{"nod", (mcl and "mcl_farming:melon" or "farming:melon"), 0},
|
||||||
{"dro", {"farming:donut", "farming:donut_chocolate", "farming:donut_apple"}, 5},
|
{"dro", {"farming:donut", "farming:donut_chocolate", "farming:donut_apple"}, 5},
|
||||||
{"dro", {"farming:hemp_leaf", "farming:hemp_fibre", "farming:seed_hemp"}, 10},
|
{"dro", {"farming:hemp_leaf", "farming:hemp_fibre", "farming:seed_hemp"}, 10},
|
||||||
{"nod", "fire:permanent_flame", 1},
|
{"nod", (mcl and "mcl_fire:fire" or "fire:permanent_flame"), 1},
|
||||||
{"dro", {"farming:chili_pepper", "farming:chili_bowl"}, 5},
|
{"dro", {"farming:chili_pepper", "farming:chili_bowl"}, 5},
|
||||||
{"dro", {"farming:bowl"}, 3},
|
{"dro", {(mcl and "mcl_core:bowl" or "farming:bowl")}, 3},
|
||||||
{"dro", {"farming:saucepan"}, 1},
|
{"dro", {"farming:saucepan"}, 1},
|
||||||
{"dro", {"farming:pot"}, 1},
|
{"dro", {"farming:pot"}, 1},
|
||||||
{"dro", {"farming:baking_tray"}, 1},
|
{"dro", {"farming:baking_tray"}, 1},
|
||||||
@@ -23,48 +29,72 @@ lucky_block:add_blocks({
|
|||||||
{"dro", {"farming:cutting_board"}, 1},
|
{"dro", {"farming:cutting_board"}, 1},
|
||||||
{"dro", {"farming:juicer"}, 1},
|
{"dro", {"farming:juicer"}, 1},
|
||||||
{"dro", {"farming:mixing_bowl"}, 1},
|
{"dro", {"farming:mixing_bowl"}, 1},
|
||||||
{"dro", {"farming:hoe_bronze"}, 1},
|
{"dro", {"farming:sunflower_oil"}, 5},
|
||||||
{"dro", {"farming:hoe_mese"}, 1},
|
{"dro", {(mcl and "mcl_farming:hoe_stone" or "farming:hoe_bronze")}, 1},
|
||||||
{"dro", {"farming:hoe_diamond"}, 1},
|
{"dro", {(mcl and "mcl_farming:hoe_gold" or "farming:hoe_mese")}, 1},
|
||||||
|
{"dro", {(mcl and "mcl_farming:hoe_diamond" or "farming:hoe_diamond")}, 1},
|
||||||
{"dro", {"farming:hoe_bomb"}, 10},
|
{"dro", {"farming:hoe_bomb"}, 10},
|
||||||
{"dro", {"farming:turkish_delight"}, 5},
|
{"dro", {"farming:turkish_delight"}, 5},
|
||||||
{"lig"},
|
{"lig"},
|
||||||
{"dro", {"farming:scythe_mithril"}, 1},
|
{"dro", {(mcl and "mcl_farming:hoe_netherite" or "farming:scythe_mithril")}, 1},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:carrot_8"},
|
{"farming:wheat_8", "farming:carrot_8"},
|
||||||
{"farming:cotton_8", "farming:rhubarb_3"},
|
{"farming:cotton_8", "farming:rhubarb_3"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:pepper_5"},
|
{"farming:wheat_8", "farming:pepper_5"},
|
||||||
{"farming:cotton_8", "farming:onion_5"},
|
{"farming:cotton_8", "farming:onion_5"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:beetroot_5"},
|
{"farming:wheat_8", (mcl and "mcl_farming:beetroot" or "farming:beetroot_5")},
|
||||||
{"farming:cotton_8", "farming:barley_7"},
|
{"farming:cotton_8", "farming:barley_7"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:corn_8"},
|
{"farming:wheat_8", "farming:corn_8"},
|
||||||
{"farming:cotton_8", "farming:grapes_8"},
|
{"farming:cotton_8", "farming:grapes_8"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:pea_5"},
|
{"farming:wheat_8", "farming:pea_5"},
|
||||||
{"farming:cotton_8", "farming:coffee_5"},
|
{"farming:cotton_8", "farming:coffee_5"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:raspberry_4"},
|
{"farming:wheat_8", "farming:raspberry_4"},
|
||||||
{"farming:cotton_8", "farming:tomato_8"},
|
{"farming:cotton_8", "farming:tomato_8"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:chili_8"},
|
{"farming:wheat_8", "farming:chili_8"},
|
||||||
{"farming:cotton_8", "farming:cucumber_4"},
|
{"farming:cotton_8", "farming:cucumber_4"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"sch", "instafarm", 0, true, {
|
{"sch", "instafarm", 0, true, {
|
||||||
{"farming:wheat_8", "farming:spinach_4"},
|
{"farming:wheat_8", "farming:spinach_4"},
|
||||||
{"farming:cotton_8", "farming:eggplant_4"},
|
{"farming:cotton_8", "farming:eggplant_4"},
|
||||||
|
{"farming:soil_wet", (mcl and "mcl_farming:soil_wet" or "farming:soil_wet")},
|
||||||
|
{"default:dirt", (mcl and "mcl_core:dirt" or "default:dirt")},
|
||||||
|
{"default:water_source", (mcl and "mcl_core:water_source" or "default:water_source")},
|
||||||
}},
|
}},
|
||||||
{"nod", "default:chest", 0, {
|
{"nod", "default:chest", 0, {
|
||||||
{name = "farming:seed_wheat", max = 15},
|
{name = (mcl and "mcl_farming:wheat_seeds" or "farming:seed_wheat"), max = 15},
|
||||||
{name = "farming:seed_barley", max = 15},
|
|
||||||
{name = "farming:seed_barley", max = 15},
|
{name = "farming:seed_barley", max = 15},
|
||||||
{name = "farming:seed_hemp", max = 15},
|
{name = "farming:seed_hemp", max = 15},
|
||||||
{name = "farming:seed_rye", max = 15},
|
{name = "farming:seed_rye", max = 15},
|
||||||
@@ -75,5 +105,6 @@ 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
mod.conf
@@ -1,4 +1,4 @@
|
|||||||
name = farming
|
name = farming
|
||||||
description = Adds many new plants and food into Minetest.
|
description = Adds many new plants and food into Minetest.
|
||||||
optional_depends = default, mcl_core, mcl_sounds, mcl_farming, mcl_stairs, stairs, lucky_block, toolranks
|
optional_depends = default, flowers, mcl_core, mcl_sounds, mcl_farming, mcl_stairs, mcl_flowers, stairs, lucky_block, toolranks
|
||||||
min_minetest_version = 5.0
|
min_minetest_version = 5.0
|
||||||
|
|||||||
BIN
screenshot.jpg
Normal file
|
After Width: | Height: | Size: 293 KiB |
BIN
screenshot.png
|
Before Width: | Height: | Size: 42 KiB |
@@ -2,3 +2,5 @@
|
|||||||
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
|
||||||
|
|||||||
173
soil.lua
@@ -1,103 +1,99 @@
|
|||||||
|
|
||||||
local S = farming.translate
|
local S = core.get_translator("farming")
|
||||||
|
|
||||||
|
|
||||||
-- default dry soil node
|
-- default dry soil node
|
||||||
|
|
||||||
local dry_soil = "farming:soil"
|
local dry_soil = "farming:soil"
|
||||||
|
|
||||||
|
|
||||||
-- add soil types to existing dirt blocks
|
-- add soil types to existing dirt blocks
|
||||||
minetest.override_item("default:dirt", {
|
|
||||||
|
core.override_item("default:dirt", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt",
|
base = "default:dirt", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.override_item("default:dirt_with_grass", {
|
core.override_item("default:dirt_with_grass", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_grass",
|
base = "default:dirt_with_grass", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.override_item("default:dirt_with_dry_grass", {
|
if core.registered_nodes["default:dirt_with_dry_grass"] then
|
||||||
soil = {
|
|
||||||
base = "default:dirt_with_dry_grass",
|
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("default:dirt_with_rainforest_litter", {
|
core.override_item("default:dirt_with_dry_grass", {
|
||||||
soil = {
|
|
||||||
base = "default:dirt_with_rainforest_litter",
|
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if minetest.registered_nodes["default:dirt_with_coniferous_litter"] then
|
|
||||||
|
|
||||||
minetest.override_item("default:dirt_with_coniferous_litter", {
|
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt_with_coniferous_litter",
|
base = "default:dirt_with_dry_grass", dry = "farming:soil",
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
wet = "farming:soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
core.override_item("default:dirt_with_rainforest_litter", {
|
||||||
|
soil = {
|
||||||
|
base = "default:dirt_with_rainforest_litter", dry = "farming:soil",
|
||||||
|
wet = "farming:soil_wet"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if core.registered_nodes["default:dirt_with_coniferous_litter"] then
|
||||||
|
|
||||||
|
core.override_item("default:dirt_with_coniferous_litter", {
|
||||||
|
soil = {
|
||||||
|
base = "default:dirt_with_coniferous_litter", dry = "farming:soil",
|
||||||
|
wet = "farming:soil_wet"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- savanna soil
|
-- savanna soil
|
||||||
if minetest.registered_nodes["default:dry_dirt"] then
|
|
||||||
|
|
||||||
minetest.override_item("default:dry_dirt", {
|
if core.registered_nodes["default:dry_dirt"] then
|
||||||
|
|
||||||
|
core.override_item("default:dry_dirt", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt",
|
base = "default:dry_dirt", dry = "farming:dry_soil",
|
||||||
dry = "farming:dry_soil",
|
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.override_item("default:dry_dirt_with_dry_grass", {
|
core.override_item("default:dry_dirt_with_dry_grass", {
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt_with_dry_grass",
|
base = "default:dry_dirt_with_dry_grass", dry = "farming:dry_soil",
|
||||||
dry = "farming:dry_soil",
|
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("farming:dry_soil", {
|
core.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",
|
||||||
"default_dry_dirt.png"
|
"default_dry_dirt.png"
|
||||||
},
|
},
|
||||||
drop = "default:dry_dirt",
|
drop = "default:dry_dirt",
|
||||||
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, field = 1},
|
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, grassland = 1,
|
||||||
|
field = 1},
|
||||||
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt",
|
base = "default:dry_dirt", dry = "farming:dry_soil",
|
||||||
dry = "farming:dry_soil",
|
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("farming:dry_soil_wet", {
|
core.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",
|
||||||
"default_dry_dirt.png^farming_soil_wet_side.png"
|
"default_dry_dirt.png^farming_soil_wet_side.png"
|
||||||
},
|
},
|
||||||
drop = "default:dry_dirt",
|
drop = "default:dry_dirt",
|
||||||
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, field = 1},
|
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, grassland = 1,
|
||||||
|
field = 1},
|
||||||
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dry_dirt",
|
base = "default:dry_dirt", dry = "farming:dry_soil",
|
||||||
dry = "farming:dry_soil",
|
|
||||||
wet = "farming:dry_soil_wet"
|
wet = "farming:dry_soil_wet"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -106,44 +102,46 @@ if minetest.registered_nodes["default:dry_dirt"] then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- normal soil
|
-- normal soil
|
||||||
minetest.register_node("farming:soil", {
|
|
||||||
|
core.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",
|
||||||
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, field = 1},
|
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2, grassland = 1,
|
||||||
|
field = 1},
|
||||||
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt",
|
base = "default:dirt", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "farming:soil_wet"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- wet soil
|
-- wet soil
|
||||||
minetest.register_node("farming:soil_wet", {
|
|
||||||
|
core.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",
|
||||||
"default_dirt.png^farming_soil_wet_side.png"
|
"default_dirt.png^farming_soil_wet_side.png"
|
||||||
},
|
},
|
||||||
drop = "default:dirt",
|
drop = "default:dirt",
|
||||||
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, field = 1},
|
groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3, grassland = 1,
|
||||||
|
field = 1},
|
||||||
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
soil = {
|
soil = {
|
||||||
base = "default:dirt",
|
base = "default:dirt", dry = "farming:soil", wet = "farming:soil_wet"
|
||||||
dry = "farming:soil",
|
|
||||||
wet = "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
|
||||||
minetest.register_alias("farming:desert_sand_soil", dry_soil)
|
|
||||||
minetest.register_alias("farming:desert_sand_soil_wet", dry_soil .. "_wet")
|
|
||||||
|
|
||||||
|
core.register_alias("farming:desert_sand_soil", dry_soil)
|
||||||
|
core.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
|
||||||
minetest.register_abm({
|
|
||||||
|
core.register_abm({
|
||||||
label = "Soil changes",
|
label = "Soil changes",
|
||||||
nodenames = {"group:field"},
|
nodenames = {"group:field"},
|
||||||
interval = 15,
|
interval = 15,
|
||||||
@@ -152,47 +150,74 @@ minetest.register_abm({
|
|||||||
|
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
|
||||||
local ndef = minetest.registered_nodes[node.name]
|
local ndef = core.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 = minetest.get_node_or_nil(pos)
|
local nn = core.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 minetest.registered_nodes[nn]
|
if core.registered_nodes[nn]
|
||||||
and minetest.registered_nodes[nn].walkable
|
and core.registered_nodes[nn].walkable
|
||||||
and minetest.get_item_group(nn, "plant") == 0
|
and core.get_item_group(nn, "plant") == 0
|
||||||
and minetest.get_item_group(nn, "growing") == 0 then
|
and core.get_item_group(nn, "growing") == 0 then
|
||||||
|
|
||||||
minetest.set_node(pos, {name = ndef.soil.base})
|
core.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 minetest.find_node_near(pos, 3, {"group:water"}) then
|
if core.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
|
||||||
minetest.set_node(pos, {name = ndef.soil.wet})
|
core.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 minetest.find_node_near(pos, 3, {"ignore"}) then
|
elseif not core.find_node_near(pos, 3, {"ignore"}) then
|
||||||
|
|
||||||
if node.name == ndef.soil.wet then
|
if node.name == ndef.soil.wet then
|
||||||
minetest.set_node(pos, {name = ndef.soil.dry})
|
core.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 minetest.get_item_group(nn, "plant") == 0
|
and core.get_item_group(nn, "plant") == 0
|
||||||
and minetest.get_item_group(nn, "growing") == 0 then
|
and core.get_item_group(nn, "growing") == 0 then
|
||||||
minetest.set_node(pos, {name = ndef.soil.base})
|
core.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 = 50,
|
||||||
|
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 = 10})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
102
statistics.lua
@@ -1,39 +1,38 @@
|
|||||||
local statistics = {}
|
|
||||||
local ROOT_2 = math.sqrt(2.0)
|
|
||||||
|
|
||||||
-- Approximations for erf(x) and erfInv(x) from
|
-- Approximations for erf(x) and erfInv(x) from
|
||||||
-- https://en.wikipedia.org/wiki/Error_function
|
-- https://en.wikipedia.org/wiki/Error_function
|
||||||
|
|
||||||
local erf
|
local statistics = {}
|
||||||
local erf_inv
|
local random, floor, ceil = math.random, math.floor, math.ceil
|
||||||
|
local exp, log, sqrt = math.exp, math.log, math.sqrt
|
||||||
|
local ROOT_2 = sqrt(2.0)
|
||||||
local A = 8 * (math.pi - 3.0) / (3.0 * math.pi * (4.0 - math.pi))
|
local A = 8 * (math.pi - 3.0) / (3.0 * math.pi * (4.0 - math.pi))
|
||||||
local B = 4.0 / math.pi
|
local B = 4.0 / math.pi
|
||||||
local C = 2.0 / (math.pi * A)
|
local C = 2.0 / (math.pi * A)
|
||||||
local D = 1.0 / A
|
local D = 1.0 / A
|
||||||
|
|
||||||
|
|
||||||
erf = function(x)
|
local function erf(x)
|
||||||
|
|
||||||
if x == 0 then return 0; end
|
if x == 0 then return 0 end
|
||||||
|
|
||||||
local xSq = x * x
|
local xSq = x * x
|
||||||
local aXSq = A * xSq
|
local aXSq = A * xSq
|
||||||
local v = math.sqrt(1.0 - math.exp(-xSq * (B + aXSq) / (1.0 + aXSq)))
|
local v = sqrt(1.0 - exp(-xSq * (B + aXSq) / (1.0 + aXSq)))
|
||||||
|
|
||||||
return (x > 0 and v) or -v
|
return (x > 0 and v) or -v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
erf_inv = function(x)
|
local function erf_inv(x)
|
||||||
|
|
||||||
if x == 0 then return 0; end
|
if x == 0 then return 0 end
|
||||||
|
|
||||||
if x <= -1 or x >= 1 then return nil; end
|
if x <= -1 or x >= 1 then return nil end
|
||||||
|
|
||||||
local y = math.log(1 - x * x)
|
local y = log(1 - x * x)
|
||||||
local u = C + 0.5 * y
|
local u = C + 0.5 * y
|
||||||
local v = math.sqrt(math.sqrt(u * u - D * y) - u)
|
local v = sqrt(sqrt(u * u - D * y) - u)
|
||||||
|
|
||||||
return (x > 0 and v) or -v
|
return (x > 0 and v) or -v
|
||||||
end
|
end
|
||||||
@@ -44,14 +43,10 @@ local function std_normal(u)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local poisson
|
|
||||||
local cdf_table = {}
|
|
||||||
|
|
||||||
|
|
||||||
local function generate_cdf(lambda_index, lambda)
|
local function generate_cdf(lambda_index, lambda)
|
||||||
|
|
||||||
local max = math.ceil(4 * lambda)
|
local max = ceil(4 * lambda)
|
||||||
local pdf = math.exp(-lambda)
|
local pdf = exp(-lambda)
|
||||||
local cdf = pdf
|
local cdf = pdf
|
||||||
local t = { [0] = pdf }
|
local t = { [0] = pdf }
|
||||||
|
|
||||||
@@ -65,30 +60,32 @@ local function generate_cdf(lambda_index, lambda)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local cdf_table = {}
|
||||||
|
|
||||||
for li = 1, 100 do
|
for li = 1, 100 do
|
||||||
cdf_table[li] = generate_cdf(li, 0.25 * li)
|
cdf_table[li] = generate_cdf(li, 0.25 * li)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
poisson = function(lambda, max)
|
local function poisson(lambda, max)
|
||||||
|
|
||||||
if max < 2 then
|
if max < 2 then
|
||||||
return (math.random() < math.exp(-lambda) and 0) or 1
|
return (random() < exp(-lambda) and 0) or 1
|
||||||
elseif lambda >= 2 * max then
|
elseif lambda >= 2 * max then
|
||||||
return max
|
return max
|
||||||
end
|
end
|
||||||
|
|
||||||
local u = math.random()
|
local u = random()
|
||||||
local lambda_index = math.floor(4 * lambda + 0.5)
|
local lambda_index = floor(4 * lambda + 0.5)
|
||||||
local cdfs = cdf_table[lambda_index]
|
local cdfs = cdf_table[lambda_index]
|
||||||
|
|
||||||
if cdfs then
|
if cdfs then
|
||||||
|
|
||||||
lambda = 0.25 * lambda_index
|
lambda = 0.25 * lambda_index
|
||||||
|
|
||||||
if u < cdfs[0] then return 0; end
|
if u < cdfs[0] then return 0 end
|
||||||
if max > #cdfs then max = #cdfs + 1 else max = math.floor(max); end
|
if max > #cdfs then max = #cdfs + 1 else max = floor(max) end
|
||||||
if u >= cdfs[max - 1] then return max; end
|
if u >= cdfs[max - 1] then return max end
|
||||||
|
|
||||||
if max > 4 then -- Binary search
|
if max > 4 then -- Binary search
|
||||||
|
|
||||||
@@ -96,62 +93,49 @@ poisson = function(lambda, max)
|
|||||||
|
|
||||||
while s + 1 < max do
|
while s + 1 < max do
|
||||||
|
|
||||||
local m = math.floor(0.5 * (s + max))
|
local m = floor(0.5 * (s + max))
|
||||||
|
|
||||||
if u < cdfs[m] then max = m; else s = m; end
|
if u < cdfs[m] then max = m else s = m end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for i = 1, max - 1 do
|
for i = 1, max - 1 do
|
||||||
if u < cdfs[i] then return i; end
|
if u < cdfs[i] then return i end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return max
|
return max
|
||||||
else
|
else
|
||||||
local x = lambda + math.sqrt(lambda) * std_normal(u)
|
local x = lambda + sqrt(lambda) * std_normal(u)
|
||||||
|
|
||||||
return (x < 0.5 and 0) or (x >= max - 0.5 and max) or math.floor(x + 0.5)
|
return (x < 0.5 and 0) or (x >= max - 0.5 and max) or floor(x + 0.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Error and Inverse error functions
|
||||||
|
|
||||||
-- Error function.
|
|
||||||
statistics.erf = erf
|
statistics.erf = erf
|
||||||
|
|
||||||
-- Inverse error function.
|
|
||||||
statistics.erf_inv = erf_inv
|
statistics.erf_inv = erf_inv
|
||||||
|
|
||||||
--- Standard normal distribution function (mean 0, standard deviation 1).
|
--- Standard normal distribution function (mean 0, standard deviation 1).
|
||||||
--
|
-- @return - Any real number (actually between -3.0 and 3.0).
|
||||||
-- @return
|
|
||||||
-- Any real number (actually between -3.0 and 3.0).
|
|
||||||
|
|
||||||
statistics.std_normal = function()
|
statistics.std_normal = function()
|
||||||
|
|
||||||
local u = math.random()
|
local u = random()
|
||||||
|
|
||||||
if u < 0.001 then
|
if u < 0.001 then return -3.0 elseif u > 0.999 then return 3.0 end
|
||||||
return -3.0
|
|
||||||
elseif u > 0.999 then
|
|
||||||
return 3.0
|
|
||||||
end
|
|
||||||
|
|
||||||
return std_normal(u)
|
return std_normal(u)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Standard normal distribution function (mean 0, standard deviation 1).
|
--- Standard normal distribution function (mean 0, standard deviation 1).
|
||||||
--
|
-- @param mu - The distribution mean.
|
||||||
-- @param mu
|
-- @param sigma - The distribution standard deviation.
|
||||||
-- The distribution mean.
|
-- @return - Any real number (actually between -3*sigma and 3*sigma).
|
||||||
-- @param sigma
|
|
||||||
-- The distribution standard deviation.
|
|
||||||
-- @return
|
|
||||||
-- Any real number (actually between -3*sigma and 3*sigma).
|
|
||||||
|
|
||||||
statistics.normal = function(mu, sigma)
|
statistics.normal = function(mu, sigma)
|
||||||
|
|
||||||
local u = math.random()
|
local u = random()
|
||||||
|
|
||||||
if u < 0.001 then
|
if u < 0.001 then
|
||||||
return mu - 3.0 * sigma
|
return mu - 3.0 * sigma
|
||||||
@@ -162,24 +146,18 @@ statistics.normal = function(mu, sigma)
|
|||||||
return mu + sigma * std_normal(u)
|
return mu + sigma * std_normal(u)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Poisson distribution function.
|
--- Poisson distribution function.
|
||||||
--
|
-- @param lambda - The distribution mean and variance.
|
||||||
-- @param lambda
|
-- @param max - The distribution maximum.
|
||||||
-- The distribution mean and variance.
|
-- @return - An integer between 0 and max (both inclusive).
|
||||||
-- @param max
|
|
||||||
-- The distribution maximum.
|
|
||||||
-- @return
|
|
||||||
-- An integer between 0 and max (both inclusive).
|
|
||||||
|
|
||||||
statistics.poisson = function(lambda, max)
|
statistics.poisson = function(lambda, max)
|
||||||
|
|
||||||
lambda, max = tonumber(lambda), tonumber(max)
|
lambda, max = tonumber(lambda), tonumber(max)
|
||||||
|
|
||||||
if not lambda or not max or lambda <= 0 or max < 1 then return 0; end
|
if not lambda or not max or lambda <= 0 or max < 1 then return 0 end
|
||||||
|
|
||||||
return poisson(lambda, max)
|
return poisson(lambda, max)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return statistics
|
return statistics
|
||||||
|
|||||||
BIN
textures/ethereal_banana_leaf.png
Normal file
|
After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 163 B |
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 187 B |