diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-03-21 10:51:12 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-03-21 10:51:12 +0000 |
commit | 719e3b1d74e6b7bc7933b4645ff7d2cb426c9f0c (patch) | |
tree | 981f4b6a90e1ae99a68ef8daf168e82f873e2e76 | |
parent | 3dd1c5280ebb104822512ee32f52ffac971be9da (diff) |
Added Peas, Bowl, Pea Soup
-rw-r--r-- | README.txt | 1 | ||||
-rw-r--r-- | chili.lua | 4 | ||||
-rw-r--r-- | farming.conf_example | 1 | ||||
-rw-r--r-- | init.lua | 5 | ||||
-rw-r--r-- | mapgen.lua | 1 | ||||
-rw-r--r-- | pea.lua | 89 | ||||
-rw-r--r-- | textures/farming_bowl.png | bin | 0 -> 145 bytes | |||
-rw-r--r-- | textures/farming_pea_1.png | bin | 0 -> 203 bytes | |||
-rw-r--r-- | textures/farming_pea_2.png | bin | 0 -> 215 bytes | |||
-rw-r--r-- | textures/farming_pea_3.png | bin | 0 -> 431 bytes | |||
-rw-r--r-- | textures/farming_pea_4.png | bin | 0 -> 528 bytes | |||
-rw-r--r-- | textures/farming_pea_5.png | bin | 0 -> 705 bytes | |||
-rw-r--r-- | textures/farming_pea_peas.png | bin | 0 -> 659 bytes | |||
-rw-r--r-- | textures/farming_pea_pod.png | bin | 0 -> 597 bytes | |||
-rw-r--r-- | textures/farming_pea_soup.png | bin | 0 -> 161 bytes | |||
-rw-r--r-- | utensils.lua | 17 |
16 files changed, 115 insertions, 3 deletions
@@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t Changelog: +1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods. 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures 1.29 - Updating functions so requires Minetest 0.4.16 and above to run @@ -16,7 +16,7 @@ minetest.register_craftitem("farming:chili_pepper", { minetest.register_craftitem("farming:chili_bowl", { description = S("Bowl of Chili"), inventory_image = "farming_chili_bowl.png", - on_use = minetest.item_eat(8), + on_use = minetest.item_eat(8, "farming:bowl"), }) minetest.register_craft({ @@ -24,7 +24,7 @@ minetest.register_craft({ output = "farming:chili_bowl", recipe = { "group:food_chili_pepper", "group:food_barley", - "group:food_tomato", "group:food_beans" + "group:food_tomato", "group:food_beans", "group:food_bowl" } }) diff --git a/farming.conf_example b/farming.conf_example index 59045ad..4a83ba6 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -28,6 +28,7 @@ farming.onion = true farming.garlic = true farming.pepper = true farming.pineapple = true +farming.peas = true farming.donuts = true -- rarety of crops on map, default is 0.001 (higher number = more crops) @@ -7,7 +7,7 @@ farming = {} farming.mod = "redo" -farming.version = "1.31" +farming.version = "1.32" farming.path = minetest.get_modpath("farming") farming.select = { type = "fixed", @@ -598,6 +598,7 @@ farming.garlic = true farming.onion = true farming.pepper = true farming.pineapple = true +farming.peas = true farming.donuts = true farming.rarety = 0.001 -- 0.006 @@ -624,6 +625,7 @@ end dofile(farming.path.."/soil.lua") dofile(farming.path.."/hoes.lua") dofile(farming.path.."/grass.lua") +dofile(farming.path.."/utensils.lua") -- default crops dofile(farming.path.."/wheat.lua") @@ -653,6 +655,7 @@ if farming.garlic then dofile(farming.path.."/garlic.lua") end if farming.onion then dofile(farming.path.."/onion.lua") end if farming.pepper then dofile(farming.path.."/pepper.lua") end if farming.pineapple then dofile(farming.path.."/pineapple.lua") end +if farming.peas then dofile(farming.path.."/pea.lua") end dofile(farming.path.."/mapgen.lua") dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility @@ -39,6 +39,7 @@ register_plant("beanbush", 18, 35, "", -1, farming.beans) register_plant("grapebush", 25, 45, "", -1, farming.grapes) register_plant("onion_5", 5, 22, "", -1, farming.onion) register_plant("garlic_5", 3, 30, "group:tree", 1, farming.garlic) +register_plant("pea_5", 25, 50, "", -1, farming.peas) if minetest.get_mapgen_setting("mg_name") == "v6" then @@ -0,0 +1,89 @@ + +local S = farming.intllib + +-- Textures for Pea crop and Peas were done by Andrey01 + +-- pea pod +minetest.register_craftitem("farming:pea_pod", { + description = S("Pea Pod"), + inventory_image = "farming_pea_pod.png", + groups = {food_pea_pod = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1") + end +}) + +minetest.register_craftitem("farming:peas", { + description = S("Peas"), + inventory_image = "farming_pea_peas.png", + groups = {food_peas = 1, flammable = 2}, + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:peas", + recipe = {"farming:pea_pod"} +}) + +-- pea soup +minetest.register_craftitem("farming:pea_soup", { + description = S("Pea Soup"), + inventory_image = "farming_pea_soup.png", + groups = {food_peas = 1, flammable = 2}, + on_use = minetest.item_eat(4, "farming:bowl"), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:pea_soup", + recipe = {"group:food_peas", "group:food_peas", "group:food_bowl"} +}) + +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_pea_1.png"}, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pea_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_pea_2.png"} +minetest.register_node("farming:pea_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_pea_3.png"} +minetest.register_node("farming:pea_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_pea_4.png"} +minetest.register_node("farming:pea_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_pea_5.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + max_items = 5, items = { + {items = {'farming:pea_pod'}, rarity = 1}, + {items = {'farming:pea_pod'}, rarity = 2}, + {items = {'farming:pea_pod'}, rarity = 3}, + {items = {'farming:pea_pod'}, rarity = 4}, + {items = {'farming:pea_pod'}, rarity = 5}, + } +} +minetest.register_node("farming:pea_5", table.copy(crop_def)) diff --git a/textures/farming_bowl.png b/textures/farming_bowl.png Binary files differnew file mode 100644 index 0000000..627c22e --- /dev/null +++ b/textures/farming_bowl.png diff --git a/textures/farming_pea_1.png b/textures/farming_pea_1.png Binary files differnew file mode 100644 index 0000000..eb48e36 --- /dev/null +++ b/textures/farming_pea_1.png diff --git a/textures/farming_pea_2.png b/textures/farming_pea_2.png Binary files differnew file mode 100644 index 0000000..4db7551 --- /dev/null +++ b/textures/farming_pea_2.png diff --git a/textures/farming_pea_3.png b/textures/farming_pea_3.png Binary files differnew file mode 100644 index 0000000..980d6ea --- /dev/null +++ b/textures/farming_pea_3.png diff --git a/textures/farming_pea_4.png b/textures/farming_pea_4.png Binary files differnew file mode 100644 index 0000000..551eaf4 --- /dev/null +++ b/textures/farming_pea_4.png diff --git a/textures/farming_pea_5.png b/textures/farming_pea_5.png Binary files differnew file mode 100644 index 0000000..907760d --- /dev/null +++ b/textures/farming_pea_5.png diff --git a/textures/farming_pea_peas.png b/textures/farming_pea_peas.png Binary files differnew file mode 100644 index 0000000..d70b283 --- /dev/null +++ b/textures/farming_pea_peas.png diff --git a/textures/farming_pea_pod.png b/textures/farming_pea_pod.png Binary files differnew file mode 100644 index 0000000..1c19c9f --- /dev/null +++ b/textures/farming_pea_pod.png diff --git a/textures/farming_pea_soup.png b/textures/farming_pea_soup.png Binary files differnew file mode 100644 index 0000000..03753cf --- /dev/null +++ b/textures/farming_pea_soup.png diff --git a/utensils.lua b/utensils.lua new file mode 100644 index 0000000..4b378e2 --- /dev/null +++ b/utensils.lua @@ -0,0 +1,17 @@ + +local S = farming.intllib + +-- wooden bowl +minetest.register_craftitem("farming:bowl", { + description = S("Wooden Bowl"), + inventory_image = "farming_bowl.png", + groups = {food_bowl = 1, flammable = 2}, +}) + +minetest.register_craft({ + output = "farming:bowl 4", + recipe = { + {"group:wood", "", "group:wood"}, + {"", "group:wood", ""}, + } +}) |