Upload files to 'mods/farming/crops'

This commit is contained in:
thunderdog1138 2020-05-08 02:43:49 +00:00
parent 118f3a3e23
commit 9c3916b1af
5 changed files with 541 additions and 0 deletions

View File

@ -0,0 +1,77 @@
--[[
Original textures from Crops Plus mod
Copyright (C) 2018 Grizzly Adam
https://forum.minetest.net/viewtopic.php?f=9&t=19488
]]
local S = farming.intllib
-- potato
minetest.register_craftitem("farming:onion", {
description = S("Onion"),
inventory_image = "crops_onion.png",
groups = {seed = 2, food_onion = 1, flammable = 3},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
end,
on_use = minetest.item_eat(1),
})
-- crop definition
local crop_def = {
drawtype = "plantlike",
tiles = {"crops_onion_plant_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 = 3, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:onion_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"crops_onion_plant_2.png"}
minetest.register_node("farming:onion_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"crops_onion_plant_3.png"}
minetest.register_node("farming:onion_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"crops_onion_plant_4.png"}
minetest.register_node("farming:onion_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"crops_onion_plant_5.png"}
crop_def.groups.growing = 0
crop_def.drop = {
max_items = 5, items = {
{items = {"farming:onion"}, rarity = 1},
{items = {"farming:onion"}, rarity = 1},
{items = {"farming:onion"}, rarity = 2},
{items = {"farming:onion"}, rarity = 2},
{items = {"farming:onion"}, rarity = 5},
}
}
minetest.register_node("farming:onion_5", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["farming:onion"] = {
crop = "farming:onion",
seed = "farming:onion",
minlight = 13,
maxlight = 15,
steps = 5
}

View File

@ -0,0 +1,97 @@
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 = {seed = 2, 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 = {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, plant = 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 = 5},
}
}
minetest.register_node("farming:pea_5", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["farming:pea_pod"] = {
crop = "farming:pea",
seed = "farming:pea_pod",
minlight = 13,
maxlight = 15,
steps = 5
}

View File

@ -0,0 +1,115 @@
--[[
Original textures from Crops Plus mod
Copyright (C) 2018 Grizzly Adam
https://forum.minetest.net/viewtopic.php?f=9&t=19488
]]
local S = farming.intllib
-- peppercorn (seed)
minetest.register_craftitem("farming:peppercorn", {
description = S("Peppercorn"),
inventory_image = "crops_peppercorn.png",
groups = {seed = 1, food_peppercorn = 1, flammable = 3},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
end,
})
-- green pepper
minetest.register_craftitem("farming:pepper", {
description = S("Pepper"),
inventory_image = "crops_pepper.png",
on_use = minetest.item_eat(2),
groups = {food_pepper = 1, flammable = 3},
})
minetest.register_craft({
type = "shapeless",
output = "farming:peppercorn",
recipe = {"farming: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
},
sounds = default.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",
type = "shapeless",
recipe = {"group:food_peppercorn", "vessels:glass_bottle", "farming:mortar_pestle"},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}},
})
-- crop definition
local crop_def = {
drawtype = "plantlike",
tiles = {"crops_pepper_plant_1.png"},
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 1,
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 3, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:pepper_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"crops_pepper_plant_2.png"}
minetest.register_node("farming:pepper_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"crops_pepper_plant_3.png"}
minetest.register_node("farming:pepper_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"crops_pepper_plant_4.png"}
minetest.register_node("farming:pepper_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"crops_pepper_plant_5.png"}
crop_def.groups.growing = 0
crop_def.drop = {
max_items = 2, items = {
{items = {"farming:pepper 2"}, rarity = 1},
{items = {"farming:pepper"}, rarity = 2},
{items = {"farming:pepper"}, rarity = 3},
}
}
minetest.register_node("farming:pepper_5", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["farming:pepper"] = {
crop = "farming:pepper",
seed = "farming:peppercorn",
minlight = 13,
maxlight = 15,
steps = 5
}

View File

@ -0,0 +1,140 @@
local S = farming.intllib
-- pineapple top
minetest.register_craftitem("farming:pineapple_top", {
description = S("Pineapple Top"),
inventory_image = "farming_pineapple_top.png",
groups = {seed = 2, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
end,
})
-- pineapple
minetest.register_node("farming:pineapple", {
description = S("Pineapple"),
drawtype = "plantlike",
tiles = {"farming_pineapple.png"},
inventory_image = "farming_pineapple.png",
wield_image = "farming_pineapple.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27}
},
groups = {food_pineapple = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
})
-- pineapple
minetest.register_craftitem("farming:pineapple_ring", {
description = S("Pineapple Ring"),
inventory_image = "farming_pineapple_ring.png",
groups = {food_pineapple_ring = 1, flammable = 2},
on_use = minetest.item_eat(1),
})
minetest.register_craft( {
output = "farming:pineapple_ring 5",
type = "shapeless",
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},
})
minetest.register_craft({
output = "farming:pineapple_juice",
type = "shapeless",
recipe = {"vessels:drinking_glass", "group:food_pineapple_ring",
"group:food_pineapple_ring", "group:food_pineapple_ring",
"farming:juicer"},
replacements = {
{"group:food_juicer", "farming:juicer"},
},
})
minetest.register_craft({
output = "farming:pineapple_juice 2",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "vessels:drinking_glass",
"group:food_pineapple", "farming:juicer"
},
replacements = {
{"group:food_juicer", "farming:juicer"},
},
})
-- crop definition
local crop_def = {
drawtype = "plantlike",
visual_scale = 1.5,
tiles = {"farming_pineapple_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:pineapple_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"farming_pineapple_2.png"}
minetest.register_node("farming:pineapple_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"farming_pineapple_3.png"}
minetest.register_node("farming:pineapple_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"farming_pineapple_4.png"}
minetest.register_node("farming:pineapple_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"farming_pineapple_5.png"}
minetest.register_node("farming:pineapple_5", table.copy(crop_def))
-- stage 6
crop_def.tiles = {"farming_pineapple_6.png"}
minetest.register_node("farming:pineapple_6", table.copy(crop_def))
-- stage 7
crop_def.tiles = {"farming_pineapple_7.png"}
minetest.register_node("farming:pineapple_7", table.copy(crop_def))
-- stage 8 (final)
crop_def.tiles = {"farming_pineapple_8.png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
{items = {"farming:pineapple"}, rarity = 1},
{items = {"farming:pineapple"}, rarity = 15},
}
}
minetest.register_node("farming:pineapple_8", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["farming:pineapple"] = {
crop = "farming:pineapple",
seed = "farming:pineapple_top",
minlight = 13,
maxlight = 15,
steps = 8
}

View File

@ -0,0 +1,112 @@
--[[
Original textures from DocFarming mod
https://forum.minetest.net/viewtopic.php?id=3948
]]
local S = farming.intllib
-- potato
minetest.register_craftitem("farming:potato", {
description = S("Potato"),
inventory_image = "farming_potato.png",
groups = {seed = 2, food_potato = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
end,
-- on_use = minetest.item_eat(1),
on_use = function(itemstack, user, pointed_thing)
if user then
if math.random(1, 3) == 1 then
return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing)
else
return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing)
end
end
end,
})
-- baked potato
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({
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 crop_def = {
drawtype = "plantlike",
tiles = {"farming_potato_1.png"},
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:potato_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"farming_potato_2.png"}
minetest.register_node("farming:potato_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"farming_potato_3.png"}
crop_def.drop = {
items = {
{items = {"farming:potato"}, rarity = 1},
{items = {"farming:potato"}, rarity = 3},
}
}
minetest.register_node("farming:potato_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"farming_potato_4.png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
{items = {"farming:potato 2"}, rarity = 1},
{items = {"farming:potato 3"}, rarity = 2},
}
}
minetest.register_node("farming:potato_4", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["farming:potato"] = {
crop = "farming:potato",
seed = "farming:potato",
minlight = 13,
maxlight = 15,
steps = 4
}