added corn
29
coffee.lua
|
@ -15,9 +15,9 @@ farming.register_plant("farming_addons:coffee", {
|
|||
minetest.register_node("farming_addons:coffee_cup", {
|
||||
description = "Cold Cup of Coffee",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_coffee_cup.png"},
|
||||
inventory_image = "farming_coffee_cup.png",
|
||||
wield_image = "farming_coffee_cup.png",
|
||||
tiles = {"farming_addons_coffee_cup.png"},
|
||||
inventory_image = "farming_addons_coffee_cup.png",
|
||||
wield_image = "farming_addons_coffee_cup.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
|
@ -48,9 +48,9 @@ minetest.register_craft({
|
|||
minetest.register_node("farming_addons:coffee_cup_hot", {
|
||||
description = "Hot Cup of Coffee",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_coffee_cup_hot.png"},
|
||||
inventory_image = "farming_coffee_cup_hot.png",
|
||||
wield_image = "farming_coffee_cup_hot.png",
|
||||
tiles = {"farming_addons_coffee_cup_hot.png"},
|
||||
inventory_image = "farming_addons_coffee_cup_hot.png",
|
||||
wield_image = "farming_addons_coffee_cup_hot.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
|
@ -61,20 +61,3 @@ minetest.register_node("farming_addons:coffee_cup_hot", {
|
|||
on_use = minetest.item_eat(3, "vessels:drinking_glass"),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
-- coffee definition
|
||||
local crop_def = {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_coffee_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()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
-- CORN
|
||||
farming.register_plant("farming_addons:corn", {
|
||||
description = "corn Seed",
|
||||
paramtype2 = "meshoptions",
|
||||
inventory_image = "farming_addons_corn_seed.png",
|
||||
steps = 10,
|
||||
minlight = 13,
|
||||
maxlight = default.LIGHT_MAX,
|
||||
fertility = {"grassland"},
|
||||
groups = {flammable = 4},
|
||||
place_param2 = 3,
|
||||
})
|
||||
|
||||
minetest.override_item("farming_addons:corn_6", {
|
||||
visual_scale = 2.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.6, 0.25}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("farming_addons:corn_7", {
|
||||
visual_scale = 2.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.6, 0.25}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("farming_addons:corn_8", {
|
||||
visual_scale = 2.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.6, 0.25}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("farming_addons:corn_9", {
|
||||
visual_scale = 2.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.6, 0.25}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("farming_addons:corn_10", {
|
||||
visual_scale = 2.0,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.6, 0.25}
|
||||
}
|
||||
})
|
||||
|
||||
-- CRAFTING
|
||||
minetest.register_craftitem("farming_addons:corn_pop", {
|
||||
description = "Popped corn",
|
||||
inventory_image = "farming_addons_corn_pop.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
type = "cooking",
|
||||
cooktime = 10,
|
||||
output = "farming_addons:corn_pop",
|
||||
recipe = "farming_addons:corn"
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "farming_addons:corn_popcorn",
|
||||
recipe = {
|
||||
{"farming_addons:corn_pop", "farming_addons:corn_pop","farming_addons:corn_pop"},
|
||||
{"default:paper", "","default:paper"},
|
||||
{"default:paper", "default:paper","default:paper"},
|
||||
},
|
||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
|
||||
})
|
||||
|
||||
-- popcorn
|
||||
minetest.register_node("farming_addons:corn_popcorn", {
|
||||
description = "Popcorn",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_addons_corn_popcorn.png"},
|
||||
inventory_image = "farming_addons_corn_popcorn.png",
|
||||
wield_image = "farming_addons_corn_popcorn.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
|
||||
},
|
||||
groups = {dig_immediate = 3, attached_node = 1},
|
||||
on_use = minetest.item_eat(3),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
1
init.lua
|
@ -5,5 +5,6 @@ farming.path = minetest.get_modpath("farming_addons")
|
|||
|
||||
dofile(farming.path.."/melon.lua")
|
||||
dofile(farming.path.."/coffee.lua")
|
||||
dofile(farming.path.."/corn.lua")
|
||||
|
||||
minetest.log("action", "[Mod] farming_addons loaded")
|
||||
|
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 197 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 434 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 334 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 2.8 KiB |