Upload files to 'mods/farming/crops'

This commit is contained in:
thunderdog1138 2020-07-17 12:52:12 +00:00
parent b528a028e1
commit 7536cb050e
5 changed files with 493 additions and 0 deletions

View File

@ -0,0 +1,94 @@
local S = farming.intllib
-- melon
minetest.register_craftitem("farming:melon_slice", {
description = S("Melon Slice"),
inventory_image = "farming_melon_slice.png",
groups = {seed = 2, food_melon_slice = 1, flammable = 3},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
end,
on_use = minetest.item_eat(2)
})
minetest.register_craft({
output = "farming:melon_8",
recipe = {
{"farming:melon_slice", "farming:melon_slice"},
{"farming:melon_slice", "farming:melon_slice"}
}
})
minetest.register_craft({
type = "shapeless",
output = "farming:melon_slice 4",
recipe = {"farming:melon_8", "farming:cutting_board"},
replacements = {{"farming:cutting_board", "farming:cutting_board"}}
})
-- melon definition
local def = {
drawtype = "plantlike",
tiles = {"farming_melon_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:melon_1", table.copy(def))
-- stage 2
def.tiles = {"farming_melon_2.png"}
minetest.register_node("farming:melon_2", table.copy(def))
-- stage 3
def.tiles = {"farming_melon_3.png"}
minetest.register_node("farming:melon_3", table.copy(def))
-- stage 4
def.tiles = {"farming_melon_4.png"}
minetest.register_node("farming:melon_4", table.copy(def))
-- stage 5
def.tiles = {"farming_melon_5.png"}
minetest.register_node("farming:melon_5", table.copy(def))
-- stage 6
def.tiles = {"farming_melon_6.png"}
minetest.register_node("farming:melon_6", table.copy(def))
-- stage 7
def.tiles = {"farming_melon_7.png"}
minetest.register_node("farming:melon_7", table.copy(def))
-- stage 8 (final)
def.drawtype = "nodebox"
def.description = S("Melon")
def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"}
def.selection_box = {-.5, -.5, -.5, .5, .5, .5}
def.walkable = true
def.groups = {
food_melon = 1, snappy = 2, oddly_breakable_by_hand = 1,
flammable = 2, plant = 1
}
def.drop = "farming:melon_8"
minetest.register_node("farming:melon_8", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:melon"] = {
crop = "farming:melon",
seed = "farming:melon_slice",
minlight = 13,
maxlight = 15,
steps = 8
}

View File

@ -0,0 +1,91 @@
local S = farming.intllib
-- mint seed
minetest.register_craftitem("farming:seed_mint", {
description = S("Mint Seeds"),
inventory_image = "farming_mint_seeds.png",
groups = {seed = 2, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(
itemstack, placer, pointed_thing, "farming:mint_1")
end
})
-- mint leaf
minetest.register_craftitem("farming:mint_leaf", {
description = S("Mint Leaf"),
inventory_image = "farming_mint_leaf.png",
groups = {food_mint = 1, flammable = 4}
})
-- mint tea
minetest.register_craftitem("farming:mint_tea", {
description = S("Mint Tea"),
inventory_image = "farming_mint_tea.png",
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
groups = {flammable = 4}
})
minetest.register_craft({
output = "farming:mint_tea",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "group:food_mint",
"group:food_mint", "group:food_mint",
"farming:juicer", "bucket:bucket_water"
},
replacements = {
{"group:food_juicer", "farming:juicer"},
{"bucket:bucket_water", "bucket:bucket_empty"}
}
})
-- mint definition
local def = {
drawtype = "plantlike",
tiles = {"farming_mint_1.png"},
paramtype = "light",
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:mint_1", table.copy(def))
-- stage 2
def.tiles = {"farming_mint_2.png"}
minetest.register_node("farming:mint_2", table.copy(def))
-- stage 3
def.tiles = {"farming_mint_3.png"}
minetest.register_node("farming:mint_3", table.copy(def))
-- stage 4 (final)
def.tiles = {"farming_mint_4.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {"farming:mint_leaf 2"}, rarity = 1},
{items = {"farming:mint_leaf 2"}, rarity = 2},
{items = {"farming:seed_mint 1"}, rarity = 1},
{items = {"farming:seed_mint 2"}, rarity = 2},
}
}
minetest.register_node("farming:mint_4", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:mint"] = {
crop = "farming:mint",
seed = "farming:seed_mint",
minlight = 13,
maxlight = 15,
steps = 4
}

View File

@ -0,0 +1,96 @@
--[[
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
-- onion
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)
})
-- onion soup
minetest.register_craftitem("farming:onion_soup", {
description = S("Onion Soup"),
inventory_image = "farming_onion_soup.png",
groups = {flammable = 2},
on_use = minetest.item_eat(6, "farming:bowl")
})
minetest.register_craft({
type = "shapeless",
output = "farming:onion_soup",
recipe = {
"group:food_onion", "group:food_onion", "group:food_pot",
"group:food_onion", "group:food_onion",
"group:food_onion", "group:food_onion", "group:food_bowl"
},
replacements = {{"farming:pot", "farming:pot"}}
})
-- crop definition
local 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(def))
-- stage 2
def.tiles = {"crops_onion_plant_2.png"}
minetest.register_node("farming:onion_2", table.copy(def))
-- stage 3
def.tiles = {"crops_onion_plant_3.png"}
minetest.register_node("farming:onion_3", table.copy(def))
-- stage 4
def.tiles = {"crops_onion_plant_4.png"}
minetest.register_node("farming:onion_4", table.copy(def))
-- stage 5
def.tiles = {"crops_onion_plant_5.png"}
def.groups.growing = nil
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(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 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(def))
-- stage 2
def.tiles = {"farming_pea_2.png"}
minetest.register_node("farming:pea_2", table.copy(def))
-- stage 3
def.tiles = {"farming_pea_3.png"}
minetest.register_node("farming:pea_3", table.copy(def))
-- stage 4
def.tiles = {"farming_pea_4.png"}
minetest.register_node("farming:pea_4", table.copy(def))
-- stage 5
def.tiles = {"farming_pea_5.png"}
def.groups.growing = nil
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(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 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(def))
-- stage 2
def.tiles = {"crops_pepper_plant_2.png"}
minetest.register_node("farming:pepper_2", table.copy(def))
-- stage 3
def.tiles = {"crops_pepper_plant_3.png"}
minetest.register_node("farming:pepper_3", table.copy(def))
-- stage 4
def.tiles = {"crops_pepper_plant_4.png"}
minetest.register_node("farming:pepper_4", table.copy(def))
-- stage 5
def.tiles = {"crops_pepper_plant_5.png"}
def.groups.growing = 0
def.drop = {
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(def))
-- add to registered_plants
farming.registered_plants["farming:pepper"] = {
crop = "farming:pepper",
seed = "farming:peppercorn",
minlight = 13,
maxlight = 15,
steps = 5
}