forked from mtcontrib/farming
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
501e9e302e
@ -31,7 +31,7 @@ else
|
||||
},
|
||||
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node(":ethereal:bananaleaves", {
|
||||
@ -42,7 +42,7 @@ else
|
||||
paramtype = "light",
|
||||
waving = 1,
|
||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
alias("farming_plus:banana_sapling", "default:sapling")
|
||||
@ -89,7 +89,7 @@ else
|
||||
},
|
||||
groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
||||
on_use = minetest.item_eat(4),
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
alias("farming_plus:orange_item", "ethereal:orange")
|
||||
|
@ -9,7 +9,10 @@ minetest.register_node("farming:seed_barley", {
|
||||
inventory_image = "farming_barley_seed.png",
|
||||
wield_image = "farming_barley_seed.png",
|
||||
drawtype = "signlike",
|
||||
groups = {compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1},
|
||||
groups = {
|
||||
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||
growing = 1
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
|
@ -14,7 +14,9 @@ minetest.register_node("farming:cotton_wild", {
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60},
|
||||
groups = {
|
||||
handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60
|
||||
},
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"farming:cotton"}, rarity = 2},
|
||||
|
@ -9,7 +9,10 @@ minetest.register_node("farming:seed_hemp", {
|
||||
inventory_image = "farming_hemp_seed.png",
|
||||
wield_image = "farming_hemp_seed.png",
|
||||
drawtype = "signlike",
|
||||
groups = {compostability = 38, seed = 1, snappy = 3, attached_node = 1, growing = 1},
|
||||
groups = {
|
||||
handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1,
|
||||
growing = 1
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
@ -91,7 +94,7 @@ minetest.register_craft( {
|
||||
{"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"},
|
||||
{"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"}
|
||||
},
|
||||
replacements = {{a.bucket_water, a.bucket_empty}}
|
||||
replacements = {{"group:water_bucket", a.bucket_empty}}
|
||||
})
|
||||
|
||||
if minetest.get_modpath("bucket_wooden") then
|
||||
@ -112,10 +115,12 @@ minetest.register_node("farming:hemp_block", {
|
||||
tiles = {"farming_hemp_block.png"},
|
||||
paramtype = "light",
|
||||
groups = {
|
||||
handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2,
|
||||
axey = 1, handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2,
|
||||
compostability = 85
|
||||
},
|
||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
||||
sounds = farming.sounds.node_sound_leaves_defaults(),
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
@ -178,13 +183,16 @@ minetest.register_node("farming:hemp_rope", {
|
||||
inventory_image = "farming_hemp_rope.png",
|
||||
drawtype = "plantlike",
|
||||
groups = {
|
||||
flammable = 2, choppy = 3, oddly_breakable_by_hand = 3, compostability = 55
|
||||
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
|
||||
|
@ -86,7 +86,9 @@ minetest.register_node("farming:melon_8", {
|
||||
drop = "farming:melon_8",
|
||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
on_place = minetest.rotate_node,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
-- add to registered_plants
|
||||
|
@ -11,7 +11,7 @@ minetest.register_node("farming:seed_mint", {
|
||||
drawtype = "signlike",
|
||||
groups = {
|
||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
||||
flammable = 2
|
||||
handy = 1, flammable = 2
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
@ -49,7 +49,9 @@ minetest.register_node("farming:jackolantern", {
|
||||
if minetest.is_protected(pos, name) then return end
|
||||
node.name = "farming:jackolantern_on"
|
||||
minetest.swap_node(pos, node)
|
||||
end
|
||||
end,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_node("farming:jackolantern_on", {
|
||||
@ -74,7 +76,9 @@ minetest.register_node("farming:jackolantern_on", {
|
||||
if minetest.is_protected(pos, name) then return end
|
||||
node.name = "farming:jackolantern"
|
||||
minetest.swap_node(pos, node)
|
||||
end
|
||||
end,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -100,7 +104,9 @@ minetest.register_node("farming:scarecrow_bottom", {
|
||||
{-12/16, 4/16, -1/16, 12/16, 2/16, 1/16},
|
||||
}
|
||||
},
|
||||
groups = {handy = 1, snappy = 3, flammable = 2}
|
||||
groups = {axey = 1, handy = 1, snappy = 3, flammable = 2},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -194,12 +200,14 @@ minetest.register_node("farming:pumpkin_8", {
|
||||
},
|
||||
groups = {
|
||||
food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2,
|
||||
flammable = 2, plant = 1
|
||||
flammable = 2, plant = 1, handy = 1
|
||||
},
|
||||
drop = "farming:pumpkin_8",
|
||||
sounds = farming.sounds.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
on_place = minetest.rotate_node,
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
||||
|
@ -10,7 +10,7 @@ minetest.register_node("farming:seed_rice", {
|
||||
wield_image = "farming_rice_seed.png",
|
||||
drawtype = "signlike",
|
||||
groups = {
|
||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
||||
flammable = 4, growing = 1
|
||||
},
|
||||
paramtype = "light",
|
||||
|
@ -18,7 +18,7 @@ minetest.register_node("farming:seed_sunflower", {
|
||||
drawtype = "signlike",
|
||||
groups = {
|
||||
compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1,
|
||||
food_sunflower_seeds = 1, flammable = 2
|
||||
handy = 1, food_sunflower_seeds = 1, flammable = 2
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
@ -9,7 +9,9 @@ minetest.register_node("farming:seed_wheat", {
|
||||
inventory_image = "farming_wheat_seed.png",
|
||||
wield_image = "farming_wheat_seed.png",
|
||||
drawtype = "signlike",
|
||||
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1},
|
||||
groups = {
|
||||
handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
walkable = false,
|
||||
@ -36,8 +38,10 @@ minetest.register_node("farming:straw", {
|
||||
description = S("Straw"),
|
||||
tiles = {"farming_straw.png"},
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, flammable = 4, fall_damage_add_percent = -30},
|
||||
sounds = farming.sounds.node_sound_leaves_defaults()
|
||||
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({
|
||||
|
12
food.lua
12
food.lua
@ -135,9 +135,11 @@ end
|
||||
minetest.register_node("farming:sugar_cube", {
|
||||
description = S("Sugar Cube"),
|
||||
tiles = {"farming_sugar_cube.png"},
|
||||
groups = {crumbly = 2},
|
||||
groups = {shovely = 1, handy = 1, crumbly = 2},
|
||||
floodable = true,
|
||||
sounds = farming.sounds.node_sound_gravel_defaults()
|
||||
sounds = farming.sounds.node_sound_gravel_defaults(),
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -248,12 +250,14 @@ minetest.register_node("farming:salt_crystal", {
|
||||
paramtype = "light",
|
||||
light_source = 1,
|
||||
tiles = {"farming_salt_crystal.png"},
|
||||
groups = { dig_immediate = 3, attached_node = 1},
|
||||
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({
|
||||
|
11
init.lua
11
init.lua
@ -7,7 +7,7 @@
|
||||
|
||||
farming = {
|
||||
mod = "redo",
|
||||
version = "20230915",
|
||||
version = "20231206",
|
||||
path = minetest.get_modpath("farming"),
|
||||
select = {
|
||||
type = "fixed",
|
||||
@ -29,10 +29,11 @@ farming = {
|
||||
|
||||
-- default sound functions just incase
|
||||
function farming.sounds.node_sound_defaults() end
|
||||
function farming.sounds.node_sound_leaves_defaults() end
|
||||
function farming.sounds.node_sound_glass_defaults() end
|
||||
function farming.sounds.node_sound_wood_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
|
||||
if farming.mtg then farming.sounds = default end
|
||||
@ -586,7 +587,7 @@ farming.register_plant = function(name, def)
|
||||
drawtype = "signlike",
|
||||
groups = {
|
||||
seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1,
|
||||
compostability = 65
|
||||
compostability = 65, handy = 1
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
@ -755,7 +756,7 @@ end
|
||||
dofile(farming.path .. "/items.lua")
|
||||
|
||||
-- important items
|
||||
if not farming.mcl then
|
||||
if minetest.get_modpath("default") then
|
||||
dofile(farming.path .. "/soil.lua")
|
||||
dofile(farming.path .. "/hoes.lua")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user